From 1c8cf1869a202833cfa88f1a73b5426914d0a35c Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Wed, 23 Jan 2019 23:14:49 +0100 Subject: Some athena-specific changes not ready for master --- gui/conf/xmonad.hs | 20 ++++++++++++-------- gui/rofi.nix | 1 + gui/twmn.nix | 4 ++-- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs index bf067f9..ec8a7c6 100644 --- a/gui/conf/xmonad.hs +++ b/gui/conf/xmonad.hs @@ -36,6 +36,7 @@ import XMonad.Actions.UpdatePointer import Data.Maybe import Control.Monad (when) import Data.Map (Map, fromList, member) +import Data.List (unionBy) import System.Exit import System.Posix.Unistd @@ -45,7 +46,7 @@ workspaces = map show [1 .. 9 :: Int] customTabTheme = (theme xmonadTheme) { fontName = "xft:Iosevka Medium-12" - , decoHeight = 20 + , decoHeight = 30 , activeTextColor = "#222222" , activeColor = "#909636" , inactiveTextColor = "#999999" @@ -114,11 +115,11 @@ windowBringerDmenuConfig = def { menuCommand = "rofi" , menuArgs = [ "-p", "win", "-dmenu", "-i" ] } hostSpecificKeybindings host = case host of - "asterix" -> [ ("M-i b" , showNotification "Battery" - "`acpi | cut -c 10-`") - , ("M-i c" , showNotification "`acpi --thermal | awk '{print $4}'`°C" - "`cat /proc/acpi/ibm/fan | awk '/speed/{print $2}'` RPM") - , ("M-c n" , spawn "networkmanager_dmenu") ] + "asterix" -> [ ("M-i b" , showNotification "Battery" + "`acpi | cut -c 10-`") + , ("M-i c" , showNotification "`acpi --thermal | awk '{print $4}'`°C" + "`cat /proc/acpi/ibm/fan | awk '/speed/{print $2}'` RPM") + , ("M-c n" , spawn "networkmanager_dmenu") ] "athena" -> [ ("M-i b" , showNotification "Battery" "`acpi | cut -c 10-`") , ("M-i c" , showNotification "`acpi --thermal | awk '{print $4}'`°C" @@ -128,7 +129,8 @@ hostSpecificKeybindings host = case host of , ("" , spawn "xbacklight -dec 5") , ("" , spawn "amixer sset Master 10%+") , ("" , spawn "amixer sset Master 10%-") - , ("" , spawn "amixer sset Master toggle") ] + , ("" , spawn "amixer sset Master toggle") + , ("" , namedScratchpadAction (scratchpads host) "terminal") ] "obelix" -> [ ("M-i g" , showNotification "GPU" "`nvidia-smi --query-gpu=name,temperature.gpu,utilization.gpu,utilization.memory --format=csv,noheader | awk -F',' '{print $1 \" running at\" $2 \"°C due to\" $3 \" load and\" $4 \" memory usage\"}'`") ] _ -> [ ] @@ -196,7 +198,9 @@ commonKeybindings host = , ("M-c s" , spawn "systemctl suspend") , ("M-c h" , spawn "systemctl hibernate") ] -customKeybindings host = concatMap ($ host) [commonKeybindings, hostSpecificKeybindings] +customKeybindings host = unionBy (\(keyA,_) (keyB,_) -> keyA == keyB) + (hostSpecificKeybindings host) + (commonKeybindings host) customMousebindings (XConfig {XMonad.modMask = modMask}) = fromList [ ((modMask .|. shiftMask, button1), \w -> focus w >> mouseMoveWindow w) diff --git a/gui/rofi.nix b/gui/rofi.nix index 19749f5..6568d41 100644 --- a/gui/rofi.nix +++ b/gui/rofi.nix @@ -52,6 +52,7 @@ 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 5d26619..09409f4 100644 --- a/gui/twmn.nix +++ b/gui/twmn.nix @@ -30,9 +30,9 @@ background_color=#909737 bounce=true font=Iosevka - font_size=15 + font_size=24 foreground_color=#111111 - height=20 + height=32 in_animation=6 in_animation_duration=500 opacity=100 -- cgit v1.2.3 From a365193deec426d0710550422c8e295ee4493539 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 24 Jan 2019 19:16:34 +0100 Subject: Add xbacklight package --- host/athena.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/athena.nix b/host/athena.nix index 3ed37ab..4dff6d0 100644 --- a/host/athena.nix +++ b/host/athena.nix @@ -8,7 +8,7 @@ home.packages = with pkgs; [ acpi - xorg.xbacklight + xorg.xbacklight ]; xresources.extraConfig = '' -- cgit v1.2.3 From bb54253133465a2425f95196e7364b0a13336562 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 24 Jan 2019 19:19:23 +0100 Subject: Increase athena cursor size --- gui/xmonad.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/xmonad.nix b/gui/xmonad.nix index 231240f..581dff7 100644 --- a/gui/xmonad.nix +++ b/gui/xmonad.nix @@ -13,7 +13,7 @@ pointerCursor = { package = pkgs.vanilla-dmz; name = "Vanilla-DMZ-AA"; - size = 16; + size = 48; }; windowManager.xmonad = { -- cgit v1.2.3 From a576fc0630c4eed5263f29ab671b7f4a26f2a698 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Fri, 25 Jan 2019 21:43:01 +0100 Subject: Add stalonetray and nm-applet autostart on athena It took me more time than it should have to get stalonetray to display below all windows as a _widget_ on the desktop... --- gui/conf/xmonad.hs | 2 ++ gui/networkmanager.nix | 2 ++ gui/stalonetray.nix | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 gui/stalonetray.nix diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs index ec8a7c6..da1859e 100644 --- a/gui/conf/xmonad.hs +++ b/gui/conf/xmonad.hs @@ -4,6 +4,7 @@ import qualified XMonad.StackSet as S import XMonad.Hooks.EwmhDesktops import XMonad.Hooks.ManageHelpers +import XMonad.Hooks.ManageDocks import XMonad.Hooks.InsertPosition import XMonad.Layout.Tabbed @@ -230,6 +231,7 @@ customLogHook = do main = do host <- fmap nodeName getSystemID xmonad $ ewmh + $ docks $ def { modMask = mod4Mask -- super key as modifier , borderWidth = 3 diff --git a/gui/networkmanager.nix b/gui/networkmanager.nix index daf3977..595bf48 100644 --- a/gui/networkmanager.nix +++ b/gui/networkmanager.nix @@ -6,6 +6,8 @@ networkmanagerapplet ]; + services.network-manager-applet.enable = true; + home.file.".config/networkmanager-dmenu/config.ini".text = '' [dmenu] dmenu_command = rofi diff --git a/gui/stalonetray.nix b/gui/stalonetray.nix new file mode 100644 index 0000000..ca3baaf --- /dev/null +++ b/gui/stalonetray.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: + +{ + services.stalonetray = { + enable = true; + + config = { + decorations = "none"; + icon_size = 48; + geometry = "5x1+10-10"; + transparent = false; + grow_gravity = "E"; + background = "#000000"; + dockapp_mode = "none"; + window_layer = "bottom"; + window_strut = "bottom"; + window_type = "dock"; + }; + }; +} -- cgit v1.2.3 From 8f7dac29c3e1d10961dae00a80733f1fb92fd778 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Fri, 25 Jan 2019 21:44:04 +0100 Subject: Add redshift --- gui/redshift.nix | 10 ++++++++++ host/athena.nix | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 gui/redshift.nix diff --git a/gui/redshift.nix b/gui/redshift.nix new file mode 100644 index 0000000..fabdb89 --- /dev/null +++ b/gui/redshift.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: + +{ + services.redshift = { + enable = true; + tray = true; + latitude = "49.0135248"; + longitude = "8.40435918703854"; + }; +} diff --git a/host/athena.nix b/host/athena.nix index 4dff6d0..3c4bf37 100644 --- a/host/athena.nix +++ b/host/athena.nix @@ -4,6 +4,8 @@ imports = [ ../gui/default.nix ../gui/networkmanager.nix + ../gui/stalonetray.nix + ../gui/redshift.nix ]; home.packages = with pkgs; [ -- cgit v1.2.3 From 65b564ba723d16b60dd7cd6abf4520f775035d27 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Fri, 25 Jan 2019 21:52:46 +0100 Subject: Replace xfce4-screenshooter with flameshot --- gui/conf/xmonad.hs | 2 +- gui/xmonad.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs index da1859e..b64d561 100644 --- a/gui/conf/xmonad.hs +++ b/gui/conf/xmonad.hs @@ -145,7 +145,7 @@ commonKeybindings host = , ("M-" , spawn "rofi -show combi") , ("M-" , spawn "kitty") , ("M-S-" , spawn "nvim-qt --no-ext-tabline") - , ("" , spawn "xfce4-screenshooter") + , ("" , spawn "flameshot gui") -- window management , ("M-q" , windows $ S.shift "NSP") , ("M-S-q" , kill) diff --git a/gui/xmonad.nix b/gui/xmonad.nix index 581dff7..3686cd0 100644 --- a/gui/xmonad.nix +++ b/gui/xmonad.nix @@ -26,12 +26,12 @@ home.packages = with pkgs; [ # lockscreen i3lock - # screenshooter - xfce4-12.xfce4-screenshooter ]; services.screen-locker = { enable = true; lockCmd = "${pkgs.i3lock}/bin/i3lock -n -c 000000"; }; + + services.flameshot.enable = true; } -- cgit v1.2.3 From 5b139524b2771bfb140af46572874587adeeca91 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Fri, 25 Jan 2019 21:58:33 +0100 Subject: Add font size keybindings for Kitty --- gui/kitty.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gui/kitty.nix b/gui/kitty.nix index 9a47dd0..8e467e5 100644 --- a/gui/kitty.nix +++ b/gui/kitty.nix @@ -36,6 +36,10 @@ # white color7 #F2F2F2 color15 #FFFFFF + + map ctrl+shift+plus change_font_size all +2.0 + map ctrl+shift+minus change_font_size all -2.0 + map ctrl+shift+0 change_font_size all 0 ''; }; } -- cgit v1.2.3 From 017cd3bbd9070dd42e5710459be613dd093dc5f8 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 26 Jan 2019 12:18:05 +0100 Subject: Scale GTK3 for highdpi display Looks slightly to large for the few GTK3 applications I use regularly but buttons are way to small otherwise. --- gui/gtk.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gui/gtk.nix b/gui/gtk.nix index bd1465a..adb54d8 100644 --- a/gui/gtk.nix +++ b/gui/gtk.nix @@ -66,4 +66,9 @@ in { enable = true; useGtkTheme = true; }; + + home.sessionVariables = { + GDK_SCALE = "2"; + GDK_DPI_SCALE = "0.5"; + }; } -- cgit v1.2.3 From 0af62a4fa73b50e605ff5d6af91d2a228771a446 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 26 Jan 2019 21:54:52 +0100 Subject: Enable gtk2 hidpi flag in oomox-theme --- gui/gtk.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/gtk.nix b/gui/gtk.nix index adb54d8..53f8c3b 100644 --- a/gui/gtk.nix +++ b/gui/gtk.nix @@ -31,6 +31,7 @@ in { wm_border_focus = "909636"; wm_border_unfocus = "909636"; gtk3_generate_dark = false; + gtk2_hidpi = true; }; }; -- cgit v1.2.3 From 72238630db12c37306e6ee336fa31bf6c550a37c Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 26 Jan 2019 21:55:15 +0100 Subject: Decrease kitty font size stepping --- gui/kitty.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/kitty.nix b/gui/kitty.nix index 8e467e5..fdd25a3 100644 --- a/gui/kitty.nix +++ b/gui/kitty.nix @@ -37,8 +37,8 @@ color7 #F2F2F2 color15 #FFFFFF - map ctrl+shift+plus change_font_size all +2.0 - map ctrl+shift+minus change_font_size all -2.0 + map ctrl+shift+plus change_font_size all +1.0 + map ctrl+shift+minus change_font_size all -1.0 map ctrl+shift+0 change_font_size all 0 ''; }; -- cgit v1.2.3 From 02adc98ce764eacdbd6ac2f2d20aaf893349868c Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 29 Jan 2019 20:27:38 +0100 Subject: Add basic touchegg setup for athena --- gui/conf/touchegg.conf | 18 ++++++++++++++++++ gui/conf/xmonad.hs | 19 ++++++++++--------- gui/touchegg.nix | 24 ++++++++++++++++++++++++ host/athena.nix | 1 + 4 files changed, 53 insertions(+), 9 deletions(-) create mode 100644 gui/conf/touchegg.conf create mode 100644 gui/touchegg.nix diff --git a/gui/conf/touchegg.conf b/gui/conf/touchegg.conf new file mode 100644 index 0000000..2afb98b --- /dev/null +++ b/gui/conf/touchegg.conf @@ -0,0 +1,18 @@ + + + + + + Control+j + + + + Control+k + + + + BUTTON=3 + + + + diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs index b64d561..e937e74 100644 --- a/gui/conf/xmonad.hs +++ b/gui/conf/xmonad.hs @@ -149,13 +149,14 @@ commonKeybindings host = -- window management , ("M-q" , windows $ S.shift "NSP") , ("M-S-q" , kill) + , ("M-h" , sendMessage Shrink) + , ("M-l" , sendMessage Expand) + , ("M-" , nextMatch History (return True)) +-- window movement , ("M-j" , windows S.focusDown) , ("M-k" , windows S.focusUp) , ("M-S-j" , windows S.swapDown) , ("M-S-k" , windows S.swapUp) - , ("M-h" , sendMessage Shrink) - , ("M-l" , sendMessage Expand) - , ("M-" , nextMatch History (return True)) -- window bringer , ("M-a" , gotoMenuConfig windowBringerDmenuConfig) , ("M-S-a" , bringMenuConfig windowBringerDmenuConfig) @@ -167,12 +168,12 @@ commonKeybindings host = [ (p ++ [k] , windows $ f i) | (i, k) <- zip Main.workspaces ['1' .. '9'] , (p, f) <- [ ("M-" , S.view) , ("M-S-" , S.shift) ] ] ++ - [ ("M-s p" , toggleWS' ["NSP"]) + [ ("C-" , toggleWS' ["NSP"]) -- workspace movement - , ("M-s j" , moveTo Next nonEmptyWS) - , ("M-s k" , moveTo Prev nonEmptyWS) - , ("M-S-s j" , shiftTo Next nonEmptyWS >> moveTo Next nonEmptyWS) - , ("M-S-s k" , shiftTo Prev nonEmptyWS >> moveTo Prev nonEmptyWS) + , ("C-j" , moveTo Next nonEmptyWS) + , ("C-k" , moveTo Prev nonEmptyWS) + , ("C-S-j" , shiftTo Next nonEmptyWS >> moveTo Next nonEmptyWS) + , ("C-S-k" , shiftTo Prev nonEmptyWS >> moveTo Prev nonEmptyWS) -- workspace layout management , ("M-v" , layoutMenu) , ("M-s l" , sendMessage NextLayout) @@ -234,7 +235,7 @@ main = do $ docks $ def { modMask = mod4Mask -- super key as modifier - , borderWidth = 3 + , borderWidth = 6 , normalBorderColor = "#161616" , focusedBorderColor = "#909636" , keys = \c -> mkKeymap c (customKeybindings host) diff --git a/gui/touchegg.nix b/gui/touchegg.nix new file mode 100644 index 0000000..9b74195 --- /dev/null +++ b/gui/touchegg.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: + +{ + home.packages = [ pkgs.touchegg ]; + + home.file.".config/touchegg/touchegg.conf".source = ./conf/touchegg.conf; + + systemd.user.services.touchegg = { + Unit = { + Description = "Touchégg multitouch gestures"; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; + }; + + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + + Service = { + ExecStart = "${pkgs.touchegg}/bin/touchegg"; + Restart = "on-failure"; + }; + }; +} diff --git a/host/athena.nix b/host/athena.nix index 3c4bf37..21d6ecf 100644 --- a/host/athena.nix +++ b/host/athena.nix @@ -6,6 +6,7 @@ ../gui/networkmanager.nix ../gui/stalonetray.nix ../gui/redshift.nix + ../gui/touchegg.nix ]; home.packages = with pkgs; [ -- cgit v1.2.3 From f63e869f37172460595f8379c49230ff061a5c55 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 29 Jan 2019 20:30:33 +0100 Subject: Remove unnecessary package exposure --- gui/touchegg.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/gui/touchegg.nix b/gui/touchegg.nix index 9b74195..1455da8 100644 --- a/gui/touchegg.nix +++ b/gui/touchegg.nix @@ -1,8 +1,6 @@ { pkgs, ... }: { - home.packages = [ pkgs.touchegg ]; - home.file.".config/touchegg/touchegg.conf".source = ./conf/touchegg.conf; systemd.user.services.touchegg = { -- cgit v1.2.3 From 8baa7a0b67be91fe22d6f668440466ab857554c5 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 31 Jan 2019 14:44:07 +0100 Subject: Add thesaurus scratchpad --- gui/apps/dev.nix | 2 ++ gui/conf/xmonad.hs | 3 +++ gui/gtk.nix | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gui/apps/dev.nix b/gui/apps/dev.nix index 2d7397c..4f3bf2e 100644 --- a/gui/apps/dev.nix +++ b/gui/apps/dev.nix @@ -9,6 +9,8 @@ qcachegrind gitg paraview + # language utilities + artha ]; }; } diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs index e937e74..63845b3 100644 --- a/gui/conf/xmonad.hs +++ b/gui/conf/xmonad.hs @@ -102,6 +102,8 @@ scratchpads host = (customFloating $ hideScreenBorder host dropDownLarge) , NS "documentation" "zeal" (className =? "Zeal") (customFloating $ hideScreenBorder host dropDown) + , NS "thesaurus" "artha" (className =? "Artha") + (customFloating $ hideScreenBorder host sideBarLeft) , NS "messaging" "telegram-desktop" ((className =? "TelegramDesktop") <&&> (title /=? "Media viewer")) (customFloating $ hideScreenBorder host sideBarRight) ] @@ -163,6 +165,7 @@ commonKeybindings host = -- scratchpads , ("M-b" , namedScratchpadAction (scratchpads host) "browser") , ("M-d" , namedScratchpadAction (scratchpads host) "documentation") + , ("M-t" , namedScratchpadAction (scratchpads host) "thesaurus") , ("M-m" , namedScratchpadAction (scratchpads host) "messaging") ] ++ -- workspace selection [ (p ++ [k] , windows $ f i) | (i, k) <- zip Main.workspaces ['1' .. '9'] diff --git a/gui/gtk.nix b/gui/gtk.nix index 53f8c3b..d3226d1 100644 --- a/gui/gtk.nix +++ b/gui/gtk.nix @@ -69,7 +69,7 @@ in { }; home.sessionVariables = { - GDK_SCALE = "2"; - GDK_DPI_SCALE = "0.5"; + GDK_SCALE = "2"; + GDK_DPI_SCALE = "0.5"; }; } -- cgit v1.2.3 From b6fb8d0ad3993eccb812750125252dda1764d074 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 31 Jan 2019 20:52:34 +0100 Subject: Extract hidpi support --- gui/conf/xmonad.hs | 11 ++++++++--- gui/gtk.nix | 7 +------ gui/hidpi.nix | 27 +++++++++++++++++++++++++++ gui/rofi.nix | 1 - gui/twmn.nix | 8 ++++---- host/athena.nix | 11 +---------- 6 files changed, 41 insertions(+), 24 deletions(-) create mode 100644 gui/hidpi.nix 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 - ''; } -- cgit v1.2.3 From 2733f920ff4575c571e5570f7ebd551f8769730a Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 31 Jan 2019 21:07:07 +0100 Subject: Make XMonad border width host dependent These host dependent changes are starting to get out of hand… --- gui/conf/xmonad.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs index 4e16d3f..bec0fff 100644 --- a/gui/conf/xmonad.hs +++ b/gui/conf/xmonad.hs @@ -238,7 +238,7 @@ main = do $ docks $ def { modMask = mod4Mask -- super key as modifier - , borderWidth = 6 + , borderWidth = borderWidthOn host , normalBorderColor = "#161616" , focusedBorderColor = "#909636" , keys = \c -> mkKeymap c (customKeybindings host) @@ -321,6 +321,11 @@ screenHeightOn host = case host of "majestix" -> 1050 "asterix" -> 768 "athena" -> 1440 +borderWidthOn host = case host of + "obelix" -> 3 + "majestix" -> 3 + "asterix" -> 3 + "athena" -> 6 decoHeightOn host = case host of "obelix" -> 20 "majestix" -> 20 -- cgit v1.2.3 From 09bcb2c8c920b93a462ca7ccb2da172afae6bfa2 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 31 Jan 2019 21:15:30 +0100 Subject: Set hidpi cursor size --- gui/hidpi.nix | 2 ++ gui/xmonad.nix | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gui/hidpi.nix b/gui/hidpi.nix index 36898e2..313b3ec 100644 --- a/gui/hidpi.nix +++ b/gui/hidpi.nix @@ -16,6 +16,8 @@ Xft.rgba: rgb ''; + xsession.pointerCursor.size = 48; + home.file.".config/twmn/twmn.conf".text = '' font_size=24 height=32 diff --git a/gui/xmonad.nix b/gui/xmonad.nix index 3686cd0..25df5e3 100644 --- a/gui/xmonad.nix +++ b/gui/xmonad.nix @@ -13,7 +13,7 @@ pointerCursor = { package = pkgs.vanilla-dmz; name = "Vanilla-DMZ-AA"; - size = 48; + size = 16; }; windowManager.xmonad = { -- cgit v1.2.3 From 259408dd40cffbc46400e182f366b2e139a07950 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 31 Jan 2019 21:23:09 +0100 Subject: Explicity define some lowdpi values --- gui/hidpi.nix | 3 +-- gui/twmn.nix | 6 ++---- gui/xmonad.nix | 1 - host/asterix.nix | 1 + host/athena.nix | 2 +- host/obelix.nix | 1 + 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/gui/hidpi.nix b/gui/hidpi.nix index 313b3ec..5ea63c2 100644 --- a/gui/hidpi.nix +++ b/gui/hidpi.nix @@ -16,9 +16,8 @@ Xft.rgba: rgb ''; - xsession.pointerCursor.size = 48; - home.file.".config/twmn/twmn.conf".text = '' + [gui] font_size=24 height=32 ''; diff --git a/gui/twmn.nix b/gui/twmn.nix index fc90ec6..e2dcbcb 100644 --- a/gui/twmn.nix +++ b/gui/twmn.nix @@ -25,8 +25,6 @@ }; home.file.".config/twmn/twmn.conf".text = '' - [main] - duration=5000 [gui] always_on_top=true background_color=#909737 @@ -40,7 +38,7 @@ out_animation_duration=500 position=bottom_right screen=0 - font_size=15 - height=20 + [main] + duration=5000 ''; } diff --git a/gui/xmonad.nix b/gui/xmonad.nix index 25df5e3..337131c 100644 --- a/gui/xmonad.nix +++ b/gui/xmonad.nix @@ -13,7 +13,6 @@ pointerCursor = { package = pkgs.vanilla-dmz; name = "Vanilla-DMZ-AA"; - size = 16; }; windowManager.xmonad = { diff --git a/host/asterix.nix b/host/asterix.nix index ea19353..1830779 100644 --- a/host/asterix.nix +++ b/host/asterix.nix @@ -3,6 +3,7 @@ { imports = [ ../gui/default.nix + ../gui/lowdpi.nix ../gui/autorandr.nix ../gui/networkmanager.nix ]; diff --git a/host/athena.nix b/host/athena.nix index 0f5a8a4..4e8a824 100644 --- a/host/athena.nix +++ b/host/athena.nix @@ -3,8 +3,8 @@ { imports = [ ../gui/default.nix - ../gui/networkmanager.nix ../gui/hidpi.nix + ../gui/networkmanager.nix ../gui/stalonetray.nix ../gui/redshift.nix ../gui/touchegg.nix diff --git a/host/obelix.nix b/host/obelix.nix index bfd3522..8bbb62a 100644 --- a/host/obelix.nix +++ b/host/obelix.nix @@ -3,5 +3,6 @@ { imports = [ ../gui/default.nix + ../gui/lowdpi.nix ]; } -- cgit v1.2.3