diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index c6b5906e..b6e4564c 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -707,12 +707,28 @@ shiftToNextScreen ws = shiftToNextScreenX = windows shiftToNextScreen +getNextScreen ws = + minimumBy compareScreen candidates + where currentId = W.screen $ W.current ws + otherScreens = W.visible ws + largerId = filter ((> currentId) . W.screen) $ otherScreens + compareScreen a b = compare (W.screen a) (W.screen b) + candidates = + case largerId of + [] -> W.current ws:otherScreens -- Ensure a value will be selected + _ -> largerId + goToNextScreen ws = - case W.visible ws of - newVisible:rest -> ws { W.current = newVisible - , W.visible = W.current ws:rest - } - _ -> ws + if screenEq nextScreen currScreen then ws + else ws { W.current = nextScreen + , W.visible = currScreen : trimmedVisible + } + where + currScreen = W.current ws + nextScreen = getNextScreen ws + screenEq a b = W.screen a == W.screen b + trimmedVisible = + (filter (screenEq nextScreen) $ W.visible ws) goToNextScreenX = windows goToNextScreen diff --git a/tasks/shell/arch_dependencies.sh b/tasks/shell/arch_dependencies.sh index b59209f4..77b73953 100755 --- a/tasks/shell/arch_dependencies.sh +++ b/tasks/shell/arch_dependencies.sh @@ -12,7 +12,7 @@ ESSENTIAL=( "rofi-pass" "xorg-xrandr" "spotify" "htop" "rcm" "networkmanager-applet" "pulseaudio-ctl" "pasystray" "xclip" "copyq" "notification-daemon" "pass" "pavucontrol" "xsettingsd-git" "udisks" "udiskie" "python-pip" - "gnome-keyring" + "gnome-keyring" "ntp" ) NEEDED=(