about summary refs log tree commit diff
path: root/home/profiles/gui/config
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2023-09-14 22:48:51 +0900
committersefidel <contact@sefidel.net>2023-09-14 22:48:51 +0900
commit037b50d6087faf294c657cae944c4a10b6d5250c (patch)
tree38d01e93782b5f2fa140e62e6bcaf4a508f7b21c /home/profiles/gui/config
parent75b3280002b55e0be4ac97fb180af2248c710106 (diff)
downloadnixrc-037b50d6087faf294c657cae944c4a10b6d5250c.tar.gz
nixrc-037b50d6087faf294c657cae944c4a10b6d5250c.zip
feat(home): basic HiDPI support
Diffstat (limited to 'home/profiles/gui/config')
-rw-r--r--home/profiles/gui/config/dunst.nix8
-rw-r--r--home/profiles/gui/config/foot.nix9
-rw-r--r--home/profiles/gui/config/sway.nix12
-rw-r--r--home/profiles/gui/config/waybar/style.nix9
4 files changed, 26 insertions, 12 deletions
diff --git a/home/profiles/gui/config/dunst.nix b/home/profiles/gui/config/dunst.nix
index 60ed15f..b614de5 100644
--- a/home/profiles/gui/config/dunst.nix
+++ b/home/profiles/gui/config/dunst.nix
@@ -1,6 +1,10 @@
-{ neotheme }:
+{ config, neotheme }:
 
 with neotheme.colors;
+
+let
+  guiCfg = config.profiles.gui;
+in
 {
   global = {
     padding = 8;
@@ -19,7 +23,7 @@ with neotheme.colors;
     word_wrap = true;
     show_indicators = false;
     format = "<b>%s</b>\\n\\n%b";
-    font = "Dina 10";
+    font = "${guiCfg.font.name} ${toString guiCfg.font.size}";
     frame_color = "#${color3}";
     separator_color = "auto";
     max_icon_size = 80;
diff --git a/home/profiles/gui/config/foot.nix b/home/profiles/gui/config/foot.nix
index 9296b48..61fecf7 100644
--- a/home/profiles/gui/config/foot.nix
+++ b/home/profiles/gui/config/foot.nix
@@ -1,13 +1,16 @@
-{ neotheme }:
+{ config, neotheme }:
 
 with neotheme.colors;
 
+let
+  guiCfg = config.profiles.gui;
+in
 {
   main = {
     term = "foot";
-    font = "Dina:pixelsize=13,JetBrainsMono Nerd Font:pixelsize=12";
+    font = "${guiCfg.font.name}:pixelsize=${toString guiCfg.font.pixelSize},JetBrainsMono Nerd Font:pixelsize=12";
     letter-spacing = 0;
-    dpi-aware = "yes";
+    # dpi-aware = "yes";
     pad = "16x16 center";
   };
 
diff --git a/home/profiles/gui/config/sway.nix b/home/profiles/gui/config/sway.nix
index 174b47e..dddf9d9 100644
--- a/home/profiles/gui/config/sway.nix
+++ b/home/profiles/gui/config/sway.nix
@@ -2,6 +2,9 @@
 
 with neotheme.colors;
 
+let
+  guiCfg = config.profiles.gui;
+in
 ''
   # disable power key
   exec systemd-inhibit --what=handle-power-key --who="sway" --why="Sway manages power key behaviour" sleep infinity
@@ -25,7 +28,7 @@ with neotheme.colors;
   bindsym $mod+Return exec $term
 
   # set menu
-    set $menu "${pkgs.bemenu}/bin/bemenu-run -H 18 -l 5 --fn 'Dina 13px' -p 'run::' --tb '$primary' --tf '$color0' --hb '$primary' --hf '$color0'"
+    set $menu "${pkgs.bemenu}/bin/bemenu-run -H 18 -l 5 --fn '${guiCfg.font.name} ${toString guiCfg.font.pixelSize}px' -p 'run::' --tb '$primary' --tf '$color0' --hb '$primary' --hf '$color0'"
   bindsym $mod+d exec $menu
 
   # set screenshot util
@@ -68,7 +71,7 @@ with neotheme.colors;
   # kill focused
   bindsym $mod+w kill
 
-  font "pango:Dina 10"
+  font "pango:${guiCfg.font.name} ${toString guiCfg.font.size}"
 
   # window rules
   for_window [window_role="pop-up"]      floating enable
@@ -199,8 +202,9 @@ with neotheme.colors;
   client.unfocused        $muted $muted $color7 $muted
   client.urgent           $color10 $color10 $color0 $color10
   output "*" bg ${../../../../assets/annie-spratt-arctic.jpg} fill
-  output "*" scale 1
-  output "*" scale_filter nearest
+  output eDP-1 scale 1.25
+  # output "*" scale 1
+  # output "*" scale_filter smart
 
   input type:touchpad {
     tap enabled
diff --git a/home/profiles/gui/config/waybar/style.nix b/home/profiles/gui/config/waybar/style.nix
index d8714ed..5009ccb 100644
--- a/home/profiles/gui/config/waybar/style.nix
+++ b/home/profiles/gui/config/waybar/style.nix
@@ -1,13 +1,16 @@
-{ neotheme }:
+{ config, neotheme }:
 
 with neotheme.colors;
 
+let
+  guiCfg = config.profiles.gui;
+in
 ''
   * {
     border: none;
     border-radius: 0;
-    font-family: "Dina, JetBrainsMono Nerd Font";
-    font-size: 12px;
+    font-family: "${guiCfg.font.name}, JetBrainsMono Nerd Font";
+    font-size: ${toString guiCfg.font.pixelSize}px;
     min-height: 0;
   }