home/xmonad: misc modernization

This commit is contained in:
Oystein Kristoffer Tveit 2024-06-26 20:22:00 +02:00
parent 2a89a34d4c
commit 28a8fd30c4
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146

View File

@ -65,7 +65,7 @@ myModMask :: KeyMask
myModMask = mod4Mask
myWorkspaces :: [WorkspaceId]
myWorkspaces = map (UTF8.decode . UTF8.encode) ["","","","","","総2","総3"]
myWorkspaces = map (UTF8.decode . UTF8.encode) ["gen","www","dev","dev2","com","wsa","wsb","wsc"]
wsWeb = myWorkspaces !! 1
wsDev = myWorkspaces !! 2
@ -181,14 +181,14 @@ termIsOpen = isOpen
<$> (listToMaybe . filter (L.isInfixOf "term") . lines))
<$> output
viewDropboxStatus :: X ()
viewDropboxStatus = spawn =<< ((++) "notify-send -t 3000 " . unpack) <$> status
where
status :: X String
status = liftIO $ runProcessWithInput "python" ["$HOME/.scripts/dropbox.py", "status"] ""
-- viewDropboxStatus :: X ()
-- viewDropboxStatus = spawn =<< ((++) "notify-send -t 3000 " . unpack) <$> status
-- where
-- status :: X String
-- status = liftIO $ runProcessWithInput "python" ["$HOME/.scripts/dropbox.py", "status"] ""
unpack :: String -> String
unpack = wrap "\" " "\"" . unwords . map (wrap " [" "] "). lines
-- unpack :: String -> String
-- unpack = wrap "\" " "\"" . unwords . map (wrap " [" "] "). lines
------------------------------------------------------------------------
-- Mouse bindings: default actions bound to mouse events
@ -346,7 +346,7 @@ myStartupHook = return ()
myRestartHook :: X ()
myRestartHook = do
spawn "notify-send 'XMonad' 'Restarted XMonad/Polybar' --icon=dialog-information"
spawn "xmonad --recompile"
-- spawn "xmonad --recompile"
spawn "xmonad --restart"
spawn "systemctl --user restart polybar"