added idle_inhibitor to waybar

This commit is contained in:
opalvault
2022-01-30 22:29:47 -08:00
parent 4619b45675
commit e6dbee427b
3 changed files with 26 additions and 14 deletions

View File

@@ -62,13 +62,15 @@ exec hash dbus-update-activation-environment 2>/dev/null && \
# Wlsunset (Night Light)
exec_always wlsunset -lsd 47.6, -122.3 -t 3200 -T 6500
### Idle configuration
# Idle configuration
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
# exec swayidle -w \
# timeout 600 'swaylock -f' \
# timeout 1800 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
# timeout 1200 'swaymsg "output * dpms off"' \
# resume 'swaymsg "output * dpms on"' \
# timeout
# before-sleep 'swaylock -f'
# Exit sway (logs you out of your Wayland session)

View File

@@ -4,7 +4,7 @@
"height": 35, // Waybar height
"modules-left": ["sway/workspaces"],
"modules-center": ["clock", "backlight"],
"modules-right": ["pulseaudio", "network", "battery", "tray"],
"modules-right": ["idle_inhibitor", "pulseaudio", "network", "battery", "tray"],
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": false,
@@ -26,9 +26,6 @@
"battery": {
"interval": 30,
"on-scroll-up": "~/.scripts/ChangeBrightness 1%+",
"on-scroll-down": "~/.scripts/ChangeBrightness 1%-",
"on-click": "~/.scripts/ChangeBrightness 0%",
"states": {
// "good": 95,
"warning": 30,
@@ -72,5 +69,12 @@
// "on-scroll-up": "brightnessctl set 1%+",
// "on-scroll-down": "brightnessctl set 1%-",
"on-click": "wlsunset"
}
},
"idle_inhibitor": {
"format": "<span rise='-4000' size='large'>{icon}</span>",
"format-icons": {
"activated": "",
"deactivated": "",
},
},
}

View File

@@ -88,13 +88,15 @@ exec_always wlsunset -lsd 47.6, -122.3 -t 3200 -T 6500
#+end_src
** Idle/Exit Behavior
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
### Idle configuration
# Idle configuration
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
# exec swayidle -w \
# timeout 600 'swaylock -f' \
# timeout 1800 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
# timeout 1200 'swaymsg "output * dpms off"' \
# resume 'swaymsg "output * dpms on"' \
# timeout
# before-sleep 'swaylock -f'
# Exit sway (logs you out of your Wayland session)
@@ -377,7 +379,7 @@ show-failed-attempts
"height": 35, // Waybar height
"modules-left": ["sway/workspaces"],
"modules-center": ["clock", "backlight"],
"modules-right": ["pulseaudio", "network", "battery", "tray"],
"modules-right": ["idle_inhibitor", "pulseaudio", "network", "battery", "tray"],
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": false,
@@ -399,9 +401,6 @@ show-failed-attempts
"battery": {
"interval": 30,
"on-scroll-up": "~/.scripts/ChangeBrightness 1%+",
"on-scroll-down": "~/.scripts/ChangeBrightness 1%-",
"on-click": "~/.scripts/ChangeBrightness 0%",
"states": {
// "good": 95,
"warning": 30,
@@ -445,7 +444,14 @@ show-failed-attempts
// "on-scroll-up": "brightnessctl set 1%+",
// "on-scroll-down": "brightnessctl set 1%-",
"on-click": "wlsunset"
}
},
"idle_inhibitor": {
"format": "<span rise='-4000' size='large'>{icon}</span>",
"format-icons": {
"activated": "",
"deactivated": "",
},
},
}
#+end_src
*** waybar/style.css