From 10f2fb6d2e3492fa042c223cd15b99e2b5bd6ad6 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Wed, 20 Jan 2016 23:38:45 +0100 Subject: [PATCH] replace scratchpads with abduco run and select from list --- local/bin/abduco_list | 2 ++ xmonad/xmonad.hs | 26 ++------------------------ 2 files changed, 4 insertions(+), 24 deletions(-) create mode 100755 local/bin/abduco_list diff --git a/local/bin/abduco_list b/local/bin/abduco_list new file mode 100755 index 0000000..c21dfa2 --- /dev/null +++ b/local/bin/abduco_list @@ -0,0 +1,2 @@ +#!/bin/bash +abduco | tail -n +2 | cut -f3 | dmenu | xargs --replace={} urxvtc -e abduco -a {} diff --git a/xmonad/xmonad.hs b/xmonad/xmonad.hs index 77e7a9b..6da02ea 100644 --- a/xmonad/xmonad.hs +++ b/xmonad/xmonad.hs @@ -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