aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--XMonad/xmonad.hs20
1 files changed, 15 insertions, 5 deletions
diff --git a/XMonad/xmonad.hs b/XMonad/xmonad.hs
index 2be29b07..278a38b5 100644
--- a/XMonad/xmonad.hs
+++ b/XMonad/xmonad.hs
@@ -1,5 +1,6 @@
import XMonad
import qualified XMonad.StackSet as W
+import XMonad.ManageHook
-- actions
import XMonad.Actions.CycleWS (moveTo, shiftTo, WSType(..), nextScreen, prevScreen)
@@ -38,6 +39,7 @@ import XMonad.Util.EZConfig (additionalKeys)
import XMonad.Util.Cursor
import XMonad.Util.Paste
import XMonad.Util.Run
+import XMonad.Util.NamedScratchpad
myStartupHook :: X ()
myStartupHook = do
@@ -55,9 +57,6 @@ myStartupHook = do
setDefaultCursor xC_left_ptr
--- bar actions
-
-
windowCount :: X (Maybe String)
windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace . W.current . windowset
@@ -92,10 +91,18 @@ myBorderWidth = 1
sGap = 0 -- screen gap
wGap = 1 -- window gap
-myExtraWorkspaces = [(xK_0, " 十 ")] -- ,(xK_minus, "tmp"),(xK_equal, "swap")]
+myExtraWorkspaces = [(xK_0, " 十 ")]
myWorkspaces = [" 一 "," 二 "," 三 "," 四 "," 五 "," 六 "," 七 "," 八 ", " 九 "] ++ (map snd myExtraWorkspaces)
+
+-- scratchpad config
+myScratchpads = [
+-- NS "Vysor" "Vysor.AppImage" (title =? "Vysor") defaultFloating
+ NS "Phone" "scrcpy" (title =? "Motorola One Power") defaultFloating
+ ] where role = stringProperty "WM_WINDOW_ROLE"
+
+
-- keybindings
myKeys = [
((mod4Mask, xK_Return), spawn (myTerminal ++ " -e fish"))
@@ -104,6 +111,9 @@ myKeys = [
, ((mod1Mask .|. shiftMask, xK_k), kill1)
, ((mod1Mask, xK_o), withFocused $ windows . W.sink) -- unfloat windows
+ -- scratchpad keybindings
+ , ((mod4Mask, xK_p), namedScratchpadAction myScratchpads "Phone")
+
-- view prev/next workspaces
, ((mod1Mask, xK_h), prevWS)
, ((mod1Mask, xK_l), nextWS)
@@ -218,7 +228,7 @@ main = do
focusedBorderColor = fBorder,
-- mouseBindings = myMouseBindings,
layoutHook = myLayoutHook,
- -- manageHook = myManageHook,
+ manageHook = namedScratchpadManageHook myScratchpads,
-- handleEventHook = myEventHook,
logHook = dynamicLogWithPP myLemonbarPP { ppOutput = \x -> hPutStrLn notXMobar x},
startupHook = myStartupHook