replace scratchpads with abduco run and select from list

This commit is contained in:
Felix Van der Jeugt 2016-01-20 23:38:45 +01:00
parent f583ac14f4
commit 10f2fb6d2e
2 changed files with 4 additions and 24 deletions

2
local/bin/abduco_list Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
abduco | tail -n +2 | cut -f3 | dmenu | xargs --replace={} urxvtc -e abduco -a {}

View File

@ -20,8 +20,6 @@ import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Layout.NoBorders
import XMonad.Layout.Grid
import XMonad.Util.NamedScratchpad
import XMonad.Actions.WindowBringer
import Graphics.X11.ExtraTypes.XF86
import Data.Monoid
import System.Exit
@ -104,18 +102,6 @@ myNormalBorderColor = "#000000"
myFocusedBorderColor :: [Char]
myFocusedBorderColor = "#ff0000"
-- Scratchpads, applications to toggle
myScratchPads :: [NamedScratchpad]
myScratchPads =
[ interm "ranger" nonFloating
, interm "weechat" nonFloating
, interm "sup" nonFloating
, interm "newsbeuter" nonFloating
, interm "vimus" nonFloating
]
where
interm prog = NS prog (runInTerminal prog prog) (appName =? prog)
------------------------------------------------------------------------
-- Key bindings. Add, modify or remove key bindings here.
@ -198,16 +184,8 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
, ((0, xF86XK_MonBrightnessUp), spawn "xbacklight -inc 10")
, ((0, xF86XK_MonBrightnessDown), spawn "xbacklight -dec 10")
, ((modm .|. controlMask, xK_c), namedScratchpadAction myScratchPads "weechat")
, ((modm .|. controlMask, xK_b), namedScratchpadAction myScratchPads "ranger")
, ((modm .|. controlMask, xK_m), namedScratchpadAction myScratchPads "sup")
, ((modm .|. controlMask, xK_n), namedScratchpadAction myScratchPads "newsbeuter")
, ((modm .|. controlMask, xK_v), namedScratchpadAction myScratchPads "vimus")
, ((modm, xK_s), spawn $ silent "abduco_run")
-- Dmenu open programs
, ((modm .|. shiftMask, xK_Tab), gotoMenuArgs ["-l", "10"])
, ((modm .|. controlMask, xK_Tab), bringMenuArgs ["-l", "10"])
, ((modm, xK_a), spawn $ silent "abduco_list")
-- Screens
, ((modm .|. shiftMask, xK_p), spawn $ silent "push.sh")
@ -399,7 +377,7 @@ defaults = def {
-- hooks, layouts
layoutHook = myLayoutHook,
manageHook = namedScratchpadManageHook myScratchPads <+> myManageHook,
manageHook = myManageHook,
handleEventHook = myEventHook,
logHook = myLogHook,
startupHook = myStartupHook