From d1a4e4a6d60f97c22d1d1463eb2898c20e6db05c Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 25 Nov 2017 21:01:49 +0100 Subject: Move old files to stow-correct positions --- xmonad/.xmonad/xmonad.hs | 92 ++++++++++++++++++++++++++++++++++++++++++++++++ xmonad/xmonad/xmonad.hs | 92 ------------------------------------------------ 2 files changed, 92 insertions(+), 92 deletions(-) create mode 100644 xmonad/.xmonad/xmonad.hs delete mode 100644 xmonad/xmonad/xmonad.hs (limited to 'xmonad') diff --git a/xmonad/.xmonad/xmonad.hs b/xmonad/.xmonad/xmonad.hs new file mode 100644 index 00000000..21e197d2 --- /dev/null +++ b/xmonad/.xmonad/xmonad.hs @@ -0,0 +1,92 @@ +import XMonad +import qualified XMonad.StackSet as W +import XMonad.Hooks.DynamicLog +import XMonad.Hooks.EwmhDesktops +import XMonad.Hooks.ManageDocks +import XMonad.Hooks.ManageHelpers +import XMonad.Layout.NoBorders +import XMonad.Layout.WindowNavigation +import XMonad.Util.EZConfig +import XMonad.Util.Run(spawnPipe) +import System.Exit +import System.IO +import Data.List(isPrefixOf) + +myManageHook :: ManageHook +myManageHook = composeOne + [ className =? "Firefox" -?> doShift "2" + , className =? "Pidgin" -?> doShift "3" + , className =? "nuvolaplayer" -?> doShift "8" + , className =? "Transmission-gtk" -?> doShift "9" + , isFullscreen -?> doFullFloat + , fmap ("mpv" `isPrefixOf`) title -?> doFullFloat + ] + +myKeys c = mkKeymap c $ + [ ("M-S-", spawn $ XMonad.terminal c) + , ("M-k", kill) + + , ("M-", spawn "exec $(dmenu_path | dmenu)") + , ("M-x M-e", spawn "emacsclient -c") + + , ("M-t", withFocused $ windows . W.sink) + , ("M-m", windows W.focusMaster) + , ("M-S-m", windows W.swapMaster) + + , ("M-", sendMessage $ Go R) + , ("M-", sendMessage $ Go L) + , ("M-", sendMessage $ Go U) + , ("M-", sendMessage $ Go D) + , ("M-M1-", sendMessage $ Swap R) + , ("M-M1-", sendMessage $ Swap L) + , ("M-M1-", sendMessage $ Swap U) + , ("M-M1-", sendMessage $ Swap D) + , ("M-C-", sendMessage $ Move R) + , ("M-C-", sendMessage $ Move L) + , ("M-C-", sendMessage $ Move U) + , ("M-C-", sendMessage $ Move D) + + , ("M-n", windows W.focusDown) + , ("M-p", windows W.focusUp) + , ("M-S-n", windows W.swapDown) + , ("M-S-p", windows W.swapUp) + + , ("M-,", sendMessage (IncMasterN 1)) + , ("M-.", sendMessage (IncMasterN (-1))) + + , ("M-\\", sendMessage NextLayout) + , ("M-S-\\", setLayout $ XMonad.layoutHook c) + + , ("M-+", sendMessage Shrink) + , ("M--", sendMessage Expand) + + , ("M-q", broadcastMessage ReleaseResources + >> restart "xmonad" True) + , ("C-M-q", io (exitWith ExitSuccess)) + ] ++ + + -- mod-[1..9], Switch to workspace N + -- mod-shift-[1..9], Move client to workspace N + [(m ++ k, windows $ f w) + | (w, k) <- zip (XMonad.workspaces c) (map show [1..9]) + , (m, f) <- [("M-",W.greedyView), ("M-S-",W.shift)]] + + +main :: IO () +main = do + xmproc <-spawnPipe "/usr/bin/xmobar /home/alan/.xmobarrc" + xmonad $ defaultConfig + { manageHook = myManageHook <+> manageDocks <+> manageHook defaultConfig + , layoutHook = smartBorders . avoidStruts $ layoutHook defaultConfig + , logHook = dynamicLogWithPP xmobarPP + { ppOutput = hPutStrLn xmproc + , ppTitle = xmobarColor "#859900" "" . shorten 200 + , ppCurrent = xmobarColor "#b58900" "". wrap "[" "]" + , ppHiddenNoWindows = xmobarColor "#93a1a1" "" + , ppUrgent = xmobarColor "#dc322f" "#b58900" + } + , terminal = "urxvt" + , modMask = mod4Mask + , handleEventHook = fullscreenEventHook + , keys = myKeys + } diff --git a/xmonad/xmonad/xmonad.hs b/xmonad/xmonad/xmonad.hs deleted file mode 100644 index 21e197d2..00000000 --- a/xmonad/xmonad/xmonad.hs +++ /dev/null @@ -1,92 +0,0 @@ -import XMonad -import qualified XMonad.StackSet as W -import XMonad.Hooks.DynamicLog -import XMonad.Hooks.EwmhDesktops -import XMonad.Hooks.ManageDocks -import XMonad.Hooks.ManageHelpers -import XMonad.Layout.NoBorders -import XMonad.Layout.WindowNavigation -import XMonad.Util.EZConfig -import XMonad.Util.Run(spawnPipe) -import System.Exit -import System.IO -import Data.List(isPrefixOf) - -myManageHook :: ManageHook -myManageHook = composeOne - [ className =? "Firefox" -?> doShift "2" - , className =? "Pidgin" -?> doShift "3" - , className =? "nuvolaplayer" -?> doShift "8" - , className =? "Transmission-gtk" -?> doShift "9" - , isFullscreen -?> doFullFloat - , fmap ("mpv" `isPrefixOf`) title -?> doFullFloat - ] - -myKeys c = mkKeymap c $ - [ ("M-S-", spawn $ XMonad.terminal c) - , ("M-k", kill) - - , ("M-", spawn "exec $(dmenu_path | dmenu)") - , ("M-x M-e", spawn "emacsclient -c") - - , ("M-t", withFocused $ windows . W.sink) - , ("M-m", windows W.focusMaster) - , ("M-S-m", windows W.swapMaster) - - , ("M-", sendMessage $ Go R) - , ("M-", sendMessage $ Go L) - , ("M-", sendMessage $ Go U) - , ("M-", sendMessage $ Go D) - , ("M-M1-", sendMessage $ Swap R) - , ("M-M1-", sendMessage $ Swap L) - , ("M-M1-", sendMessage $ Swap U) - , ("M-M1-", sendMessage $ Swap D) - , ("M-C-", sendMessage $ Move R) - , ("M-C-", sendMessage $ Move L) - , ("M-C-", sendMessage $ Move U) - , ("M-C-", sendMessage $ Move D) - - , ("M-n", windows W.focusDown) - , ("M-p", windows W.focusUp) - , ("M-S-n", windows W.swapDown) - , ("M-S-p", windows W.swapUp) - - , ("M-,", sendMessage (IncMasterN 1)) - , ("M-.", sendMessage (IncMasterN (-1))) - - , ("M-\\", sendMessage NextLayout) - , ("M-S-\\", setLayout $ XMonad.layoutHook c) - - , ("M-+", sendMessage Shrink) - , ("M--", sendMessage Expand) - - , ("M-q", broadcastMessage ReleaseResources - >> restart "xmonad" True) - , ("C-M-q", io (exitWith ExitSuccess)) - ] ++ - - -- mod-[1..9], Switch to workspace N - -- mod-shift-[1..9], Move client to workspace N - [(m ++ k, windows $ f w) - | (w, k) <- zip (XMonad.workspaces c) (map show [1..9]) - , (m, f) <- [("M-",W.greedyView), ("M-S-",W.shift)]] - - -main :: IO () -main = do - xmproc <-spawnPipe "/usr/bin/xmobar /home/alan/.xmobarrc" - xmonad $ defaultConfig - { manageHook = myManageHook <+> manageDocks <+> manageHook defaultConfig - , layoutHook = smartBorders . avoidStruts $ layoutHook defaultConfig - , logHook = dynamicLogWithPP xmobarPP - { ppOutput = hPutStrLn xmproc - , ppTitle = xmobarColor "#859900" "" . shorten 200 - , ppCurrent = xmobarColor "#b58900" "". wrap "[" "]" - , ppHiddenNoWindows = xmobarColor "#93a1a1" "" - , ppUrgent = xmobarColor "#dc322f" "#b58900" - } - , terminal = "urxvt" - , modMask = mod4Mask - , handleEventHook = fullscreenEventHook - , keys = myKeys - } -- cgit 1.4.1