diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-08-26 20:19:40 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-08-26 20:19:40 +0530 |
commit | 08db1e0f2ef400d22368168deeac24d77f37d516 (patch) | |
tree | f6392fc9258715873549358e3a7cbb24beeb074b /.config | |
parent | 458a1c1016c47c76e17ab222c26d6558e5d75500 (diff) |
added keybindings to switch monitors in XMonad
Diffstat (limited to '.config')
-rw-r--r-- | .config/XMonad/lib/Defaults.hs | 3 | ||||
-rw-r--r-- | .config/XMonad/lib/Hooks.hs | 1 | ||||
-rw-r--r-- | .config/XMonad/lib/Keybindings.hs | 8 | ||||
-rw-r--r-- | .config/polybar/config.ini | 51 | ||||
-rw-r--r-- | .config/zsh/.zshenv | 3 |
5 files changed, 60 insertions, 6 deletions
diff --git a/.config/XMonad/lib/Defaults.hs b/.config/XMonad/lib/Defaults.hs index dd1f364..74fa96a 100644 --- a/.config/XMonad/lib/Defaults.hs +++ b/.config/XMonad/lib/Defaults.hs @@ -63,7 +63,8 @@ myWorkspaces = ["一", "二", "三", "å››", "五", "å…", "七", "å…«", "ä¹ sGap = 3 wGap = 4 -myGap = spacingRaw True (Border sGap sGap sGap sGap) True (Border wGap wGap wGap wGap) True +-- myGap = spacingRaw True (Border sGap sGap sGap sGap) True (Border wGap wGap wGap wGap) True +myGap = spacingRaw False (Border sGap sGap sGap sGap) True (Border wGap wGap wGap wGap) True myTabTheme = def { fontName = myFont diff --git a/.config/XMonad/lib/Hooks.hs b/.config/XMonad/lib/Hooks.hs index 5e13225..66540e5 100644 --- a/.config/XMonad/lib/Hooks.hs +++ b/.config/XMonad/lib/Hooks.hs @@ -33,5 +33,6 @@ myLayoutHook = avoidStruts $ maximize $ windowNavigation $ smartBorders $ myGap myStartupHook = do setWMName "Anime Thighs" + spawnOnce "secondmonitor.sh" -- setWMName "LG3D" setDefaultCursor xC_left_ptr diff --git a/.config/XMonad/lib/Keybindings.hs b/.config/XMonad/lib/Keybindings.hs index 6738e3c..708ae90 100644 --- a/.config/XMonad/lib/Keybindings.hs +++ b/.config/XMonad/lib/Keybindings.hs @@ -90,8 +90,8 @@ myKeybindings = [ , ((myModShiftMask, xK_bracketright), shiftNextScreen >> nextScreen) -- swap different screens - , ((myModMask .|. controlMask, xK_bracketleft ), swapPrevScreen) - , ((myModMask .|. controlMask, xK_bracketright), swapNextScreen) + , ((myModMask .|. controlMask, xK_bracketleft ), swapPrevScreen >> prevScreen) + , ((myModMask .|. controlMask, xK_bracketright), swapNextScreen >> nextScreen) -- toggle maximize , ((myModMask, xK_f), withFocused (sendMessage . maximizeRestore)) @@ -140,6 +140,10 @@ myKeybindings = [ ((m .|. myModMask, k), windows $ f i) | (i, k) <- zip myWorkspaces [xK_1, xK_2, xK_3, xK_4, xK_5, xK_6, xK_7, xK_8, xK_9, xK_0] , (f, m) <- [(W.view, 0), (W.shift, shiftMask)] + ] ++ [ -- directly focus monitors instead of cycling + ((m .|. myModMask, key), screenWorkspace sc >>= flip whenJust (windows . f)) + | (key, sc) <- zip [xK_e, xK_w] [0..] + , (f, m) <- [(W.view, 0), (W.shift, shiftMask)] ] myKeybindingsP :: [(String, X())] diff --git a/.config/polybar/config.ini b/.config/polybar/config.ini index 2786f49..68faf65 100644 --- a/.config/polybar/config.ini +++ b/.config/polybar/config.ini @@ -85,8 +85,56 @@ batt-discharging-fg = ${colors.module-color-1} batt-full-bg = ${colors.module-bg} batt-full-fg = ${colors.module-color-0} +; same as mybar but on second monitor +; also has different font size, bar height, etc +; modules are the same and should be synced if either is changed +[bar/mybar2] +monitor = ${env:MONITOR:HDMI-0} +enable-ipc = true +width = 100% +height = 20 +offset-x = 0 +offset-y = 0 +radius = 0 +fixed-center = true +bottom = 0 + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 0 +line-color = #f00 + +border-size = 0 +border-color = #00000000 + +padding-left = 0 +padding-right = 0 + +module-margin-left = 0 +module-margin-right = 0 + +font-0 = "SauceCodePro:style=Regular:size=9;3" +font-1 = "Source Han Sans JP Normal:size=9;3" +font-2 = "RobotoMono Nerd Font Mono:size=22;5" +font-3 = fixed:pixelsize=10;1 +;font-4 = unifont:fontformat=truetype:size=8:antialias=false;0 +;font-5 = siji:pixelsize=10;1 + +modules-left = date uptime wlan eth filesystem-root filesystem-home filesystem-hdd cpu temperature memory xwindow +modules-right = pulseaudio ewmh battery + +tray-position = right +tray-padding = 2 +tray-background = ${colors.systray-bg} + +override-redirect = true + +cursor-click = pointer +cursor-scroll = ns-resize + [bar/mybar] -;monitor = ${env:MONITOR:eDP-1-1} +;monitor = ${env:MONITOR:eDP-1} enable-ipc = true width = 100% height = 28 @@ -119,7 +167,6 @@ font-3 = fixed:pixelsize=10;1 ;font-5 = siji:pixelsize=10;1 modules-left = date uptime wlan eth filesystem-root filesystem-home filesystem-hdd cpu temperature memory xwindow -;modules-center = xwindow modules-right = pulseaudio ewmh battery tray-position = right diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index aa01b59..77f8e54 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -1,7 +1,8 @@ export EDITOR="nvim" export VISUAL="emacs" export TERMINAL="st" -export BROWSER="librewolf" +# export BROWSER="librewolf" +export BROWSER="librewolf --private-window" export READER="zathura" export COLORTERM="truecolor" export PAGER="bat" |