From 1b366226dea65301510bf5dceab0196d95b0d4dd Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Thu, 1 Feb 2024 23:42:25 -0700 Subject: Add Firefox to the browsers list --- src/Rahm/Desktop/Keys.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Rahm/Desktop/Keys.hs b/src/Rahm/Desktop/Keys.hs index 0bf3ba0..3655e3c 100644 --- a/src/Rahm/Desktop/Keys.hs +++ b/src/Rahm/Desktop/Keys.hs @@ -1377,7 +1377,7 @@ windowSpecificBindings config = do noMod $ emitKey (controlMask, xK_F2) where - browsers = ["Google-chrome", "Brave-browser", "firefox-default"] + browsers = ["Google-chrome", "Brave-browser", "firefox-default", "Firefox"] spotify = ["Spotify"] -- Create a permutation from a list of modifiers. -- cgit From e563fb7dfe0c43cec679deaae82bc0a1e2aa056e Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sat, 3 Feb 2024 16:27:48 -0700 Subject: Change some formatting around xmobar. --- extras/HOME/.xmobarrc | 20 ++++++++++---------- xmobar/extras/weather/src/Main.hs | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/extras/HOME/.xmobarrc b/extras/HOME/.xmobarrc index 36989d7..674adc6 100644 --- a/extras/HOME/.xmobarrc +++ b/extras/HOME/.xmobarrc @@ -1,15 +1,15 @@ Config - { font = "Monofur Nerd Font 12", + { font = "Monofur Nerd Font 14", additionalFonts = - [ "Monofur NERD Font Bold 10", - "Monofur NERD Font Bold 7", - "Monofur NERD Font Bold 10", -- Media, Weather, etc. - "Monofur NERD Font Bold 10", - "Monofur NERD Font Bold 18", + [ "Monofur NERD Font Bold 12", + "Monofur NERD Font Bold 9", + "Monofur NERD Font Bold 12", -- Media, Weather, etc. "Monofur NERD Font Bold 12", - "Noto Sans Mono CJK JP Bold 12", - "Monofur NERD Font Bold 12", - "Monofur NERD Font Bold 3" + "Monofur NERD Font Bold 20", + "Monofur NERD Font Bold 14", + "Noto Sans Mono CJK JP Bold 14", + "Monofur NERD Font Bold 14", + "Monofur NERD Font Bold 5" ], borderColor = "black", border = FullBM -1, @@ -17,7 +17,7 @@ Config bgColor = "#000000", fgColor = "white", alpha = 255, -- default: 255 - position = TopSize C 99 40, + position = TopSize C 99 60, textOffset = -1, -- default: -1 iconOffset = -1, -- default: -1 lowerOnStart = True, diff --git a/xmobar/extras/weather/src/Main.hs b/xmobar/extras/weather/src/Main.hs index ccabc21..aff669a 100644 --- a/xmobar/extras/weather/src/Main.hs +++ b/xmobar/extras/weather/src/Main.hs @@ -180,7 +180,7 @@ handleWeather w = execWriter $ do tell " " tell $ lightGrey $ fn 3 $ windspeedMiles (currentCondition w) ++ "mph" - tell " " + tell " " let conditions = if isNight then conditionsIconNight else conditionsIconDay tell $ @@ -188,7 +188,7 @@ handleWeather w = execWriter $ do fromMaybe "?" $ findMatch (map Data.Char.toLower $ weatherDesc (currentCondition w)) conditions - tell " " + tell " " tell $ lightGrey $ fn 3 $ printf "%s°F" (tempF $ currentCondition w) where isNight = -- cgit From b7a2ff355d7734fc19e12befbd53b139661f6c32 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sat, 3 Feb 2024 16:46:43 -0700 Subject: Added xmobar wifi. --- extras/HOME/.xmobarrc | 5 ++++- extras/HOME/.xmonad/xmobar-wifi | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 extras/HOME/.xmonad/xmobar-wifi diff --git a/extras/HOME/.xmobarrc b/extras/HOME/.xmobarrc index 674adc6..3367918 100644 --- a/extras/HOME/.xmobarrc +++ b/extras/HOME/.xmobarrc @@ -33,8 +33,10 @@ Config " %logo% \ \%UnsafeStdinReader%}{\ \\ + \|\ + \ %wifi% \ \\ - \| %weather% \ + \ %weather% \ \\ \%media%\ \%bluetooth% %bat% %cpu% %memory% %time% ", @@ -86,6 +88,7 @@ Config Run Com ".xmonad/xmobar-logo" [] "logo" 0, Run Com "uname" ["-r"] "uname" 0, Run Com ".xmonad/xmobar-bluetooth" [] "bluetooth" 50, + Run Com ".xmonad/xmobar-wifi" [] "wifi" 50, Run Com ".xmonad/xmobar-battery" [] "bat" 20 ] } diff --git a/extras/HOME/.xmonad/xmobar-wifi b/extras/HOME/.xmonad/xmobar-wifi new file mode 100755 index 0000000..bc55725 --- /dev/null +++ b/extras/HOME/.xmonad/xmobar-wifi @@ -0,0 +1,14 @@ +#!/bin/bash + +runtime_dir=$XDG_RUNTIME_DIR/rde/vars/ +mkdir -p $runtime_dir + + +wifi="$(nmcli connection show --active | grep "wifi")" + +if [[ -z "$wifi" ]] ; then + echo " " +else + name=${wifi/ */} + echo " $name" +fi -- cgit From 464752ba36ad309606b6a9f63cd7c7fffa967a42 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sat, 3 Feb 2024 16:56:37 -0700 Subject: Reverse keybindings between xK_x and Space,xK_x --- src/Rahm/Desktop/Keys.hs | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/Rahm/Desktop/Keys.hs b/src/Rahm/Desktop/Keys.hs index 3655e3c..5801808 100644 --- a/src/Rahm/Desktop/Keys.hs +++ b/src/Rahm/Desktop/Keys.hs @@ -703,23 +703,12 @@ bindings = do altMod $ spawnX "sudo -A systemctl suspend && xsecurelock" bind xK_x $ do - shiftMod $ - doc "Reset the holes" $ do - logs Debug "reset hole" - sendMessage resetHole - logs Debug "/reset hole" - justMod $ - doc "Add hole next to the current window" $ do - logs Debug "Add hole" - withFocused $ \foc -> - withWindowSet $ \ws -> do - logs Debug "/Add hole at %s" (show foc) - whenJust (W.windowTilePosition foc ws) $ \tp -> do - logs Debug "Tile position: %s" (show tp) - (X.broadcastMessage . addHole) tp - refresh - logs Debug "/Add hole" + doc "Toggles respect for struts." $ + sendMessage ToggleStruts + shiftMod $ + doc "Remove the border from the focused window" $ + withFocused $ setBorderWidth 0 . (: []) bind xK_space $ do justMod $ @@ -765,14 +754,6 @@ bindings = do doc "Jump to the middle layout." $ sendMessage (toIndexedLayout (nLayouts `div` 2)) - bind xK_x $ do - justMod $ - doc "Toggles respect for struts." $ - sendMessage ToggleStruts - shiftMod $ - doc "Remove the border from the focused window" $ - withFocused $ setBorderWidth 0 . (: []) - bind xK_g $ (noMod -|- justMod) $ doc @@ -793,6 +774,25 @@ bindings = do [' '] -> restoreTheater Nothing _ -> return () + bind xK_x $ do + shiftMod $ + doc "Reset the holes" $ do + logs Debug "reset hole" + sendMessage resetHole + logs Debug "/reset hole" + + justMod $ + doc "Add hole next to the current window" $ do + logs Debug "Add hole" + withFocused $ \foc -> + withWindowSet $ \ws -> do + logs Debug "/Add hole at %s" (show foc) + whenJust (W.windowTilePosition foc ws) $ \tp -> do + logs Debug "Tile position: %s" (show tp) + (X.broadcastMessage . addHole) tp + refresh + logs Debug "/Add hole" + let spaceResize = repeatable $ do bind xK_bracketright $ do noMod $ -- cgit