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 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'gui/conf') 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) -- 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 ++ 1 file changed, 2 insertions(+) (limited to 'gui/conf') 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 -- 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 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui/conf') 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) -- 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 ++++++++++--------- 2 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 gui/conf/touchegg.conf (limited to 'gui/conf') 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) -- 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/conf/xmonad.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gui/conf') 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'] -- 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 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gui/conf') 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 -- 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(-) (limited to 'gui/conf') 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