Skip to content

Commit

Permalink
Reorganizing shortcut commands of xmonad.hs to be easier to configure.
Browse files Browse the repository at this point in the history
  • Loading branch information
vicfryzel committed Sep 10, 2015
1 parent 0a83fb4 commit b1c0507
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions xmonad.hs
Expand Up @@ -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
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit b1c0507

Please sign in to comment.