aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-01-31 20:52:34 +0100
committerAdrian Kummerlaender2019-01-31 20:52:34 +0100
commitb6fb8d0ad3993eccb812750125252dda1764d074 (patch)
tree2f9e8cfafea7b587369d80b688498ef13e9aec5a
parent8baa7a0b67be91fe22d6f668440466ab857554c5 (diff)
downloadnixos_home-b6fb8d0ad3993eccb812750125252dda1764d074.tar
nixos_home-b6fb8d0ad3993eccb812750125252dda1764d074.tar.gz
nixos_home-b6fb8d0ad3993eccb812750125252dda1764d074.tar.bz2
nixos_home-b6fb8d0ad3993eccb812750125252dda1764d074.tar.lz
nixos_home-b6fb8d0ad3993eccb812750125252dda1764d074.tar.xz
nixos_home-b6fb8d0ad3993eccb812750125252dda1764d074.tar.zst
nixos_home-b6fb8d0ad3993eccb812750125252dda1764d074.zip
Extract hidpi support
-rw-r--r--gui/conf/xmonad.hs11
-rw-r--r--gui/gtk.nix7
-rw-r--r--gui/hidpi.nix27
-rw-r--r--gui/rofi.nix1
-rw-r--r--gui/twmn.nix8
-rw-r--r--host/athena.nix11
6 files changed, 41 insertions, 24 deletions
diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs
index 63845b3..4e16d3f 100644
--- a/gui/conf/xmonad.hs
+++ b/gui/conf/xmonad.hs
@@ -45,9 +45,9 @@ import System.Posix.Unistd
workspaces :: [WorkspaceId]
workspaces = map show [1 .. 9 :: Int]
-customTabTheme = (theme xmonadTheme)
+customTabTheme host = (theme xmonadTheme)
{ fontName = "xft:Iosevka Medium-12"
- , decoHeight = 30
+ , decoHeight = decoHeightOn host
, activeTextColor = "#222222"
, activeColor = "#909636"
, inactiveTextColor = "#999999"
@@ -62,7 +62,7 @@ customLayoutHook host = id
$ bsp ||| tabs ||| frame ||| tiles ||| two
where
bsp = name "bsp" $ borderResize (emptyBSP)
- tabs = name "tabs" $ tabbed shrinkText customTabTheme
+ tabs = name "tabs" $ tabbed shrinkText (customTabTheme host)
frame = name "frame" $ id
. mkToggle (single REFLECTX)
. mkToggle (single REFLECTY)
@@ -321,3 +321,8 @@ screenHeightOn host = case host of
"majestix" -> 1050
"asterix" -> 768
"athena" -> 1440
+decoHeightOn host = case host of
+ "obelix" -> 20
+ "majestix" -> 20
+ "asterix" -> 20
+ "athena" -> 30
diff --git a/gui/gtk.nix b/gui/gtk.nix
index d3226d1..4c59a7f 100644
--- a/gui/gtk.nix
+++ b/gui/gtk.nix
@@ -31,7 +31,7 @@ in {
wm_border_focus = "909636";
wm_border_unfocus = "909636";
gtk3_generate_dark = false;
- gtk2_hidpi = true;
+ gtk2_hidpi = false;
};
};
@@ -67,9 +67,4 @@ in {
enable = true;
useGtkTheme = true;
};
-
- home.sessionVariables = {
- GDK_SCALE = "2";
- GDK_DPI_SCALE = "0.5";
- };
}
diff --git a/gui/hidpi.nix b/gui/hidpi.nix
new file mode 100644
index 0000000..36898e2
--- /dev/null
+++ b/gui/hidpi.nix
@@ -0,0 +1,27 @@
+{ pkgs, ... }:
+
+{
+ home.sessionVariables = {
+ GDK_SCALE = "2";
+ GDK_DPI_SCALE = "0.5";
+ };
+
+ xresources.extraConfig = ''
+ Xft.dpi: 160
+ Xft.autohint: 0
+ Xft.lcdfilter: lcddefault
+ Xft.hintstyle: hintfull
+ Xft.hinting: 1
+ Xft.antialias: 1
+ Xft.rgba: rgb
+ '';
+
+ home.file.".config/twmn/twmn.conf".text = ''
+ font_size=24
+ height=32
+ '';
+
+ programs.rofi.extraConfig = ''
+ rofi.dpi: 160
+ '';
+}
diff --git a/gui/rofi.nix b/gui/rofi.nix
index 6568d41..19749f5 100644
--- a/gui/rofi.nix
+++ b/gui/rofi.nix
@@ -52,7 +52,6 @@
rofi.combi-modi: windowcd,drun,ssh
rofi.terminal: kitty
rofi.ssh-command: {terminal} {ssh-client} {host}
- rofi.dpi: 160
'';
};
}
diff --git a/gui/twmn.nix b/gui/twmn.nix
index 09409f4..fc90ec6 100644
--- a/gui/twmn.nix
+++ b/gui/twmn.nix
@@ -25,14 +25,14 @@
};
home.file.".config/twmn/twmn.conf".text = ''
+ [main]
+ duration=5000
[gui]
always_on_top=true
background_color=#909737
bounce=true
font=Iosevka
- font_size=24
foreground_color=#111111
- height=32
in_animation=6
in_animation_duration=500
opacity=100
@@ -40,7 +40,7 @@
out_animation_duration=500
position=bottom_right
screen=0
- [main]
- duration=5000
+ font_size=15
+ height=20
'';
}
diff --git a/host/athena.nix b/host/athena.nix
index 21d6ecf..0f5a8a4 100644
--- a/host/athena.nix
+++ b/host/athena.nix
@@ -4,6 +4,7 @@
imports = [
../gui/default.nix
../gui/networkmanager.nix
+ ../gui/hidpi.nix
../gui/stalonetray.nix
../gui/redshift.nix
../gui/touchegg.nix
@@ -13,14 +14,4 @@
acpi
xorg.xbacklight
];
-
- xresources.extraConfig = ''
- Xft.dpi: 160
- Xft.autohint: 0
- Xft.lcdfilter: lcddefault
- Xft.hintstyle: hintfull
- Xft.hinting: 1
- Xft.antialias: 1
- Xft.rgba: rgb
- '';
}