Fix Spacing, Rofi Keybindings, & Use ~/.scripts
- Fix spacing around and between windows - Add keybindings for rofi-rbw & control center - Replace keybindings for actions with rofi menu - Move system restore processes to the end of startup hook - Use scripts in ~/.scripts with command line arguments where possible - Remove unnecessary shebangs at the start of scripts - Replace polybar powermenu with clickable icon that launches rofi
This commit is contained in:
161
README.org
161
README.org
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
-- layout
|
-- layout
|
||||||
import XMonad.Layout.NoBorders
|
import XMonad.Layout.NoBorders
|
||||||
import XMonad.Layout.Spacing (spacing)
|
import XMonad.Layout.Spacing (spacingRaw, Border(Border))
|
||||||
import XMonad.Layout.GridVariants (Grid(Grid))
|
import XMonad.Layout.GridVariants (Grid(Grid))
|
||||||
import XMonad.Layout.ResizableTile
|
import XMonad.Layout.ResizableTile
|
||||||
#+end_src
|
#+end_src
|
||||||
@ -263,7 +263,9 @@ These default keybindings are left for reference, but are not actually used in m
|
|||||||
|
|
||||||
-- launch rofi
|
-- launch rofi
|
||||||
, ("M-p", spawn "rofi -show combi")
|
, ("M-p", spawn "rofi -show combi")
|
||||||
|
, ("M-S-p", spawn "/home/sravan/.scripts/control-center.sh --rofi")
|
||||||
, ("M-c", spawn "rofi -show clipboard")
|
, ("M-c", spawn "rofi -show clipboard")
|
||||||
|
, ("M-b", spawn "rofi-rbw")
|
||||||
|
|
||||||
-- volume control
|
-- volume control
|
||||||
, ("<XF86AudioRaiseVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ +1%") -- increase volume
|
, ("<XF86AudioRaiseVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ +1%") -- increase volume
|
||||||
@ -271,29 +273,21 @@ These default keybindings are left for reference, but are not actually used in m
|
|||||||
, ("<XF86AudioMute>", spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle") -- mute volume
|
, ("<XF86AudioMute>", spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle") -- mute volume
|
||||||
|
|
||||||
-- media control
|
-- media control
|
||||||
, ("<XF86AudioPlay>", spawn "playerctl --player=playerctld play-pause") -- play / pause
|
, ("<XF86AudioPlay>", spawn "/home/sravan/.scripts/playerctl.sh --play-pause") -- play / pause
|
||||||
, ("C-<XF86AudioPlay>", spawn "playerctl --player=playerctld next") -- next
|
, ("M-m", spawn "/home/sravan/.scripts/playerctl.sh --rofi") -- rofi menu
|
||||||
, ("C-S-<XF86AudioPlay>", spawn "playerctl --player=playerctld previous") -- previous
|
|
||||||
, ("S-<XF86AudioPlay>", spawn "playerctld shift") -- change player
|
|
||||||
|
|
||||||
-- notification control
|
-- notification control
|
||||||
, ("M-n", spawn "dunstctl context") -- notification context menu
|
, ("M-n", spawn "/home/sravan/.scripts/dunst.sh --rofi") -- rofi menu
|
||||||
, ("M-C-n", spawn "dunstctl close") -- close notification
|
|
||||||
, ("M-S-n", spawn "dunstctl history-pop") -- pop history
|
|
||||||
, ("M-C-S-n", spawn "dunstctl set-paused toggle") -- toggle do not disturb
|
|
||||||
|
|
||||||
-- system control
|
-- session control
|
||||||
, ("M-q", spawn "xmonad --recompile; xmonad --restart") -- recompile and restart xmonad
|
, ("M-q", spawn "/home/sravan/.scripts/session.sh --rofi") -- rofi menu
|
||||||
, ("M-C-S-q", io (exitWith ExitSuccess)) -- quit xmonad
|
|
||||||
, ("M-C-S-l", spawn "light-locker-command --lock") -- lock
|
|
||||||
, ("M-C-S-s", spawn "systemctl suspend") -- suspend
|
|
||||||
|
|
||||||
-- close focused window
|
-- close focused window
|
||||||
, ("M-S-c", kill) -- regular kill
|
, ("M-S-c", kill) -- regular kill
|
||||||
, ("M-C-S-c", spawn "xkill") -- force kill
|
, ("M-C-S-c", spawn "xkill") -- force kill
|
||||||
|
|
||||||
-- toggle compositor
|
-- compositor control
|
||||||
, ("M-<Esc>", spawn "/home/sravan/.config/picom/toggle_picom.sh")
|
, ("M-<Esc>", spawn "/home/sravan/.scripts/picom.sh --rofi")
|
||||||
|
|
||||||
-- screenshot
|
-- screenshot
|
||||||
, ("<Print>", spawn "flameshot gui")
|
, ("<Print>", spawn "flameshot gui")
|
||||||
@ -336,17 +330,25 @@ which denotes layout choice.
|
|||||||
myLayout =
|
myLayout =
|
||||||
avoidStruts ( tiled ||| grid ||| monocle )
|
avoidStruts ( tiled ||| grid ||| monocle )
|
||||||
where
|
where
|
||||||
|
-- Gaps around and between windows
|
||||||
|
-- Changes only seem to apply if I log out then in again
|
||||||
|
-- Dimensions are given as (Border top bottom right left)
|
||||||
|
mySpacing = spacingRaw False -- Only for >1 window
|
||||||
|
-- The bottom edge seems to look narrower than it is
|
||||||
|
(Border 10 15 15 15) -- Size of screen edge gaps
|
||||||
|
True -- Enable screen edge gaps
|
||||||
|
(Border 10 10 10 10) -- Size of window gaps
|
||||||
|
True -- Enable window gaps
|
||||||
|
|
||||||
-- default tiling algorithm partitions the screen into two panes
|
-- default tiling algorithm partitions the screen into two panes
|
||||||
nmaster = 1
|
nmaster = 1
|
||||||
delta = 3/100
|
delta = 3/100
|
||||||
tiled_ratio = 1/2
|
tiled_ratio = 1/2
|
||||||
tiled_spacing = 10
|
tiled = mySpacing $ ResizableTall nmaster delta tiled_ratio []
|
||||||
tiled = spacing tiled_spacing $ ResizableTall nmaster delta tiled_ratio []
|
|
||||||
|
|
||||||
-- grid
|
-- grid
|
||||||
grid_ratio = 16/9
|
grid_ratio = 16/9
|
||||||
grid_spacing = 10
|
grid = mySpacing $ Grid grid_ratio
|
||||||
grid = spacing grid_spacing $ Grid grid_ratio
|
|
||||||
|
|
||||||
-- monocle
|
-- monocle
|
||||||
-- monocle = smartBorders (Full)
|
-- monocle = smartBorders (Full)
|
||||||
@ -417,11 +419,6 @@ See the ~XMonad.Hooks.DynamicLog~ extension for examples.
|
|||||||
|
|
||||||
#+begin_src haskell :tangle xmonad.hs
|
#+begin_src haskell :tangle xmonad.hs
|
||||||
myStartupHook = do
|
myStartupHook = do
|
||||||
-- System Restore Processes
|
|
||||||
spawnOnce "/home/sravan/.screenlayout/default.sh &" -- restore default screen layout
|
|
||||||
spawnOnce "nitrogen --restore &" -- restore wallpaper
|
|
||||||
spawnOnce "numlockx on &" -- enable numlock
|
|
||||||
|
|
||||||
-- System Tray Applications
|
-- System Tray Applications
|
||||||
spawnOnce "nyrna &" -- Nyrna Application Suspend
|
spawnOnce "nyrna &" -- Nyrna Application Suspend
|
||||||
spawnOnce "blueman-applet &" -- Blueman Bluetooth Manager
|
spawnOnce "blueman-applet &" -- Blueman Bluetooth Manager
|
||||||
@ -431,13 +428,18 @@ See the ~XMonad.Hooks.DynamicLog~ extension for examples.
|
|||||||
spawnOnce "xfce4-power-manager &" -- XFCE4 Power Manager
|
spawnOnce "xfce4-power-manager &" -- XFCE4 Power Manager
|
||||||
|
|
||||||
-- Background Processes
|
-- Background Processes
|
||||||
spawnOnce "/home/sravan/.config/picom/toggle_picom.sh &" -- Picom Compositor
|
spawnOnce "/home/sravan/.scripts/picom.sh --on &" -- Picom Compositor
|
||||||
spawnOnce "/home/sravan/.config/dunst/launch_dunst.sh &" -- Dunst Notification Daemon
|
spawnOnce "/home/sravan/.scripts/dunst.sh --on &" -- Dunst Notification Daemon
|
||||||
spawnOnce "greenclip daemon &" -- Greenclip Clipboard Manager
|
spawnOnce "greenclip daemon &" -- Greenclip Clipboard Manager
|
||||||
spawnOnce "redshift -x &" -- Reset redshift display gamma
|
spawnOnce "redshift -x &" -- Reset redshift display gamma
|
||||||
spawnOnce "redshift-gtk &" -- Redshift Blue Light Filter
|
spawnOnce "redshift-gtk &" -- Redshift Blue Light Filter
|
||||||
spawnOnce "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &" -- GNOME Polkit Authentication Agent
|
spawnOnce "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &" -- GNOME Polkit Authentication Agent
|
||||||
spawnOnce "light-locker --lock-on-suspend --lock-on-lid &" -- screen lock for lightdm
|
spawnOnce "light-locker --lock-on-suspend --lock-on-lid &" -- screen lock for lightdm
|
||||||
|
|
||||||
|
-- System Restore Processes
|
||||||
|
spawnOnce "/home/sravan/.screenlayout/default.sh &" -- restore default screen layout
|
||||||
|
spawnOnce "nitrogen --restore &" -- restore wallpaper
|
||||||
|
spawnOnce "numlockx on &" -- enable numlock
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Main
|
** Main
|
||||||
@ -1516,8 +1518,6 @@ Define module update intervals in seconds.
|
|||||||
***** Script
|
***** Script
|
||||||
|
|
||||||
#+begin_src shell :shebang #!/bin/bash :tangle polybar/scripts/updates-pacman-aurhelper.sh
|
#+begin_src shell :shebang #!/bin/bash :tangle polybar/scripts/updates-pacman-aurhelper.sh
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if ! num_updates=$(paru -Qu 2>/dev/null | wc -l); then
|
if ! num_updates=$(paru -Qu 2>/dev/null | wc -l); then
|
||||||
# if ! updates_aur=$(yay -Qum 2>/dev/null | wc -l); then
|
# if ! updates_aur=$(yay -Qum 2>/dev/null | wc -l); then
|
||||||
# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then
|
# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then
|
||||||
@ -1576,9 +1576,9 @@ Define module update intervals in seconds.
|
|||||||
; %pid%
|
; %pid%
|
||||||
;
|
;
|
||||||
; "click-(left|middle|right)" will be executed using "/bin/sh -c [command]"
|
; "click-(left|middle|right)" will be executed using "/bin/sh -c [command]"
|
||||||
click-left = playerctl --player=playerctld play-pause &
|
click-left = "/home/sravan/.scripts/playerctl.sh --play-pause"
|
||||||
; click-middle = echo middle %counter%
|
; click-middle = echo middle %counter%
|
||||||
click-right = playerctld shift &
|
click-right = "/home/sravan/.scripts/playerctl.sh --change"
|
||||||
; double-click-left = echo double left %counter%
|
; double-click-left = echo double left %counter%
|
||||||
; double-click-middle = echo double middle %counter%
|
; double-click-middle = echo double middle %counter%
|
||||||
; double-click-right = echo double right %counter%
|
; double-click-right = echo double right %counter%
|
||||||
@ -1588,15 +1588,13 @@ Define module update intervals in seconds.
|
|||||||
; %pid%
|
; %pid%
|
||||||
;
|
;
|
||||||
; "scroll-(up|down)" will be executed using "/bin/sh -c [command]"
|
; "scroll-(up|down)" will be executed using "/bin/sh -c [command]"
|
||||||
scroll-up = "playerctl --player=playerctld next"
|
scroll-up = "/home/sravan/.scripts/playerctl.sh --next"
|
||||||
scroll-down = "playerctl --player=playerctld previous"
|
scroll-down = "/home/sravan/.scripts/playerctl.sh --prev"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
***** Script
|
***** Script
|
||||||
|
|
||||||
#+begin_src shell :shebang #!/bin/bash :tangle polybar/scripts/get-media-playing.sh
|
#+begin_src shell :shebang #!/bin/bash :tangle polybar/scripts/get-media-playing.sh
|
||||||
#!/usr/bin/bash
|
|
||||||
|
|
||||||
mediaStatus=$(playerctl --player=playerctld metadata 2>&1)
|
mediaStatus=$(playerctl --player=playerctld metadata 2>&1)
|
||||||
|
|
||||||
if [[ "$mediaStatus" == "No player could handle this command" ]]; then
|
if [[ "$mediaStatus" == "No player could handle this command" ]]; then
|
||||||
@ -1662,9 +1660,9 @@ Define module update intervals in seconds.
|
|||||||
; %pid%
|
; %pid%
|
||||||
;
|
;
|
||||||
; "click-(left|middle|right)" will be executed using "/bin/sh -c [command]"
|
; "click-(left|middle|right)" will be executed using "/bin/sh -c [command]"
|
||||||
click-left = "dunstctl set-paused toggle &"
|
click-left = "/home/sravan/.scripts/dunst.sh --dnd"
|
||||||
; click-middle = echo middle %counter%
|
; click-middle = echo middle %counter%
|
||||||
click-right = "dunstctl history-pop &"
|
click-right = "/home/sravan/.scripts/dunst.sh --history"
|
||||||
; double-click-left = echo double left %counter%
|
; double-click-left = echo double left %counter%
|
||||||
; double-click-middle = echo double middle %counter%
|
; double-click-middle = echo double middle %counter%
|
||||||
; double-click-right = echo double right %counter%
|
; double-click-right = echo double right %counter%
|
||||||
@ -1681,8 +1679,6 @@ Define module update intervals in seconds.
|
|||||||
***** Script
|
***** Script
|
||||||
|
|
||||||
#+begin_src shell :shebang #!/bin/bash :tangle polybar/scripts/dunst-notification-status.sh
|
#+begin_src shell :shebang #!/bin/bash :tangle polybar/scripts/dunst-notification-status.sh
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Check if dunst is running
|
# Check if dunst is running
|
||||||
if pgrep -x "dunst" > /dev/null
|
if pgrep -x "dunst" > /dev/null
|
||||||
then
|
then
|
||||||
@ -1704,79 +1700,24 @@ Define module update intervals in seconds.
|
|||||||
|
|
||||||
#+begin_src conf :tangle polybar/config.ini
|
#+begin_src conf :tangle polybar/config.ini
|
||||||
[module/powermenu]
|
[module/powermenu]
|
||||||
type = custom/menu
|
type = custom/text
|
||||||
|
content = " "
|
||||||
|
|
||||||
expand-right = true
|
; "content" has the same properties as "format-NAME"
|
||||||
|
; content-background = #000
|
||||||
|
content-foreground = ${colors.powermenu}
|
||||||
|
content-padding = ${bar/mybar.module-margin}
|
||||||
|
|
||||||
format-spacing = ${bar/mybar.module-margin}
|
; "click-(left|middle|right)" will be executed using "/bin/sh -c $COMMAND"
|
||||||
|
; click-left = notify-send left
|
||||||
|
; click-middle = notify-send middle
|
||||||
|
; click-right = notify-send right
|
||||||
|
click-left = "rofi -show combi"
|
||||||
|
click-right = "/home/sravan/.scripts/control-center.sh --rofi"
|
||||||
|
|
||||||
label-open = " "
|
; "scroll-(up|down)" will be executed using "/bin/sh -c $COMMAND"
|
||||||
label-open-foreground = ${colors.powermenu}
|
; scroll-up = notify-send scroll up
|
||||||
label-close = " close"
|
; scroll-down = notify-send scroll down
|
||||||
label-close-foreground = ${colors.powermenu-close}
|
|
||||||
label-separator = ${bar/mybar.separator}
|
|
||||||
label-separator-foreground = ${colors.foreground}
|
|
||||||
|
|
||||||
menu-0-0 = " logout"
|
|
||||||
menu-0-0-exec = menu-open-1
|
|
||||||
menu-0-0-foreground = ${colors.powermenu-logout}
|
|
||||||
menu-0-1 = " lock"
|
|
||||||
menu-0-1-exec = menu-open-2
|
|
||||||
menu-0-1-foreground = ${colors.powermenu-lock}
|
|
||||||
menu-0-2 = "⏾ sleep"
|
|
||||||
menu-0-2-exec = menu-open-3
|
|
||||||
menu-0-2-foreground = ${colors.powermenu-sleep}
|
|
||||||
menu-0-3 = "ﰇ reboot"
|
|
||||||
menu-0-3-exec = menu-open-4
|
|
||||||
menu-0-3-foreground = ${colors.powermenu-reboot}
|
|
||||||
menu-0-4 = " power off"
|
|
||||||
menu-0-4-exec = menu-open-5
|
|
||||||
menu-0-4-foreground = ${colors.powermenu-power-off}
|
|
||||||
menu-0-5 = "鈴 hibernate"
|
|
||||||
menu-0-5-exec = menu-open-6
|
|
||||||
menu-0-5-foreground = ${colors.powermenu-hibernate}
|
|
||||||
|
|
||||||
menu-1-0 = " logout"
|
|
||||||
menu-1-0-exec = "pkill xmonad"
|
|
||||||
menu-1-0-foreground = ${colors.powermenu-logout}
|
|
||||||
menu-1-1 = "ﰸ cancel"
|
|
||||||
menu-1-1-exec = menu-open-0
|
|
||||||
menu-1-1-foreground = ${colors.powermenu-cancel}
|
|
||||||
|
|
||||||
menu-2-0 = " lock"
|
|
||||||
menu-2-0-exec = "light-locker-command --lock"
|
|
||||||
menu-2-0-foreground = ${colors.powermenu-lock}
|
|
||||||
menu-2-1 = "ﰸ cancel"
|
|
||||||
menu-2-1-exec = menu-open-0
|
|
||||||
menu-2-1-foreground = ${colors.powermenu-cancel}
|
|
||||||
|
|
||||||
menu-3-0 = "⏾ sleep"
|
|
||||||
menu-3-0-exec = "systemctl suspend"
|
|
||||||
menu-3-0-foreground = ${colors.powermenu-sleep}
|
|
||||||
menu-3-1 = "ﰸ cancel"
|
|
||||||
menu-3-1-exec = menu-open-0
|
|
||||||
menu-3-1-foreground = ${colors.powermenu-cancel}
|
|
||||||
|
|
||||||
menu-4-0 = "ﰇ reboot"
|
|
||||||
menu-4-0-exec = "reboot"
|
|
||||||
menu-4-0-foreground = ${colors.powermenu-reboot}
|
|
||||||
menu-4-1 = "ﰸ cancel"
|
|
||||||
menu-4-1-exec = menu-open-0
|
|
||||||
menu-4-1-foreground = ${colors.powermenu-cancel}
|
|
||||||
|
|
||||||
menu-5-0 = " power off"
|
|
||||||
menu-5-0-exec = "poweroff"
|
|
||||||
menu-5-0-foreground = ${colors.powermenu-power-off}
|
|
||||||
menu-5-1 = "ﰸ cancel"
|
|
||||||
menu-5-1-exec = menu-open-0
|
|
||||||
menu-5-1-foreground = ${colors.powermenu-cancel}
|
|
||||||
|
|
||||||
menu-6-0 = "鈴 hibernate"
|
|
||||||
menu-6-0-exec = "systemctl hibernate"
|
|
||||||
menu-6-0-foreground = ${colors.powermenu-hibernate}
|
|
||||||
menu-6-1 = "ﰸ cancel"
|
|
||||||
menu-6-1-exec = menu-open-0
|
|
||||||
menu-6-1-foreground = ${colors.powermenu-cancel}
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
**** User / Kernel
|
**** User / Kernel
|
||||||
@ -1818,8 +1759,6 @@ Define module update intervals in seconds.
|
|||||||
*** Launch Script
|
*** Launch Script
|
||||||
|
|
||||||
#+begin_src shell :shebang #!/bin/bash :tangle polybar/launch.sh
|
#+begin_src shell :shebang #!/bin/bash :tangle polybar/launch.sh
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
BAR="mybar"
|
BAR="mybar"
|
||||||
CONFIG="~/.xmonad/polybar/config.ini"
|
CONFIG="~/.xmonad/polybar/config.ini"
|
||||||
NUM_MONITORS=0
|
NUM_MONITORS=0
|
||||||
|
@ -913,9 +913,9 @@ label-maxlen = ${sizes.maxlen}
|
|||||||
; %pid%
|
; %pid%
|
||||||
;
|
;
|
||||||
; "click-(left|middle|right)" will be executed using "/bin/sh -c [command]"
|
; "click-(left|middle|right)" will be executed using "/bin/sh -c [command]"
|
||||||
click-left = playerctl --player=playerctld play-pause &
|
click-left = "/home/sravan/.scripts/playerctl.sh --play-pause"
|
||||||
; click-middle = echo middle %counter%
|
; click-middle = echo middle %counter%
|
||||||
click-right = playerctld shift &
|
click-right = "/home/sravan/.scripts/playerctl.sh --change"
|
||||||
; double-click-left = echo double left %counter%
|
; double-click-left = echo double left %counter%
|
||||||
; double-click-middle = echo double middle %counter%
|
; double-click-middle = echo double middle %counter%
|
||||||
; double-click-right = echo double right %counter%
|
; double-click-right = echo double right %counter%
|
||||||
@ -925,8 +925,8 @@ click-right = playerctld shift &
|
|||||||
; %pid%
|
; %pid%
|
||||||
;
|
;
|
||||||
; "scroll-(up|down)" will be executed using "/bin/sh -c [command]"
|
; "scroll-(up|down)" will be executed using "/bin/sh -c [command]"
|
||||||
scroll-up = "playerctl --player=playerctld next"
|
scroll-up = "/home/sravan/.scripts/playerctl.sh --next"
|
||||||
scroll-down = "playerctl --player=playerctld previous"
|
scroll-down = "/home/sravan/.scripts/playerctl.sh --prev"
|
||||||
|
|
||||||
[module/dunst-notification-status]
|
[module/dunst-notification-status]
|
||||||
type = custom/script
|
type = custom/script
|
||||||
@ -969,9 +969,9 @@ label-foreground = ${colors.dunst-notification-status}
|
|||||||
; %pid%
|
; %pid%
|
||||||
;
|
;
|
||||||
; "click-(left|middle|right)" will be executed using "/bin/sh -c [command]"
|
; "click-(left|middle|right)" will be executed using "/bin/sh -c [command]"
|
||||||
click-left = "dunstctl set-paused toggle &"
|
click-left = "/home/sravan/.scripts/dunst.sh --dnd"
|
||||||
; click-middle = echo middle %counter%
|
; click-middle = echo middle %counter%
|
||||||
click-right = "dunstctl history-pop &"
|
click-right = "/home/sravan/.scripts/dunst.sh --history"
|
||||||
; double-click-left = echo double left %counter%
|
; double-click-left = echo double left %counter%
|
||||||
; double-click-middle = echo double middle %counter%
|
; double-click-middle = echo double middle %counter%
|
||||||
; double-click-right = echo double right %counter%
|
; double-click-right = echo double right %counter%
|
||||||
@ -985,79 +985,24 @@ click-right = "dunstctl history-pop &"
|
|||||||
; scroll-down =
|
; scroll-down =
|
||||||
|
|
||||||
[module/powermenu]
|
[module/powermenu]
|
||||||
type = custom/menu
|
type = custom/text
|
||||||
|
content = " "
|
||||||
|
|
||||||
expand-right = true
|
; "content" has the same properties as "format-NAME"
|
||||||
|
; content-background = #000
|
||||||
|
content-foreground = ${colors.powermenu}
|
||||||
|
content-padding = ${bar/mybar.module-margin}
|
||||||
|
|
||||||
format-spacing = ${bar/mybar.module-margin}
|
; "click-(left|middle|right)" will be executed using "/bin/sh -c $COMMAND"
|
||||||
|
; click-left = notify-send left
|
||||||
|
; click-middle = notify-send middle
|
||||||
|
; click-right = notify-send right
|
||||||
|
click-left = "rofi -show combi"
|
||||||
|
click-right = "/home/sravan/.scripts/control-center.sh --rofi"
|
||||||
|
|
||||||
label-open = " "
|
; "scroll-(up|down)" will be executed using "/bin/sh -c $COMMAND"
|
||||||
label-open-foreground = ${colors.powermenu}
|
; scroll-up = notify-send scroll up
|
||||||
label-close = " close"
|
; scroll-down = notify-send scroll down
|
||||||
label-close-foreground = ${colors.powermenu-close}
|
|
||||||
label-separator = ${bar/mybar.separator}
|
|
||||||
label-separator-foreground = ${colors.foreground}
|
|
||||||
|
|
||||||
menu-0-0 = " logout"
|
|
||||||
menu-0-0-exec = menu-open-1
|
|
||||||
menu-0-0-foreground = ${colors.powermenu-logout}
|
|
||||||
menu-0-1 = " lock"
|
|
||||||
menu-0-1-exec = menu-open-2
|
|
||||||
menu-0-1-foreground = ${colors.powermenu-lock}
|
|
||||||
menu-0-2 = "⏾ sleep"
|
|
||||||
menu-0-2-exec = menu-open-3
|
|
||||||
menu-0-2-foreground = ${colors.powermenu-sleep}
|
|
||||||
menu-0-3 = "ﰇ reboot"
|
|
||||||
menu-0-3-exec = menu-open-4
|
|
||||||
menu-0-3-foreground = ${colors.powermenu-reboot}
|
|
||||||
menu-0-4 = " power off"
|
|
||||||
menu-0-4-exec = menu-open-5
|
|
||||||
menu-0-4-foreground = ${colors.powermenu-power-off}
|
|
||||||
menu-0-5 = "鈴 hibernate"
|
|
||||||
menu-0-5-exec = menu-open-6
|
|
||||||
menu-0-5-foreground = ${colors.powermenu-hibernate}
|
|
||||||
|
|
||||||
menu-1-0 = " logout"
|
|
||||||
menu-1-0-exec = "pkill xmonad"
|
|
||||||
menu-1-0-foreground = ${colors.powermenu-logout}
|
|
||||||
menu-1-1 = "ﰸ cancel"
|
|
||||||
menu-1-1-exec = menu-open-0
|
|
||||||
menu-1-1-foreground = ${colors.powermenu-cancel}
|
|
||||||
|
|
||||||
menu-2-0 = " lock"
|
|
||||||
menu-2-0-exec = "light-locker-command --lock"
|
|
||||||
menu-2-0-foreground = ${colors.powermenu-lock}
|
|
||||||
menu-2-1 = "ﰸ cancel"
|
|
||||||
menu-2-1-exec = menu-open-0
|
|
||||||
menu-2-1-foreground = ${colors.powermenu-cancel}
|
|
||||||
|
|
||||||
menu-3-0 = "⏾ sleep"
|
|
||||||
menu-3-0-exec = "systemctl suspend"
|
|
||||||
menu-3-0-foreground = ${colors.powermenu-sleep}
|
|
||||||
menu-3-1 = "ﰸ cancel"
|
|
||||||
menu-3-1-exec = menu-open-0
|
|
||||||
menu-3-1-foreground = ${colors.powermenu-cancel}
|
|
||||||
|
|
||||||
menu-4-0 = "ﰇ reboot"
|
|
||||||
menu-4-0-exec = "reboot"
|
|
||||||
menu-4-0-foreground = ${colors.powermenu-reboot}
|
|
||||||
menu-4-1 = "ﰸ cancel"
|
|
||||||
menu-4-1-exec = menu-open-0
|
|
||||||
menu-4-1-foreground = ${colors.powermenu-cancel}
|
|
||||||
|
|
||||||
menu-5-0 = " power off"
|
|
||||||
menu-5-0-exec = "poweroff"
|
|
||||||
menu-5-0-foreground = ${colors.powermenu-power-off}
|
|
||||||
menu-5-1 = "ﰸ cancel"
|
|
||||||
menu-5-1-exec = menu-open-0
|
|
||||||
menu-5-1-foreground = ${colors.powermenu-cancel}
|
|
||||||
|
|
||||||
menu-6-0 = "鈴 hibernate"
|
|
||||||
menu-6-0-exec = "systemctl hibernate"
|
|
||||||
menu-6-0-foreground = ${colors.powermenu-hibernate}
|
|
||||||
menu-6-1 = "ﰸ cancel"
|
|
||||||
menu-6-1-exec = menu-open-0
|
|
||||||
menu-6-1-foreground = ${colors.powermenu-cancel}
|
|
||||||
|
|
||||||
[module/user-kernel]
|
[module/user-kernel]
|
||||||
type = custom/ipc
|
type = custom/ipc
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
BAR="mybar"
|
BAR="mybar"
|
||||||
CONFIG="~/.xmonad/polybar/config.ini"
|
CONFIG="~/.xmonad/polybar/config.ini"
|
||||||
NUM_MONITORS=0
|
NUM_MONITORS=0
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Check if dunst is running
|
# Check if dunst is running
|
||||||
if pgrep -x "dunst" > /dev/null
|
if pgrep -x "dunst" > /dev/null
|
||||||
then
|
then
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#!/usr/bin/bash
|
|
||||||
|
|
||||||
mediaStatus=$(playerctl --player=playerctld metadata 2>&1)
|
mediaStatus=$(playerctl --player=playerctld metadata 2>&1)
|
||||||
|
|
||||||
if [[ "$mediaStatus" == "No player could handle this command" ]]; then
|
if [[ "$mediaStatus" == "No player could handle this command" ]]; then
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if ! num_updates=$(paru -Qu 2>/dev/null | wc -l); then
|
if ! num_updates=$(paru -Qu 2>/dev/null | wc -l); then
|
||||||
# if ! updates_aur=$(yay -Qum 2>/dev/null | wc -l); then
|
# if ! updates_aur=$(yay -Qum 2>/dev/null | wc -l); then
|
||||||
# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then
|
# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then
|
||||||
|
56
xmonad.hs
56
xmonad.hs
@ -24,7 +24,7 @@ import XMonad.Actions.CycleWS
|
|||||||
|
|
||||||
-- layout
|
-- layout
|
||||||
import XMonad.Layout.NoBorders
|
import XMonad.Layout.NoBorders
|
||||||
import XMonad.Layout.Spacing (spacing)
|
import XMonad.Layout.Spacing (spacingRaw, Border(Border))
|
||||||
import XMonad.Layout.GridVariants (Grid(Grid))
|
import XMonad.Layout.GridVariants (Grid(Grid))
|
||||||
import XMonad.Layout.ResizableTile
|
import XMonad.Layout.ResizableTile
|
||||||
|
|
||||||
@ -92,7 +92,9 @@ myKeys =
|
|||||||
|
|
||||||
-- launch rofi
|
-- launch rofi
|
||||||
, ("M-p", spawn "rofi -show combi")
|
, ("M-p", spawn "rofi -show combi")
|
||||||
|
, ("M-S-p", spawn "/home/sravan/.scripts/control-center.sh --rofi")
|
||||||
, ("M-c", spawn "rofi -show clipboard")
|
, ("M-c", spawn "rofi -show clipboard")
|
||||||
|
, ("M-b", spawn "rofi-rbw")
|
||||||
|
|
||||||
-- volume control
|
-- volume control
|
||||||
, ("<XF86AudioRaiseVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ +1%") -- increase volume
|
, ("<XF86AudioRaiseVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ +1%") -- increase volume
|
||||||
@ -100,29 +102,21 @@ myKeys =
|
|||||||
, ("<XF86AudioMute>", spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle") -- mute volume
|
, ("<XF86AudioMute>", spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle") -- mute volume
|
||||||
|
|
||||||
-- media control
|
-- media control
|
||||||
, ("<XF86AudioPlay>", spawn "playerctl --player=playerctld play-pause") -- play / pause
|
, ("<XF86AudioPlay>", spawn "/home/sravan/.scripts/playerctl.sh --play-pause") -- play / pause
|
||||||
, ("C-<XF86AudioPlay>", spawn "playerctl --player=playerctld next") -- next
|
, ("M-m", spawn "/home/sravan/.scripts/playerctl.sh --rofi") -- rofi menu
|
||||||
, ("C-S-<XF86AudioPlay>", spawn "playerctl --player=playerctld previous") -- previous
|
|
||||||
, ("S-<XF86AudioPlay>", spawn "playerctld shift") -- change player
|
|
||||||
|
|
||||||
-- notification control
|
-- notification control
|
||||||
, ("M-n", spawn "dunstctl context") -- notification context menu
|
, ("M-n", spawn "/home/sravan/.scripts/dunst.sh --rofi") -- rofi menu
|
||||||
, ("M-C-n", spawn "dunstctl close") -- close notification
|
|
||||||
, ("M-S-n", spawn "dunstctl history-pop") -- pop history
|
|
||||||
, ("M-C-S-n", spawn "dunstctl set-paused toggle") -- toggle do not disturb
|
|
||||||
|
|
||||||
-- system control
|
-- session control
|
||||||
, ("M-q", spawn "xmonad --recompile; xmonad --restart") -- recompile and restart xmonad
|
, ("M-q", spawn "/home/sravan/.scripts/session.sh --rofi") -- rofi menu
|
||||||
, ("M-C-S-q", io (exitWith ExitSuccess)) -- quit xmonad
|
|
||||||
, ("M-C-S-l", spawn "light-locker-command --lock") -- lock
|
|
||||||
, ("M-C-S-s", spawn "systemctl suspend") -- suspend
|
|
||||||
|
|
||||||
-- close focused window
|
-- close focused window
|
||||||
, ("M-S-c", kill) -- regular kill
|
, ("M-S-c", kill) -- regular kill
|
||||||
, ("M-C-S-c", spawn "xkill") -- force kill
|
, ("M-C-S-c", spawn "xkill") -- force kill
|
||||||
|
|
||||||
-- toggle compositor
|
-- compositor control
|
||||||
, ("M-<Esc>", spawn "/home/sravan/.config/picom/toggle_picom.sh")
|
, ("M-<Esc>", spawn "/home/sravan/.scripts/picom.sh --rofi")
|
||||||
|
|
||||||
-- screenshot
|
-- screenshot
|
||||||
, ("<Print>", spawn "flameshot gui")
|
, ("<Print>", spawn "flameshot gui")
|
||||||
@ -147,17 +141,25 @@ myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
|
|||||||
myLayout =
|
myLayout =
|
||||||
avoidStruts ( tiled ||| grid ||| monocle )
|
avoidStruts ( tiled ||| grid ||| monocle )
|
||||||
where
|
where
|
||||||
|
-- Gaps around and between windows
|
||||||
|
-- Changes only seem to apply if I log out then in again
|
||||||
|
-- Dimensions are given as (Border top bottom right left)
|
||||||
|
mySpacing = spacingRaw False -- Only for >1 window
|
||||||
|
-- The bottom edge seems to look narrower than it is
|
||||||
|
(Border 10 15 15 15) -- Size of screen edge gaps
|
||||||
|
True -- Enable screen edge gaps
|
||||||
|
(Border 10 10 10 10) -- Size of window gaps
|
||||||
|
True -- Enable window gaps
|
||||||
|
|
||||||
-- default tiling algorithm partitions the screen into two panes
|
-- default tiling algorithm partitions the screen into two panes
|
||||||
nmaster = 1
|
nmaster = 1
|
||||||
delta = 3/100
|
delta = 3/100
|
||||||
tiled_ratio = 1/2
|
tiled_ratio = 1/2
|
||||||
tiled_spacing = 10
|
tiled = mySpacing $ ResizableTall nmaster delta tiled_ratio []
|
||||||
tiled = spacing tiled_spacing $ ResizableTall nmaster delta tiled_ratio []
|
|
||||||
|
|
||||||
-- grid
|
-- grid
|
||||||
grid_ratio = 16/9
|
grid_ratio = 16/9
|
||||||
grid_spacing = 10
|
grid = mySpacing $ Grid grid_ratio
|
||||||
grid = spacing grid_spacing $ Grid grid_ratio
|
|
||||||
|
|
||||||
-- monocle
|
-- monocle
|
||||||
-- monocle = smartBorders (Full)
|
-- monocle = smartBorders (Full)
|
||||||
@ -176,11 +178,6 @@ myPlacement = withGaps (16,0,16,0) (smart (0.5,0.5))
|
|||||||
myEventHook = ewmhDesktopsEventHook
|
myEventHook = ewmhDesktopsEventHook
|
||||||
|
|
||||||
myStartupHook = do
|
myStartupHook = do
|
||||||
-- System Restore Processes
|
|
||||||
spawnOnce "/home/sravan/.screenlayout/default.sh &" -- restore default screen layout
|
|
||||||
spawnOnce "nitrogen --restore &" -- restore wallpaper
|
|
||||||
spawnOnce "numlockx on &" -- enable numlock
|
|
||||||
|
|
||||||
-- System Tray Applications
|
-- System Tray Applications
|
||||||
spawnOnce "nyrna &" -- Nyrna Application Suspend
|
spawnOnce "nyrna &" -- Nyrna Application Suspend
|
||||||
spawnOnce "blueman-applet &" -- Blueman Bluetooth Manager
|
spawnOnce "blueman-applet &" -- Blueman Bluetooth Manager
|
||||||
@ -190,14 +187,19 @@ myStartupHook = do
|
|||||||
spawnOnce "xfce4-power-manager &" -- XFCE4 Power Manager
|
spawnOnce "xfce4-power-manager &" -- XFCE4 Power Manager
|
||||||
|
|
||||||
-- Background Processes
|
-- Background Processes
|
||||||
spawnOnce "/home/sravan/.config/picom/toggle_picom.sh &" -- Picom Compositor
|
spawnOnce "/home/sravan/.scripts/picom.sh --on &" -- Picom Compositor
|
||||||
spawnOnce "/home/sravan/.config/dunst/launch_dunst.sh &" -- Dunst Notification Daemon
|
spawnOnce "/home/sravan/.scripts/dunst.sh --on &" -- Dunst Notification Daemon
|
||||||
spawnOnce "greenclip daemon &" -- Greenclip Clipboard Manager
|
spawnOnce "greenclip daemon &" -- Greenclip Clipboard Manager
|
||||||
spawnOnce "redshift -x &" -- Reset redshift display gamma
|
spawnOnce "redshift -x &" -- Reset redshift display gamma
|
||||||
spawnOnce "redshift-gtk &" -- Redshift Blue Light Filter
|
spawnOnce "redshift-gtk &" -- Redshift Blue Light Filter
|
||||||
spawnOnce "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &" -- GNOME Polkit Authentication Agent
|
spawnOnce "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &" -- GNOME Polkit Authentication Agent
|
||||||
spawnOnce "light-locker --lock-on-suspend --lock-on-lid &" -- screen lock for lightdm
|
spawnOnce "light-locker --lock-on-suspend --lock-on-lid &" -- screen lock for lightdm
|
||||||
|
|
||||||
|
-- System Restore Processes
|
||||||
|
spawnOnce "/home/sravan/.screenlayout/default.sh &" -- restore default screen layout
|
||||||
|
spawnOnce "nitrogen --restore &" -- restore wallpaper
|
||||||
|
spawnOnce "numlockx on &" -- enable numlock
|
||||||
|
|
||||||
main = do
|
main = do
|
||||||
-- launches polybar
|
-- launches polybar
|
||||||
spawn "/home/sravan/.xmonad/polybar/launch.sh &"
|
spawn "/home/sravan/.xmonad/polybar/launch.sh &"
|
||||||
|
Reference in New Issue
Block a user