From 1b7923ba5d71fe0234304912b69d2d8e9b045c12 Mon Sep 17 00:00:00 2001 From: The_miro Date: Sun, 24 Nov 2024 15:29:34 +0100 Subject: [PATCH] some cosmetics --- desktopenvs/hyprland/hypr/hyprland.conf | 2 +- desktopenvs/hyprland/waybar/config | 79 ++++++------ desktopenvs/hyprland/waybar/style.css | 4 +- desktopenvs/hyprland/waybar/testconf | 161 ++++++++++++++++++++++++ 4 files changed, 199 insertions(+), 47 deletions(-) create mode 100644 desktopenvs/hyprland/waybar/testconf diff --git a/desktopenvs/hyprland/hypr/hyprland.conf b/desktopenvs/hyprland/hypr/hyprland.conf index 5b194f2..607dcf1 100644 --- a/desktopenvs/hyprland/hypr/hyprland.conf +++ b/desktopenvs/hyprland/hypr/hyprland.conf @@ -1,4 +1,3 @@ - ############# ### INPUT ### ############# @@ -223,6 +222,7 @@ bind = $mainMod, H, movecurrentworkspacetomonitor bind = $mainMod, D, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle bind = $mainMod, L, exec, hyprctl dispatch exit 1 +bind = $mainMod, A, exec, killall waybar ; waybar # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l diff --git a/desktopenvs/hyprland/waybar/config b/desktopenvs/hyprland/waybar/config index 08701c9..eaf266a 100644 --- a/desktopenvs/hyprland/waybar/config +++ b/desktopenvs/hyprland/waybar/config @@ -1,16 +1,19 @@ - { +{ "layer": "top", "position": "top", "modules-left": ["clock", "disk", "memory", "cpu", "temperature" ], "modules-center": [ "hyprland/workspaces", "hyprland/window"], - "modules-right": ["tray", "pulseaudio", "network", "battery" ], + "modules-right": [ "network", "custom/netaddrsimple", "tray", "pulseaudio", "battery" ], "reload_style_on_change":true, - "custom/logo": { - "format": "", - "tooltip": false - }, + "custom/netaddrsimple": { + "format": "IP:{}", + "tooltip":false, + //"max-length": 15, + "interval": 10, + "exec": "hostname -i", + }, - "hyprland/workspaces": { + "hyprland/workspaces": { "format": "{name}", "format-icons": { "default": " ", @@ -25,7 +28,7 @@ "tooltip": true, "tooltip-format": "{:%A, %d.%B %Y }\n{calendar}" } - }, + }, "idle_inhibitor":{ @@ -36,21 +39,6 @@ } }, -"custom/weather": { - "format": "{}", - "return-type": "json", - "exec": "~/.config/waybar/scripts/weather.sh", - "interval": 10, - "on-click": "firefox https://wttr.in" -}, - -"custom/clipboard":{ - "format":"", - "on-click": "cliphist list | rofi -dmenu | cliphist decode | wl-copy", - "interval":86400 -}, - - "clock": { "format": "{:%H:%M:%S }", "interval":1, @@ -75,34 +63,26 @@ "on-click": "rofi-bluetooth", }, -"network": { - "format-wifi": " ", - "format-ethernet":" ", - "format-disconnected": "", - "tooltip-format": "{ipaddr}", - "tooltip-format-wifi": "{essid} ({signalStrength}%)  | {ipaddr}", - "tooltip-format-ethernet": "{ifname} 🖧 | {ipaddr}", - "on-click": "networkmanager_dmenu" - }, -"battery": { - "interval":1, + + "battery": { + "interval":1, "states": { "good": 95, "warning": 30, "critical": 20 }, - "format": "{capacity}% {icon} ", - "format-charging": "{capacity}% 󰂄 ", - "format-plugged": "{capacity}% 󰂄 ", + "format": "PWR- {capacity}% {icon} ", + "format-charging": "PWR+ {capacity}% 󰂄 ", + "format-plugged": "PWR+ {capacity}% 󰂄 ", "format-alt": "{time} {icon}", - "format-icons": [ - "󰁻", - "󰁼", - "󰁾", - "󰂀", - "󰂂", - "󰁹" + "format-icons": [ + "󰁻", + "󰁼", + "󰁾", + "󰂀", + "󰂂", + "󰁹" ], }, "backlight": { @@ -207,11 +187,22 @@ "tooltip-spacing": 20 }, + + "network":{ + "format-wifi": " ", + "format-ethernet":" ", + "format-disconnected": "", + "tooltip-format": "{ifname}", + "tooltip-format-wifi": "{essid} ({signalStrength}%)  | {ipaddr}", + "tooltip-format-ethernet": "{ifname} 🖧 | {ipaddr}" + }, + "custom/powerDraw": { "format": "{}", "interval": 1, "exec": "~/.config/waybar/scripts/powerdraw.sh", "return-type": "json" } + } diff --git a/desktopenvs/hyprland/waybar/style.css b/desktopenvs/hyprland/waybar/style.css index 8a73e2e..184ab4c 100644 --- a/desktopenvs/hyprland/waybar/style.css +++ b/desktopenvs/hyprland/waybar/style.css @@ -1,6 +1,6 @@ * { border: none; - font-family: Agave Nerd Font Mono, Arial, sans-serif; + font-family: Agave Nerd Font Mono, sans-serif; font-size: 12pt; background: transparent; @@ -42,7 +42,7 @@ } - #clock, #disk, #window, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #custom-media, #tray, #mode, #idle_inhibitor { + #clock, #disk, #window, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #custom-media, #tray, #mode, #idle_inhibitor, #custom-netaddrsimple { border: solid; border-width: 3px; background: #1a1a1a; diff --git a/desktopenvs/hyprland/waybar/testconf b/desktopenvs/hyprland/waybar/testconf new file mode 100644 index 0000000..f7dbe32 --- /dev/null +++ b/desktopenvs/hyprland/waybar/testconf @@ -0,0 +1,161 @@ +{ + "layer": "bottom", + "position": "bottom", + "mod": "dock", + "exclusive": true, + "gtk-layer-shell": true, + "margin-bottom": -1, + "passthrough": false, + "height": 41, + "modules-left": [ + "custom/os_button", + "hyprland/workspaces", + "wlr/taskbar" + ], + "modules-center": [], + "modules-right": [ + "cpu", + "temperature", + "memory", + "disk", + "tray", + "pulseaudio", + "network", + "battery", + "hyprland/language", + "clock" + ], + "hyprland/language": { + "format": "{}", + "format-en": "ENG", + "format-ru": "РУС" + }, + "hyprland/workspaces": { + "icon-size": 32, + "spacing": 16, + "on-scroll-up": "hyprctl dispatch workspace r+1", + "on-scroll-down": "hyprctl dispatch workspace r-1" + }, + "custom/os_button": { + "format": "", + "on-click": "wofi --show drun", + "tooltip": false + }, + "cpu": { + "interval": 5, + "format": " {usage}%", + "max-length": 10 + }, + "temperature": { + "hwmon-path-abs": "/sys/devices/platform/coretemp.0/hwmon", + "input-filename": "temp2_input", + "critical-threshold": 75, + "tooltip": false, + "format-critical": "({temperatureC}°C)", + "format": "({temperatureC}°C)" + }, + "disk": { + "interval": 30, + "format": "󰋊 {percentage_used}%", + "path": "/", + "tooltip": true, + "unit": "GB", + "tooltip-format": "Available {free} of {total}" + }, + "memory": { + "interval": 10, + "format": " {percentage}%", + "max-length": 10, + "tooltip": true, + "tooltip-format": "RAM - {used:0.1f}GiB used" + }, + "wlr/taskbar": { + "format": "{icon} {title:.17}", + "icon-size": 28, + "spacing": 3, + "on-click-middle": "close", + "tooltip-format": "{title}", + "ignore-list": [], + "on-click": "activate" + }, + "tray": { + "icon-size": 18, + "spacing": 3 + }, + "clock": { + "format": " {:%R\n %d.%m.%Y}", + "tooltip-format": "{calendar}", + "calendar": { + "mode": "year", + "mode-mon-col": 3, + "weeks-pos": "right", + "on-scroll": 1, + "on-click-right": "mode", + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}" + } + }, + "actions": { + "on-click-right": "mode", + "on-click-forward": "tz_up", + "on-click-backward": "tz_down", + "on-scroll-up": "shift_up", + "on-scroll-down": "shift_down" + } + }, + "network": { + "format-wifi": " {icon}", + "format-ethernet": "  ", + "format-disconnected": "󰌙", + "format-icons": [ + "󰤯 ", + "󰤟 ", + "󰤢 ", + "󰤢 ", + "󰤨 " + ] + }, + "battery": { + "states": { + "good": 95, + "warning": 30, + "critical": 20 + }, + "format": "{icon} {capacity}%", + "format-charging": " {capacity}%", + "format-plugged": " {capacity}%", + "format-alt": "{time} {icon}", + "format-icons": [ + "󰂎", + "󰁺", + "󰁻", + "󰁼", + "󰁽", + "󰁾", + "󰁿", + "󰂀", + "󰂁", + "󰂂", + "󰁹" + ] + }, + "pulseaudio": { + "max-volume": 150, + "scroll-step": 10, + "format": "{icon}", + "tooltip-format": "{volume}%", + "format-muted": " ", + "format-icons": { + "default": [ + " ", + " ", + " " + ] + }, + "on-click": "pwvucontrol" + } +}