diff --git a/files/.config/configstore/update-notifier-npm.json b/files/.config/configstore/update-notifier-npm.json index 3f4e800..1441d06 100644 --- a/files/.config/configstore/update-notifier-npm.json +++ b/files/.config/configstore/update-notifier-npm.json @@ -1,4 +1,4 @@ { "optOut": false, - "lastUpdateCheck": 1588611001406 + "lastUpdateCheck": 1588770448547 } \ No newline at end of file diff --git a/files/.config/polybar/config.ini b/files/.config/polybar/config.ini index e4d5c12..21c2aea 100644 --- a/files/.config/polybar/config.ini +++ b/files/.config/polybar/config.ini @@ -40,6 +40,7 @@ alert = #bd2c40 ;; Bar config ----------------------------------------- {{{ [bar/main] +monitor = ${env:MONITOR:} override-redirect = true wm-restack = xmonad diff --git a/files/.config/polybar/launch.sh b/files/.config/polybar/launch.sh index 839a3c3..a67e0ef 100755 --- a/files/.config/polybar/launch.sh +++ b/files/.config/polybar/launch.sh @@ -2,4 +2,10 @@ killall -q polybar echo "---" | tee -a /tmp/polybar1.log /tmp/polybar2.log -polybar --config=/home/leon/.config/polybar/config.ini main >>/tmp/polybar1.log 2>&1 & + +# for loop only for multi monitor +for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do + MONITOR=$m polybar --config=/home/leon/.config/polybar/config.ini main >>/tmp/polybar1.log 2>&1 & +done + +#polybar --config=/home/leon/.config/polybar/config.ini main >>/tmp/polybar1.log 2>&1 & diff --git a/files/.xmonad/.stack-work/stack.sqlite3 b/files/.xmonad/.stack-work/stack.sqlite3 index f06a0e1..3cf5787 100644 Binary files a/files/.xmonad/.stack-work/stack.sqlite3 and b/files/.xmonad/.stack-work/stack.sqlite3 differ diff --git a/files/.xmonad/lib/Config.hs b/files/.xmonad/lib/Config.hs index e713073..289c8c9 100644 --- a/files/.xmonad/lib/Config.hs +++ b/files/.xmonad/lib/Config.hs @@ -154,6 +154,7 @@ myStartupHook = do spawnOnce "redshift -P -O 5000" spawn "xset r rate 300 50" -- make key repeat quicker spawn "/home/leon/.config/polybar/launch.sh" + spawn "/home/leon/.screenlayout/dualscreen.sh" spawn "feh --bg-fill /home/leon/Bilder/wallpapers/mountains_with_clounds.jpg" setWMName "LG3D" -- Java stuff hack @@ -165,6 +166,14 @@ myStartupHook = do removedKeys :: [String] removedKeys = ["M-S-c", "M-S-q", "M-h", "M-l"] +multiMonitorOperation :: (WorkspaceId -> WindowSet -> WindowSet) -> ScreenId -> X () +multiMonitorOperation operation n = do + monitor <- screenWorkspace n + case monitor of + Just mon -> windows $ operation mon + Nothing -> return () + + myKeys :: [(String, X ())] myKeys = [ ("M-+", sendMessage zoomIn) , ("M--", sendMessage zoomOut) @@ -183,14 +192,20 @@ myKeys = [ ("M-+", sendMessage zoomIn) , ("", spawn "amixer sset Master 5%+") , ("", spawn "amixer sset Master 5%-") + -- Multi monitor + , ("M-s", multiMonitorOperation W.view 0) + , ("M-d", multiMonitorOperation W.view 1) + , ("M-S-s", (multiMonitorOperation W.shift 0) >> multiMonitorOperation W.view 0) + , ("M-S-d", (multiMonitorOperation W.shift 1) >> multiMonitorOperation W.view 1) + -- programs , ("M-p", spawn myLauncher) , ("M-b", spawn myBrowser) , ("M-C-p", spawn (myTerminal ++ " --class termite_floating -e fff")) , ("M-S-p", Rofi.showCombi (def { Rofi.theme = Rofi.bigTheme }) [ "drun", "window", "ssh" ]) , ("M-S-e", Rofi.showNormal (def { Rofi.theme = Rofi.bigTheme }) "emoji" ) - , ("M-s", spawn $ scriptFile "rofi-search.sh") - , ("M-S-s", spawn $ scriptFile "rofi-open.sh") + --, ("M-s", spawn $ scriptFile "rofi-search.sh") + , ("M-S-o", spawn $ scriptFile "rofi-open.sh") , ("M-n", scratchpadSubmap ) , ("M-m", mediaSubmap ) , ("M-e", Rofi.promptRunCommand def specialCommands) @@ -209,10 +224,10 @@ myKeys = [ ("M-+", sendMessage zoomIn) windowGoMappings = [ ("M-M1-" ++ key, Nav2d.windowGo dir False) | (key, dir) <- keyDirPairs ] windowSwapMappings = [ ("M-S-M1-" ++ key, Nav2d.windowSwap dir False) | (key, dir) <- keyDirPairs ] resizeMappings = - [ ("M-C-h", ifLayoutIs "BSP" (sendMessage $ ExpandTowards L) (sendMessage Shrink)) - , ("M-C-j", ifLayoutIs "BSP" (sendMessage $ ExpandTowards D) (sendMessage MirrorShrink >> sendMessage ExpandSlave)) - , ("M-C-k", ifLayoutIs "BSP" (sendMessage $ ExpandTowards U) (sendMessage MirrorExpand >> sendMessage ShrinkSlave)) - , ("M-C-l", ifLayoutIs "BSP" (sendMessage $ ExpandTowards R) (sendMessage Expand)) + [ ("M-C-h", ifLayoutIs "BSP" (sendMessage $ ExpandTowards L) (ifLayoutIs "Horizon" (sendMessage ShrinkSlave) (sendMessage Shrink))) + , ("M-C-j", ifLayoutIs "BSP" (sendMessage $ ExpandTowards D) (ifLayoutIs "Horizon" (sendMessage Expand) (sendMessage MirrorShrink >> sendMessage ExpandSlave))) + , ("M-C-k", ifLayoutIs "BSP" (sendMessage $ ExpandTowards U) (ifLayoutIs "Horizon" (sendMessage Shrink) (sendMessage MirrorExpand >> sendMessage ShrinkSlave))) + , ("M-C-l", ifLayoutIs "BSP" (sendMessage $ ExpandTowards R) (ifLayoutIs "Horizon" (sendMessage ExpandSlave) (sendMessage Expand))) ] toggleFullscreen :: X ()