From 830a7d1387aeb404cb5312a84739960946478bac Mon Sep 17 00:00:00 2001 From: azahi Date: Mon, 15 Oct 2018 22:01:39 +0300 Subject: Modify keybindings Fix music player scratchpad Add abilities to recompile and restart from the running xmonad session --- src/XMonad/Custom/Bindings.hs | 4 ++-- src/XMonad/Custom/Misc.hs | 14 ++++++++------ src/XMonad/Custom/Scratchpads.hs | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) (limited to 'src/XMonad/Custom') diff --git a/src/XMonad/Custom/Bindings.hs b/src/XMonad/Custom/Bindings.hs index b31599a..9400de7 100644 --- a/src/XMonad/Custom/Bindings.hs +++ b/src/XMonad/Custom/Bindings.hs @@ -122,8 +122,8 @@ rawKeys c = withUpdatePointer $ concatMap ($ c) keymaps where keysBase :: XConfig Layout -> [(String, X ())] keysBase _ = [ ("M-S-q" , confirmPrompt hotPromptTheme "Quit XMonad?" $ io exitSuccess) - -- [ ("M-q" $ spawn "xmonad-ng --restart") - -- , ("M-C-q" $ spawn "xmonad-ng --recompile && xmonad-ng --restart"') + , ("M-q" , spawn "xmonad --restart") + , ("M-C-q" , spawn "xmonad --recompile && xmonad --restart") , ("M-x" , shellPrompt promptTheme) , ("M-w" , windowPrompt promptTheme Goto allWindows) , ("M-S-w" , windowPrompt promptTheme Bring allWindows) diff --git a/src/XMonad/Custom/Misc.hs b/src/XMonad/Custom/Misc.hs index 584fe2d..5d22063 100644 --- a/src/XMonad/Custom/Misc.hs +++ b/src/XMonad/Custom/Misc.hs @@ -18,18 +18,20 @@ module XMonad.Custom.Misc ) where data Applications = Applications - { term :: !String - , browser :: !String - , top :: !String + { browser :: !String , mixer :: !String , notify :: !String + , player :: !String + , term :: !String + , top :: !String } deriving (Eq, Show) applications :: Applications applications = Applications - { term = "urxvtc" - , browser = "qutebrowser" - , top = "htop" + { browser = "qutebrowser" , mixer = "alsamixer" , notify = "notify-send" + , player = "ncmpcpp" + , term = "urxvtc" + , top = "htop" } diff --git a/src/XMonad/Custom/Scratchpads.hs b/src/XMonad/Custom/Scratchpads.hs index d463b87..9424f7b 100644 --- a/src/XMonad/Custom/Scratchpads.hs +++ b/src/XMonad/Custom/Scratchpads.hs @@ -42,7 +42,7 @@ scratchpads = (title =? "NSPVolume") floatingNSP , NS "music" - (spawnTerminalWith "NSPMusic" "mp") + (spawnTerminalWith "NSPMusic" (C.player C.applications)) (title =? "NSPMusic") floatingNSP , NS "top" -- cgit 1.4.1