From cca6c4807e15af4ef15a767a43dfdc4eeae371c0 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 23 Nov 2024 00:56:09 +0800 Subject: add(waybar, modules): dpms module --- dot-config/waybar/modules.jsonc | 30 ++++++++++++++++++------------ dot-config/waybar/style.css | 6 +++++- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/dot-config/waybar/modules.jsonc b/dot-config/waybar/modules.jsonc index 7a8e3de0..b0e6dd79 100644 --- a/dot-config/waybar/modules.jsonc +++ b/dot-config/waybar/modules.jsonc @@ -262,6 +262,18 @@ "modules": ["clock", "group/small-utils"], "drawer": {} }, + "custom/dpms": { + "format": "󰶐", + "tooltip": false, + "on-click": "notify-send -e 'Hyprland' 'Click again to Turn off monitor'", + "on-double-click": "hyprctl dispatch dpms off" + }, + "custom/lock": { + "format": "󰍁", + "tooltip": false, + "on-click": "notify-send -e 'Hyprland' 'Click again to Lock'", + "on-double-click": "loginctl lock-session" + }, "custom/quit": { "format": "󰗼", "tooltip": false, @@ -274,11 +286,11 @@ "on-click": "notify-send -e 'Hyprland' 'Click again to Suspend'", "on-double-click": "systemctl suspend" }, - "custom/lock": { - "format": "󰍁", + "custom/shutdown": { + "format": "", "tooltip": false, - "on-click": "notify-send -e 'Hyprland' 'Click again to Lock'", - "on-double-click": "loginctl lock-session" + "on-click": "notify-send -e 'Hyprland' 'Click again to Shutdown'", + "on-double-click": "shutdown now" }, "custom/reboot": { "format": "󰜉", @@ -286,12 +298,6 @@ "on-click": "notify-send -e 'Hyprland' 'Click again to Reboot'", "on-double-click": "reboot" }, - "custom/shutdown": { - "format": "", - "tooltip": false, - "on-click": "notify-send -e 'Hyprland' 'Click again to Shutdown'", - "on-double-click": "shutdown now" - }, "group/power": { "orientation": "inherit", "drawer": { @@ -300,9 +306,9 @@ }, "modules": [ "custom/shutdown", - "custom/quit", - "custom/suspend", + "custom/dpms", "custom/lock", + "custom/suspend", "custom/reboot", ] }, diff --git a/dot-config/waybar/style.css b/dot-config/waybar/style.css index 8c5bece4..34c1a1c4 100644 --- a/dot-config/waybar/style.css +++ b/dot-config/waybar/style.css @@ -145,7 +145,11 @@ tooltip { padding-left: 17px; } -#custom-quit, #custom-lock, #custom-suspend, #custom-reboot { +#custom-dpms { + padding-right: 22px; +} + +#custom-quit, #custom-lock, #custom-suspend, #custom-reboot, #custom-dpms { color: @YELLOW; } -- cgit v1.2.3