From 6452d3840b78d619018aa305e718ebd2a642caf4 Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 6 Oct 2023 19:27:30 +0530 Subject: unify fonts --- flake.nix | 1 + font.nix | 3 +++ home.nix | 4 ++++ hosts/myrtle/configuration.nix | 9 --------- programs/rofi.nix | 3 ++- programs/zathura.nix | 3 ++- services/dunst.nix | 3 ++- services/sxhkd.nix | 9 ++------- x/rxvt.nix | 13 +++++++------ 9 files changed, 23 insertions(+), 25 deletions(-) create mode 100644 font.nix diff --git a/flake.nix b/flake.nix index 3782459..d659c3f 100644 --- a/flake.nix +++ b/flake.nix @@ -96,6 +96,7 @@ _module.args.self = self; _module.args.inputs = inputs; _module.args.theme = import ./theme; + _module.args.font = import ./font.nix; }; } nixos-hardware.nixosModules.asus-battery diff --git a/font.nix b/font.nix new file mode 100644 index 0000000..74afcdd --- /dev/null +++ b/font.nix @@ -0,0 +1,3 @@ +{ + name = "Nerd Input"; +} diff --git a/home.nix b/home.nix index 838a4c3..933336c 100644 --- a/home.nix +++ b/home.nix @@ -52,6 +52,10 @@ httpie thunderbird + # gaming + mgba + yuzu + # sync rtorrent lftp diff --git a/hosts/myrtle/configuration.nix b/hosts/myrtle/configuration.nix index f554069..82eb763 100644 --- a/hosts/myrtle/configuration.nix +++ b/hosts/myrtle/configuration.nix @@ -103,8 +103,6 @@ gamemode.enable = true; }; - # sound.enable = true; - hardware = { opengl.driSupport = true; bluetooth = { @@ -192,13 +190,6 @@ group = "signald"; }; - bitlbee = { - enable = true; - libpurple_plugins = [ - pkgs.purple-signald - ]; - portNumber = 8888; - }; }; systemd.sleep.extraConfig = '' diff --git a/programs/rofi.nix b/programs/rofi.nix index bdf5898..8ce77bf 100644 --- a/programs/rofi.nix +++ b/programs/rofi.nix @@ -1,6 +1,7 @@ { config , pkgs , theme +, font , ... }: @@ -53,7 +54,7 @@ in { programs.rofi = { enable = true; - font = "Fira Code 21"; + font = "${font.name} 21"; location = "top-left"; xoffset = 20; yoffset = 20; diff --git a/programs/zathura.nix b/programs/zathura.nix index 9758c7a..6179781 100644 --- a/programs/zathura.nix +++ b/programs/zathura.nix @@ -1,6 +1,7 @@ { config , pkgs , theme +, font , ... }: @@ -31,7 +32,7 @@ with theme; statusbar-h-padding = "50"; statusbar-v-padding = "50"; guioptions = "s"; - font = "Nerd Input 10"; + font = "${font.name} 10"; }; }; } diff --git a/services/dunst.nix b/services/dunst.nix index 407820f..b0b1e67 100644 --- a/services/dunst.nix +++ b/services/dunst.nix @@ -1,6 +1,7 @@ { config , pkgs , theme +, font , ... }: @@ -10,7 +11,7 @@ with theme; enable = true; settings = { global = { - font = "Nerd Input 10"; + font = "${font.name} 10"; allow_markup = "no"; format = ''%s\n%b''; sort = "yes"; diff --git a/services/sxhkd.nix b/services/sxhkd.nix index 3bb3da8..d8678af 100644 --- a/services/sxhkd.nix +++ b/services/sxhkd.nix @@ -9,11 +9,6 @@ let '' ${pkgs.libnotify}/bin/notify-send ${text} -h int:value:${value} -h string:synchronous:volume -h string:hlcolor:"${theme.base0C}" ''; - brightness = pkgs.writeScriptBin "brightness" '' - ${pkgs.light}/bin/light $@ - v=$(${pkgs.light}/bin/light -G) - ${progress "brightness" "$v"} - ''; volume = pkgs.writeScriptBin "volume" '' ${pkgs.alsaUtils}/bin/amixer $@ v=$(${pkgs.alsaUtils}/bin/amixer sget Master | ${pkgs.gawk}/bin/awk -F"[][%]" '/Left:/ {print $2}') @@ -25,8 +20,8 @@ in services.sxhkd = { enable = true; keybindings = { - "super + slash" = "${brightness}/bin/brightness -A 2"; - "super + shift + slash" = "${brightness}/bin/brightness -U 2"; + "super + slash" = "${pkgs.light}/bin/light -A 2"; + "super + shift + slash" = "${pkgs.light}/bin/light -U 2"; "super + semicolon" = "${volume}/bin/volume sset Master 2%+"; "super + shift + semicolon" = "${volume}/bin/volume sset Master 2%-"; "super + ctrl + space" = "${pkgs.dunst}/bin/dunstctl close"; diff --git a/x/rxvt.nix b/x/rxvt.nix index a7970a6..b5401ab 100644 --- a/x/rxvt.nix +++ b/x/rxvt.nix @@ -1,6 +1,7 @@ { config , pkgs , theme +, font , ... }: @@ -30,12 +31,12 @@ with theme; "*color15" = base07; "*.cursorBlink" = "on"; - "URxvt.font" = "xft:Nerd Input:size=11:style=Medium"; - "URxvt.italicFont" = "xft:Nerd Input:size=11:style=Medium"; - "URxvt.boldFont" = "xft:Nerd Input:size=11:style=Medium"; - "*font" = "Fira Code:size=11:style=Regular"; - "*italicFont" = "Fira Code:size=11:style=Italic"; - "*boldFont" = "Fira Code:size=11:style=Bold"; + "URxvt.font" = "xft:${font.name}:size=11:style=Medium"; + "URxvt.italicFont" = "xft:${font.name}:size=11:style=Medium"; + "URxvt.boldFont" = "xft:${font.name}:size=11:style=Medium"; + "*font" = "${font.name}:size=11:style=Regular"; + "*italicFont" = "${font.name}:size=11:style=Italic"; + "*boldFont" = "${font.name}:size=11:style=Bold"; "URxvt.lineSpace" = 0; "URxvt.letterSpace" = 0; -- cgit v1.2.3