hypr-dotfiles/waybar/config
Jeena de7375bfb7 Add idle-inhibit
Sometimes I don't want the computer to go to sleep bacause I'm
running something in the background. for that I always used
systemd-inhibit sleep 999999 manually on the terminal, but I want
it to be easy to use without remembering the whole command every
time.

Therefor I added a custom button to waybar which does that for me.
2025-12-13 14:27:09 +09:00

119 lines
3.1 KiB
Text

{
"spacing": 4,
"modules-left": [
"custom/menu",
"hyprland/workspaces",
"hyprland/window"
],
"modules-center": [
"clock"
],
"modules-right": [
"custom/date",
"wireplumber",
"network",
"hyprland/language",
"custom/notifications",
"custom/idle-inhibit",
"custom/power"
],
"hyprland/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"warp-on-scroll": false,
"format": "{name}",
"format-icons": {
"urgent": "",
"active": "",
"default": ""
}
},
"custom/menu": {
"format": " 󰣇 ",
"tooltip": false,
"on-click": "$HOME/.config/hypr/scripts/launch-menu.sh"
},
"hyprland/language": {
"format": "<big>󰌌</big> {long}",
"format-us": "US",
"format-se": "SE",
"format-kr": "KR",
"keyboard-name": "typematrix.com-usb-keyboard",
"on-click": "hyprctl switchxkblayout all next"
},
"clock": {
"format": "{:%H:%M}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"on-click": "gnome-clocks"
},
"wireplumber": {
"format": " {volume}% · {node_name}",
"format-muted": "",
"scroll-step": 5,
"reverse-mouse-scrolling": true,
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
"on-click-right": "$HOME/.config/tofi/select_audio.py"
},
"network": {
"format-wifi": " {essid}",
"format-ethernet": "󰈀 Wired",
"on-click": "kitty -e nmtui"
},
"custom/date": {
"format": "{}",
"exec": "date +\"<big>󰸗</big> %A %Y-%m-%d\"",
"on-click": "gnome-calendar",
"interval": 60
},
"custom/notifications2": {
"format": "  ",
"on-click": "swaync-client -t",
"tooltip": false
},
"custom/notifications": {
"tooltip": false,
"format": "{} {icon}",
"format-icons": {
"notification": "󱅫",
"none": "",
"dnd-notification": " ",
"dnd-none": "󰂛",
"inhibited-notification": " ",
"inhibited-none": "",
"dnd-inhibited-notification": " ",
"dnd-inhibited-none": " ",
},
"return-type": "json",
"exec-if": "which swaync-client",
"exec": "swaync-client -swb",
"on-click": "sleep 0.1 && swaync-client -t -sw",
"on-click-right": "sleep 0.1 && swaync-client -d -sw",
"escape": true
},
"custom/idle-inhibit": {
"exec": "if test -f $XDG_RUNTIME_DIR/idle-inhibit.pid; then echo '󰅶'; else echo '󰾪'; fi",
"on-click": "~/.config/hypr/scripts/idle-inhibit-toggle.sh",
"interval": 2,
"return-type": "raw",
"tooltip": true,
"tooltip-format": "Idle inhibit"
},
"custom/power": {
"format": " ⏻ ",
"tooltip": false,
"on-click": "wlogout --protocol layer-shell"
}
}