From c64b0a5eb6de97da0d7bb9f744b61e88291bb062 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 10 Jan 2022 11:37:29 -0700 Subject: Fix sending the SIGUSR to Xmobar syntax --- src/Internal/Keys.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Internal') diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index d4a856c..44a7c9f 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -68,7 +68,7 @@ keymap = runKeys $ do -- something goes wrong with the keyboard layout and for first-time boots -- where dmenu/alacritty may not be installed. rawMask mod4Mask $ spawn "xterm" - justMod $ spawn "pkill -SIGUSR 1 xmobar" + justMod $ spawn "pkill -SIGUSR1 xmobar" bind xK_F1 $ do -- Button programmed on mouse -- cgit From 665d9c0afeb46035959d9b16de4f7010a812a354 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 10 Jan 2022 11:44:08 -0700 Subject: Add script to set the PulseAudio sink for the current window. This binding is set to a. It creates a dmenu prompting the user to select which output device the current application should send audio to. In the future I might create an analog for input devices, but as things stand, I change input so much more infrequently that pavucontrol is probably fine for that. --- src/Internal/Keys.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Internal') diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index 44a7c9f..fc0244b 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -233,6 +233,9 @@ keymap = runKeys $ do bind xK_e $ (justMod -|- noMod) $ spawn "emoji-select.sh" + + bind xK_a $ + (justMod -|- noMod) $ spawn "set-sink.sh" -- Double-tap Z to toggle zoom. -- cgit From 0e4b0187167e43c3c00371cbcca5cc892521bdb2 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 10 Jan 2022 14:57:47 -0700 Subject: Add emoticon-select. It's the same as emoji select, but with emoticons. Key bound to E (capital E, as opposed to e for emojis) --- src/Internal/Keys.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Internal') diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index fc0244b..bf9b62c 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -231,8 +231,9 @@ keymap = runKeys $ do bind xK_c $ do shiftMod CopyWindow.killAllOtherCopies - bind xK_e $ + bind xK_e $ do (justMod -|- noMod) $ spawn "emoji-select.sh" + (shiftMod -|- rawMask shiftMask) $ spawn "emoticon-select.sh" bind xK_a $ (justMod -|- noMod) $ spawn "set-sink.sh" -- cgit From 863514ef9c4da3cce8410f89e1b4c547cc31cf6f Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 10 Jan 2022 21:22:19 -0700 Subject: Convert run menus over to Rofi. This makes things prettier and rofi is more feature rich than DMenu. --- src/Internal/DMenu.hs | 13 ++++++------- src/Internal/PassMenu.hs | 8 +++----- 2 files changed, 9 insertions(+), 12 deletions(-) (limited to 'src/Internal') diff --git a/src/Internal/DMenu.hs b/src/Internal/DMenu.hs index 850612e..360ad58 100644 --- a/src/Internal/DMenu.hs +++ b/src/Internal/DMenu.hs @@ -8,6 +8,7 @@ import Data.Map (Map) import qualified Data.Map as Map import XMonad.Util.Run import Data.List (intercalate) +import Text.Printf (printf) data Colors = Colors { @@ -17,8 +18,7 @@ data Colors = runDMenu :: X () runDMenu = void $ - safeSpawn "dmenu_run" [ - "-p", "Execute ", "-l", "12", "-dim", "0.4"] + safeSpawn "rofi" ["-p", "Execute ", "-show", "run"] runDMenuPrompt :: String -> Maybe String -> [String] -> X String runDMenuPrompt prompt color select = @@ -32,8 +32,7 @@ runDMenuPrompt prompt color select = runDMenuPromptWithMap :: String -> Maybe String -> Map String a -> X (Maybe a) runDMenuPromptWithMap prompt color map = do - let realColor = maybe [] (\c -> ["-sb", c, "-nf", c]) color - menuMapArgs "dmenu"([ - "-p", prompt, - "-l", "12", - "-dim", "0.4" ] ++ realColor) map + let realColor = maybe [] ( + \c -> ["-theme-str", printf "* {theme-color: %s;}" c]) color + menuMapArgs "rofi" + (["-p", prompt, "-dmenu"] ++ realColor) map diff --git a/src/Internal/PassMenu.hs b/src/Internal/PassMenu.hs index 7374bed..bb3bc4d 100644 --- a/src/Internal/PassMenu.hs +++ b/src/Internal/PassMenu.hs @@ -6,10 +6,8 @@ import Control.Monad runPassMenu :: X () runPassMenu = void $ - safeSpawn "passmenu" [ + safeSpawn "rofi-pass" [ "-p", "Password ", - "-l", "12", - "-dim", "0.4", - "-sb", "#f54245", - "-nf", "#f54245" ] + "-theme-str", + "* {theme-color: #f54245;}"] -- cgit From 45e294be50d35cafbddf47ba4ec0301067a2eb76 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 10 Jan 2022 21:38:34 -0700 Subject: minor changes with rofi --- src/Internal/DMenu.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Internal') diff --git a/src/Internal/DMenu.hs b/src/Internal/DMenu.hs index 360ad58..f964544 100644 --- a/src/Internal/DMenu.hs +++ b/src/Internal/DMenu.hs @@ -18,7 +18,7 @@ data Colors = runDMenu :: X () runDMenu = void $ - safeSpawn "rofi" ["-p", "Execute ", "-show", "run"] + safeSpawn "rofi" ["-display-run", "Execute", "-show", "run"] runDMenuPrompt :: String -> Maybe String -> [String] -> X String runDMenuPrompt prompt color select = -- cgit