From b1c0507f832325d383e0ec5e357b85fc546cf969 Mon Sep 17 00:00:00 2001 From: Vic Fryzel Date: Thu, 10 Sep 2015 11:02:12 -0700 Subject: [PATCH] Reorganizing shortcut commands of xmonad.hs to be easier to configure. --- xmonad.hs | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/xmonad.hs b/xmonad.hs index 53ba252..e476ee6 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -27,6 +27,20 @@ import qualified Data.Map as M -- myTerminal = "/usr/bin/gnome-terminal" +-- The command to lock the screen or show the screensaver. +myScreensaver = "/usr/bin/gnome-screensaver-command --lock" + +-- The command to take a selective screenshot, where you select +-- what you'd like to capture on the screen. +mySelectScreenshot = "select-screenshot" + +-- The command to take a fullscreen screenshot. +myScreenshot = "screenshot" + +-- The command to use as a launcher, to launch commands that don't have +-- preset keybindings. +myLauncher = "$(yeganesh -x -- -fn '-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859-*' -nb '#000000' -nf '#FFFFFF' -sb '#7C7C7C' -sf '#CEFFAC')" + ------------------------------------------------------------------------ -- Workspaces @@ -129,30 +143,22 @@ myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $ [ ((modMask .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf) - -- Lock the screen using xscreensaver. + -- Lock the screen using command specified by myScreensaver. , ((modMask .|. controlMask, xK_l), - spawn "xscreensaver-command -lock") + spawn myScreensaver) - -- Launch dmenu via yeganesh. + -- Spawn the launcher using command specified by myLauncher. -- Use this to launch programs without a key binding. , ((modMask, xK_p), - spawn "$(yeganesh -x -- -fn '-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859-*' -nb '#000000' -nf '#FFFFFF' -sb '#7C7C7C' -sf '#CEFFAC')") + spawn myLauncher) - -- Take a screenshot in select mode. - -- After pressing this key binding, click a window, or draw a rectangle with - -- the mouse. + -- Take a selective screenshot using the command specified by mySelectScreenshot. , ((modMask .|. shiftMask, xK_p), - spawn "select-screenshot") + spawn mySelectScreenshot) - -- Take full screenshot in multi-head mode. - -- That is, take a screenshot of everything you see. + -- Take a full screenshot using the command specified by myScreenshot. , ((modMask .|. controlMask .|. shiftMask, xK_p), - spawn "screenshot") - - -- Fetch a single use password. - , ((modMask .|. shiftMask, xK_o), - spawn "fetchotp -x") - + spawn myScreenshot) -- Mute volume. , ((modMask .|. controlMask, xK_m),