Skip to content

Instantly share code, notes, and snippets.

@gilbertw1
Created July 24, 2017 16:11
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save gilbertw1/c33e79eb76fcb5a47411da881c621639 to your computer and use it in GitHub Desktop.
Save gilbertw1/c33e79eb76fcb5a47411da881c621639 to your computer and use it in GitHub Desktop.
Config {
font = "xft:Hack:size=9.5:bold:antialias=true"
, bgColor = "#282c34"
, fgColor = "#bbc2cf"
, position = TopW L 94
, commands = [ Run Cpu ["-t", "<fc=#a9a1e1><icon=/home/gilbertw1/.xmonad/icons/cpu.xbm/></fc> <total>%", "-L","3","-H","50","-l","#bbc2cf","-n","#bbc2cf","-h","#fb4934"] 50
, Run Memory ["-t","<fc=#51afef><icon=/home/gilbertw1/.xmonad/icons/mem.xbm/></fc> <usedratio>%","-H","80","-L","10","-l","#bbc2cf","-n","#bbc2cf","-h","#fb4934"] 50
, Run Date "%a %b %_d %k:%M" "date" 300
, Run DynNetwork ["-t","<fc=#4db5bd><icon=/home/gilbertw1/.xmonad/icons/arrow_down.xbm/></fc> <rx>, <fc=#c678dd><icon=/home/gilbertw1/.xmonad/icons/arrow_up.xbm/></fc> <tx>","-H","200","-L","10","-h","#bbc2cf","-l","#bbc2cf","-n","#bbc2cf"] 50
, Run CoreTemp ["-t", "<fc=#CDB464><icon=/home/gilbertw1/.xmonad/icons/temp.xbm/></fc> <core0>°", "-L", "30", "-H", "75", "-l", "lightblue", "-n", "#bbc2cf", "-h", "#aa4450"] 50
, Run Com "network-check.sh" [] "netcheck" 50
-- battery monitor
, Run BatteryP [ "BAT0" ]
[ "--template" , "<fc=#B1DE76><icon=/home/gilbertw1/.xmonad/icons/battery.xbm/></fc> <acstatus>"
, "--Low" , "10" -- units: %
, "--High" , "80" -- units: %
, "--low" , "#fb4934" -- #ff5555
, "--normal" , "#bbc2cf"
, "--high" , "#98be65"
, "--" -- battery specific options
-- discharging status
, "-o" , "<left>% (<timeleft>)"
-- AC "on" status
, "-O" , "<left>% (<fc=#98be65>Charging</fc>)" -- 50fa7b
-- charged status
, "-i" , "<fc=#98be65>Charged</fc>"
] 50
, Run StdinReader
]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader% }{ %cpu% | %coretemp% | %memory% | %battery% | %dynnetwork% (%netcheck%) | <fc=#ECBE7B>%date%</fc>" -- #69DFFA
}
Xft.dpi: 150
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.hintstyle: hintslight
rofi.color-enabled: true
rofi.font: Hack Bold 16
rofi.modi: window,run,ssh
rofi.opacity: 90
rofi.kb-remove-to-eol: Control+Shift+k
rofi.kb-accept-entry: Control+m,Return,KP_Enter
rofi.kb-row-up: Up,Control+p,Shift+Tab,Shift+ISO_Left_Tab,Control+k
rofi.kb-row-down: Down,Control+n,Control+j
rofi.terminal: termite
rofi.run-shell-command: /usr/bin/termite -e '{cmd}'
rofi.ssh-command: {terminal} -e "{ssh-client} {host}"
URxvt.scrollBar: false
URxvt.font: xft:Hack:size=10.5
URxvt.url-launcher: /usr/bin/firefox-developer
URxvt*loginShell: true
URxvt*fading: 25
URxvt.internalBorder: 0
URxvt.externalBorder: 0
URxvt.secondaryScreen: 1
URxvt.secondaryScroll: 0
URxvt.depth: 32
!URxvt*background: #222222
! #5f656b
! #222222
! #101218
!URxvt*foreground: #d1d4e0
URxvt*cursorColor: #d1d4e0
URxvt*scrollColor: #d1d4e0
URxvt*highlightColor: #252936
URxvt*highlightTextColor: #C0C5CE
! Colors
#include </home/gilbertw1/.termcolors/doom-one>
*color17: #000F1F
*color18: #210000
*color19: #171600
*colour17: #000F1F
*colour18: #210000
*colour19: #171600
URxvt.perl-ext-common: default,matcher,clipboard
URxvt.iso14755: False
URxvt.keysym.Shift-Control-C: perl:clipboard:copy
URxvt.keysym.Shift-Control-V: perl:clipboard:paste
URxvt.clipboard.copycmd: xsel -ib
URxvt.clipboard.pastecmd: xsel -ob
urxvt*perl-lib: /usr/lib/urxvt/perl/
urxvt*matcher.button: 1
urxvt*matcher.pattern.1: \\bwww\\.[\\w-]+\\.[\\w./?&@#-]*[\\w/-]
! xscreensaver
xscreensaver.dateFormat:
xscreensaver.passwd.body.label:
xscreensaver.passwd.heading.label:
xscreensaver.passwd.login.label:
xscreensaver.passwd.thermometer.width: 2
xscreensaver.passwd.uname: True
xscreensaver.passwd.unlock.label:
xscreensaver.Dialog.background: #282A36
xscreensaver.Dialog.foreground: #ffffff
xscreensaver.Dialog.Button.background: #282A36
xscreensaver.Dialog.Button.foreground: #ffffff
xscreensaver.Dialog.text.background: #282A36
xscreensaver.Dialog.text.foreground: #ffffff
xscreensaver.Dialog.shadowThickness: 1
xscreensaver.Dialog.topShadowColor: #282A36
xscreensaver.Dialog.bottomShadowColor: #282A36
xscreensaver.Dialog.headingFont: -*-hack-bold-r-*-*-20-*-*-*-*-*-*-*
xscreensaver.Dialog.bodyFont: -*-hack-medium-r-*-*-20-*-*-*-*-*-*-*
xscreensaver.Dialog.labelFont: -*-hack-medium-r-*-*-20-*-*-*-*-*-*-*
xscreensaver.Dialog.unameFont: -*-hack-medium-r-*-*-20-*-*-*-*-*-*-*
xscreensaver.Dialog.buttonFont: -*-hack-bold-r-*-*-20-*-*-*-*-*-*-*
xscreensaver.Dialog.dateFont: -*-hack-medium-r-*-*-20-*-*-*-*-*-*-*
xscreensaver.passwd.passwdFont: -*-hack-bold-r-*-*-20-*-*-*-*-*-*-*
*.color0: #1E2127
*.color8: #5C6370
*.color1: #CC626A
*.color9: #E06C75
*.color2: #98C379
*.color10: #A7D685
*.color3: #da8548
*.color11: #ECBE7B
*.color4: #3E86B8
*.color12: #51afef
*.color5: #a9a1e1
*.color13: #C678DD
*.color6: #4db5bd
*.color14: #56B6C2
*.color7: #ABB2BF
*.color15: #FFFFFF
*.foreground: #ABB2BF
*.cursorColor: #5C6370
*.background: #282c34
# vim: ft=cfg
# Template: http://twily.info/.config/dunst/dunstrc/
[global]
font = Hack 10
# Allow a small subset of html markup:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
# If markup is not allowed, those tags will be stripped out of the
# message.
allow_markup = yes
# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# Markup is allowed
format = "<b>%s</b> (%a)\n--------------------------------------------------\n%b"
#format = "<b>%s</b>\n%b"
#format = "%s\n%b"
# Sort messages by urgency.
sort = yes
# Show how many messages are currently hidden (because of geometry).
indicate_hidden = yes
# Alignment of message text.
Possible values are "left", "center" and "right".
alignment = left
# The frequency with wich text that is longer than the notification
# window allows bounces back and forth.
# This option conflicts with "word_wrap".
# Set to 0 to disable.
bounce_freq = 0
# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 60
# Split notifications into multiple lines if they don't fit into
# geometry.
word_wrap = yes
# Ignore newlines '\n' in notifications.
ignore_newline = no
# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
# The geometry of the message window.
# The height is measured in number of notifications everything else
# in pixels. If the width is omitted but the height is given
# ("-geometry x2"), the message window expands over the whole screen
# (dmenu-like). If width is 0, the window expands to the longest
# message displayed. A positive x is measured from the left, a
# negative from the right side of the screen. Y is measured from
# the top and down respectevly.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "800x200-24+48"
# Shrink window if it's smaller than the width. Will be ignored if
# width is 0.
shrink = no
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing windowmanager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 0
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
idle_threshold = 120
# Which monitor should the notifications be displayed on.
monitor = 0
# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything
#
# "keyboard" needs a windowmanager that exports the
# _NET_ACTIVE_WINDOW property.
# This should be the case for almost all modern windowmanagers.
#
# If this option is set to mouse or keyboard, the monitor option
# will be ignored.
follow = mouse
# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = yes
# Maximum amount of notifications kept in history
history_length = 20
# Display indicators for URLs (U) and actions (A).
show_indicators = yes
# The height of a single line. If the height is smaller than the
# font height, it will get raised to the font height.
# This adds empty space above and under the text.
line_height = 0
# Draw a line of "separatpr_height" pixel height between two
# notifications.
# Set to 0 to disable.
separator_height = 4
# Padding between text and separator.
padding = 20
# Horizontal padding.
horizontal_padding = 20
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = frame
# Print a notification on startup.
# This is mainly for error detection, since dbus (re-)starts dunst
# automatically after a crash.
startup_notification = false
# dmenu path.
dmenu = /usr/bin/dmenu -p dunst:
# Browser for opening urls in context menu.
browser = /usr/bin/firefox -new-tab
# Align icons left/right/off
icon_position = off
# Paths to default icons.
icon_folders = /usr/share/icons/Papirus-Dark/24x24/status/:/usr/share/icons/Papirus-Dark/24x24/devices
[frame]
width = 4
color = "#98C379"
[shortcuts]
# Shortcuts are specified as [modifier+][modifier+]...key
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
# "mod3" and "mod4" (windows-key).
# Xev might be helpful to find names for keys.
# Close notification.
close = mod4+x
# Close all notifications.
close_all = mod4+ctrl+x
# Redisplay last message(s).
# On the US keyboard layout "grave" is normally above TAB and left
# of "1".
history = mod4+shift+period
# Context menu.
context = ctrl+shift+period
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#282c34"
foreground = "#bbc2cf"
timeout = 10
[urgency_normal]
background = "#282c34"
foreground = "#bbc2cf"
timeout = 20
[urgency_critical]
background = "#2B0000"
foreground = "#bbc2cf"
timeout = 0
[irc]
appname = "weechat"
format = "%s: %b"
[notify-send]
appname = "notify-send"
format = "%s\n%b"
urgency = low
colors_enabled = yes
empty_tag_color = 13:b
header_window_color = 13
volume_color = 12:b
state_line_color = 13:b
state_flags_color = 13:b
main_window_color = 13
color1 = 13:b
color2 = 13:b
progressbar_color = 13:b
progressbar_elapsed_color = 11:b
statusbar_color = 13
statusbar_time_color = 6
player_state_color = 14:b
alternative_ui_separator_color = 13:b
window_border_color = 13
active_window_border = 13
browser_playlist_prefix = "$(13)playlist$(12) "
current_item_prefix = $(green)$r
song_columns_list_format = (20)[14]{a} (6f)[12]{NE} (50)[13]{t|f:Title} (20)[6]{b} (7f)[11]{l}
import System.Exit
import Data.Maybe (Maybe, isNothing, fromJust)
import qualified Data.List as L
import qualified Data.Map as M
import GHC.IO.Handle
-- Xmonad Core
import XMonad
import qualified XMonad.StackSet as W
import XMonad.Config.Desktop
-- Layouts
import XMonad.Layout.LayoutModifier
import XMonad.Layout.Gaps
import XMonad.Layout.Spacing
import XMonad.Layout.MultiToggle
import XMonad.Layout.NoBorders
import XMonad.Layout.MultiToggle.Instances
import XMonad.Layout.ResizableTile
import XMonad.Layout.BinarySpacePartition
import XMonad.Layout.SimpleFloat
import XMonad.Layout.PerWorkspace (onWorkspace)
import XMonad.Layout.Minimize
-- Actions
import XMonad.Actions.Navigation2D
import XMonad.Actions.GridSelect
import XMonad.Actions.UpdatePointer
import XMonad.Actions.SpawnOn
import XMonad.Actions.CycleWS
-- Hooks
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.SetWMName
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageDocks
-- Utils
import XMonad.Util.NamedScratchpad
import XMonad.Util.WorkspaceCompare
import XMonad.Util.Run
import XMonad.Util.EZConfig
-- Xmonad entry point
main = do
xmproc <- spawnPipe "/usr/bin/xmobar"
xmonad $ myConfig xmproc
-- Config
myConfig xmproc = withNavigation2DConfig def {
defaultTiledNavigation = centerNavigation
} $ def {
-- simple stuff
terminal = myTerminal,
focusFollowsMouse = myFocusFollowsMouse,
clickJustFocuses = myClickJustFocuses,
borderWidth = myBorderWidth,
modMask = myModMask,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
-- key bindings
keys = myKeys,
mouseBindings = myMouseBindings,
-- hooks, layouts
layoutHook = myLayout,
manageHook = myManageHook <+> manageHook desktopConfig,
handleEventHook = myEventHook <+> handleEventHook desktopConfig,
logHook = (myLogHook xmproc) <+> logHook desktopConfig,
startupHook = myStartupHook
} `additionalKeysP` addKeys
-- Log Hook Definition: Custom Xmobar Output + Update Pointer Hook
myLogHook :: Handle -> X ()
myLogHook xmproc = dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppCurrent = xmobarColor "#51afef" "" . wrap "[" "]" -- #9BC1B2 #69DFFA
, ppTitle = xmobarColor "#c678dd" "" . shorten 50 -- #9BC1B2 #69DFFA
, ppSort = fmap (.namedScratchpadFilterOutWorkspace) getSortByTag
, ppLayout = xmobarColor "#ECBE7B" "" . myIcons
} >> updatePointer (0.75, 0.75) (0.75, 0.75)
-- Use termite as terminal
myTerminal = "termite"
-- Window focus follows mouse
myFocusFollowsMouse = True
-- Clicking on widow focuses and passes the click forward
myClickJustFocuses = False
-- Width of the window border in pixels.
myBorderWidth = 4
-- Defines with mod key to use (mod4mask == super)
myModMask = mod4Mask
-- Define and name each workspace
myWorkspaces = ["1: TERM","2: WEB","3: CODE","4: COMM","5: MAIL","6: MEDIA","7: ETC"] ++ map show [8..8] ++ ["NSP"]
-- Set border color when unfocused
myNormalBorderColor = "#2C323C"
-- Set norder color when focused
myFocusedBorderColor = "#51afef"
-- Scratch Pads
myScratchpads = [NS "zeal" "zeal" (className =? "Zeal") (customFloating $ W.RationalRect (1/6) (1/6) (2/3) (2/3)),
NS "telegram" "telegram-desktop" ((className =? "Telegram") <||> (className =? "telegram-desktop") <||> (className =? "TelegramDesktop")) (customFloating $ W.RationalRect (1/6) (1/6) (2/3) (2/3)),
NS "termscratch" "termite --class=termscratch -e ~/bin/tmux-stream-dev.sh" (className =? "termscratch") (customFloating $ W.RationalRect (1/10) (1/10) (4/5) (4/5))]
-- Key bindings. Add, modify or remove key bindings here.
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- launch a terminal
[ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
-- launch thunar
, ((modm .|. shiftMask, xK_f ), spawn "thunar")
-- launch roficlip
, ((modm, xK_c ), spawn "roficlip")
, ((modm, xK_backslash ), spawn "roficlip")
-- launch rofi
, ((modm, xK_p ), spawn "rofi -show run")
, ((modm .|. shiftMask, xK_p ), spawn "rofi -show window")
-- launch zeal
, ((modm, xK_z ), namedScratchpadAction myScratchpads "zeal")
-- launch telegram
, ((modm, xK_F10 ), namedScratchpadAction myScratchpads "telegram")
-- close focused window
, ((modm .|. shiftMask, xK_c ), kill)
-- Grid Select
, ((modm, xK_g ), goToSelected def)
-- Rotate through the available layout algorithms
, ((modm, xK_space ), sendMessage NextLayout)
-- Reset the layouts on the current workspace to default
, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
-- Resize viewed windows to the correct size
, ((modm .|. shiftMask, xK_r ), refresh)
-- Move focus to the next window
, ((modm, xK_Tab ), windows W.focusDown)
-- Move to previous workspace
, ((modm, xK_grave ), toggleWS' ["NSP"])
-- Move focus to the next window
, ((modm .|. controlMask .|. shiftMask, xK_j ), windows W.focusDown)
-- Move focus to the previous window
, ((modm .|. controlMask .|. shiftMask, xK_k ), windows W.focusUp)
-- Minimize selected window
, ((modm, xK_m ), withFocused minimizeWindow)
-- Restore one minimized window
, ((modm .|. shiftMask, xK_m ), sendMessage RestoreNextMinimizedWin)
-- Maximize selected window
, ((modm, xK_f ), (sendMessage $ Toggle FULL))
-- Swap the focused window and the master window
, ((modm .|. controlMask, xK_Return), windows W.swapMaster)
-- Move focus to the master window
, ((modm, xK_Return ), windows W.focusMaster )
-- Swap the focused window with the next window
, ((modm .|. controlMask .|. shiftMask, xK_j ), windows W.swapDown )
-- Swap the focused window with the previous window
, ((modm .|. controlMask .|. shiftMask, xK_k ), windows W.swapUp )
-- Shrink the master area
, ((modm .|. controlMask, xK_h ), sendMessage Shrink)
, ((modm .|. controlMask, xK_j ), sendMessage MirrorShrink)
-- Expand the master area
, ((modm .|. controlMask, xK_l ), sendMessage Expand)
, ((modm .|. controlMask, xK_k ), sendMessage MirrorExpand)
-- Toggle Brightness
, ((modm, xK_minus ), spawn "light -U 5")
, ((modm, xK_equal ), spawn "light -A 5")
-- Push window back into tiling
, ((modm, xK_t ), withFocused $ windows . W.sink)
-- Increment the number of windows in the master area
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
-- Decrement the number of windows in the master area
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
, ((modm , xK_BackSpace), swapNextScreen)
-- Switch workspaces and screens
, ((modm, xK_Right), moveTo Next (WSIs hiddenNotNSP))
, ((modm, xK_Left), moveTo Prev (WSIs hiddenNotNSP))
, ((modm .|. shiftMask, xK_Right), shiftTo Next (WSIs hiddenNotNSP))
, ((modm .|. shiftMask, xK_Left), shiftTo Prev (WSIs hiddenNotNSP))
, ((modm, xK_Down), nextScreen)
, ((modm, xK_Up), prevScreen)
, ((modm .|. shiftMask, xK_Down), shiftNextScreen)
, ((modm .|. shiftMask, xK_Up), shiftPrevScreen)
-- Binary Space Partition Functions
, ((modm .|. altMask, xK_l ), sendMessage $ ExpandTowards R)
, ((modm .|. altMask, xK_h ), sendMessage $ ExpandTowards L)
, ((modm .|. altMask, xK_j ), sendMessage $ ExpandTowards D)
, ((modm .|. altMask, xK_k ), sendMessage $ ExpandTowards U)
, ((modm .|. altMask .|. shiftMask, xK_l ), sendMessage $ ShrinkFrom R)
, ((modm .|. altMask .|. shiftMask, xK_h ), sendMessage $ ShrinkFrom L)
, ((modm .|. altMask .|. shiftMask, xK_j ), sendMessage $ ShrinkFrom D)
, ((modm .|. altMask .|. shiftMask, xK_k ), sendMessage $ ShrinkFrom U)
, ((modm, xK_d ), sendMessage Rotate)
, ((modm, xK_s ), sendMessage Swap)
, ((modm, xK_n ), sendMessage FocusParent)
, ((modm .|. controlMask, xK_n ), sendMessage SelectNode)
, ((modm .|. shiftMask, xK_n ), sendMessage MoveNode)
-- Directional Navigation & Moving of Windows
, ((modm, xK_l), windowGo R False)
, ((modm, xK_h), windowGo L False)
, ((modm, xK_k), windowGo U False)
, ((modm, xK_j), windowGo D False)
, ((modm .|. shiftMask, xK_l), windowSwap R False)
, ((modm .|. shiftMask, xK_h), windowSwap L False)
, ((modm .|. shiftMask, xK_k), windowSwap U False)
, ((modm .|. shiftMask, xK_j), windowSwap D False)
-- Toggle the status bar gap
, ((modm , xK_b ), sendMessage ToggleStruts)
-- Quit xmonad
, ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
-- Restart xmonad
, ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart")
]
++
-- mod-[1..9], Switch to workspace N
-- mod-shift-[1..9], Move client to workspace N
[((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
++
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
[((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
-- Additional keybindings for media keys
addKeys = [ ("<XF86AudioLowerVolume>" ,spawn "pulseaudio-ctl down 5")
, ("<XF86AudioRaiseVolume>" ,spawn "pulseaudio-ctl up 5" )
, ("<XF86AudioMute>" ,spawn "pulseaudio-ctl mute" )
, ("<XF86MonBrightnessDown>" ,spawn "light -U 5" )
, ("<XF86MonBrightnessUp>" ,spawn "light -A 5" )
, ("<XF86AudioPlay>" ,spawn "play-pause-mpd.sh" )
, ("<XF86AudioMicMute>" ,spawn "play-pause-mpd.sh" )
, ("<XF86AudioPrev>" ,spawn "mpc prev" )
, ("<XF86AudioNext>" ,spawn "mpc next" )
--, ("<XF86PowerOff>" ,spawn "lock.sh" )
, ("M-<Escape>" ,spawn "lock.sh" )
, ("<F12>" ,namedScratchpadAction myScratchpads "termscratch")
]
-- Mouse bindings bound to mouse events
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
[ ((modm, button1), (\w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster))
, ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster))
, ((modm .|. shiftMask, button1), (\w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster))
]
-- Layout definitions & modifiers
myLayout = onWorkspace "6: MEDIA" simpleFloat $
desktopLayoutModifiers $
smartBorders $
minimize $
mkToggle (NOBORDERS ?? FULL ?? EOT) layouts
where
layouts = gaps [(U,5), (R,5), (L,5), (D,5)] $ spacing 5 (tiled ||| Mirror tiled ||| emptyBSP ||| Full)
-- tiled resiezable tall layout
tiled = ResizableTall nmaster delta ratio []
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 3/100
-- Defined icons for various layout types
myIcons layout
| is "Mirror ResizableTall" = "<icon=/home/gilbertw1/.xmonad/icons/layout-mirror.xbm/>"
| is "ResizableTall" = "<icon=/home/gilbertw1/.xmonad/icons/layout-tall.xbm/>"
| is "BSP" = "<icon=/home/gilbertw1/.xmonad/icons/layout-bsp.xbm/>"
| is "Full" = "<icon=/home/gilbertw1/.xmonad/icons/layout-full.xbm/>"
| is "Simple Float" = "<icon=/home/gilbertw1/.xmonad/icons/layout-float.xbm/>"
| otherwise = "<icon=/home/gilbertw1/.xmonad/icons/layout-gimp.xbm/>"
where is = (`L.isInfixOf` layout)
-- Manage hook defining various window rules
myManageHook = composeAll
[ className =? "MPlayer" --> doCenterFloat
, resource =? "desktop_window" --> doIgnore
, resource =? "kdesktop" --> doIgnore
, className =? "Xfce4-notifyd" --> doIgnore
, className =? "Pavucontrol" --> doCenterFloat
, className =? "Peek" --> doIgnore
, className =? "peek" --> doIgnore
, isDialog --> doCenterFloat]
<+> (isFullscreen --> doFullFloat)
<+> (namedScratchpadManageHook myScratchpads)
<+> manageSpawn
-- EwmhDesktops users should change this to ewmhDesktopsEventHook
myEventHook = mempty
-- Startup hook, not doing anything
myStartupHook = do
setWMName "LG3D"
startupHook desktopConfig
-- Function that prevents cycling to workspaces available on other screens
hiddenNotNSP :: X (WindowSpace -> Bool)
hiddenNotNSP = do
hs <- gets $ map W.tag . W.hidden . windowset
return (\w -> (W.tag w) /= "NSP" && (W.tag w) `elem` hs)
-- Alias for left alt key modifier
altMask = mod1Mask
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment