From 2b59f0f44d4bbfc09bb2d6a165dbe7dc1430a82f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dom=C3=ADnguez?= Date: Mon, 2 Jun 2025 11:00:24 -0400 Subject: [PATCH] go back to a more elegant and consistent look, while merging some of the ideas of the previous one --- .config/waybar/config | 22 ++++----- .config/waybar/style.css | 66 ++++++++++++++++++++++++- .config/yazi/plugins/ouch.yazi/main.lua | 18 +++---- 3 files changed, 83 insertions(+), 23 deletions(-) diff --git a/.config/waybar/config b/.config/waybar/config index 88c82b5..9242aba 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -14,7 +14,7 @@ "output": "DP-2", "layer": "top", "modules-left": ["hyprland/workspaces", "hyprland/mode"], - "modules-center": ["group/statistics", "group/status", "group/networks", "group/audio-player"], + "modules-center": ["group/statistics", "group/status", "custom/pacman", "group/networks", "bluetooth", "group/audio-player"], /* "modules-right": ["tray", "custom/scratchpad-indicator", "pulseaudio",], */ "modules-right": ["group/taskbar", "group/group-power"], @@ -120,7 +120,7 @@ ] }, "custom/pacman": { - "format": "{} | ", + "format": "{}", "tooltip": true, "tooltip-format": "Available updates", "interval": 60, @@ -159,10 +159,8 @@ "group/networks": { "orientation": "inherit", "modules": [ - "custom/pacman", "network", "custom/vpn", - "bluetooth" ] }, "network": { @@ -214,11 +212,11 @@ }, "cpu": { "interval": 10, - "format": "{icon} {usage}% | ", + "format": "{icon} {usage}%", "format-icons": [""] }, "memory": { - "format": "{icon} {percentage}% | ", + "format": "{icon} {percentage}%", "format-icons": [""] }, "temperature": { @@ -245,22 +243,22 @@ }, "disk": { "interval": 30, - "format": " 󰋊 /: {percentage_used}% | ", + "format": " 󰋊 /: {percentage_used}%", "path": "/" }, "disk#disk2": { "interval": 30, - "format": " 󰋊 SSD: {percentage_used}% | ", + "format": " 󰋊 SSD: {percentage_used}%", "path": "/mnt/SSD" }, "disk#disk3": { "interval": 30, - "format": " 󰋊 Games: {percentage_used}% | ", + "format": " 󰋊 Games: {percentage_used}%", "path": "/media/Games" }, "disk#disk4": { "interval": 30, - "format": " 󰋊 Backups: {percentage_used}% | ", + "format": " 󰋊 Backups: {percentage_used}%", "path": "/mnt/Backups" },"pulseaudio": { "format": "{volume}% {icon}", @@ -296,7 +294,7 @@ "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%" }, "custom/vpn": { - "format": " | ", + "format": "", "tooltip": true, "tooltip-format": "Connected to VPN", "exec": "echo '{\"class\": \"connected\"}'", @@ -315,7 +313,7 @@ }, "custom/gpu-usage": { "exec": "cat /sys/class/hwmon/hwmon1/device/gpu_busy_percent", - "format": "󰍹 {}% | ", + "format": "󰍹 {}% ", "return-type": "", "interval": 1, "tooltip": false diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 92888aa..e2274bd 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -70,6 +70,17 @@ window#waybar.hidden { #bluetooth { color: #f8f8f2; + margin-top: 6px; + margin-left: 8px; + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + padding-bottom: 2px; + margin-bottom: 0px; + border-radius: 10px; + transition: none; + color: #f8f8f2; + background: #282a36; } #battery { @@ -133,7 +144,8 @@ window#waybar.hidden { #clock { color: #f8f8f2; } -#statistics { +#custom-gpu-usage { + color: #f8f8f2; margin-top: 6px; margin-left: 8px; padding-left: 10px; @@ -143,14 +155,34 @@ window#waybar.hidden { margin-bottom: 0px; border-radius: 10px; transition: none; - color: #f8f8f2; background: #282a36; } + #memory { color: #f8f8f2; + margin-top: 6px; + margin-left: 8px; + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + padding-bottom: 2px; + margin-bottom: 0px; + border-radius: 10px; + transition: none; + background: #282a36; } #cpu { color: #f8f8f2; + margin-top: 6px; + margin-left: 8px; + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + padding-bottom: 2px; + margin-bottom: 0px; + border-radius: 10px; + transition: none; + background: #282a36; } #taskbar { @@ -167,10 +199,30 @@ window#waybar.hidden { #disk { color: #f8f8f2; + margin-top: 6px; + margin-left: 8px; + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + padding-bottom: 2px; + margin-bottom: 0px; + border-radius: 10px; + transition: none; + background: #282a36; } #temperature { color: #f8f8f2; + margin-top: 6px; + margin-left: 8px; + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + padding-bottom: 2px; + margin-bottom: 0px; + border-radius: 10px; + transition: none; + background: #282a36; } #idle_inhibitor { @@ -280,5 +332,15 @@ window#waybar.hidden { } #custom-pacman { color: #f8f2f2; + margin-top: 6px; + margin-left: 8px; + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + padding-bottom: 2px; + margin-bottom: 0px; + border-radius: 10px; + transition: none; + background: #282a36; } diff --git a/.config/yazi/plugins/ouch.yazi/main.lua b/.config/yazi/plugins/ouch.yazi/main.lua index f642eb3..9491e17 100644 --- a/.config/yazi/plugins/ouch.yazi/main.lua +++ b/.config/yazi/plugins/ouch.yazi/main.lua @@ -2,13 +2,13 @@ local M = {} function M:peek(job) local child = Command("ouch") - :args({ "l", "-t", "-y", tostring(job.file.url) }) + :arg({ "l", "-t", "-y", tostring(job.file.url) }) :stdout(Command.PIPED) :stderr(Command.PIPED) :spawn() local limit = job.area.h local file_name = string.match(tostring(job.file.url), ".*[/\\](.*)") - local lines = string.format("📁 \x1b[2m%s\x1b[0m\n", file_name) + local lines = string.format("\u{1f4c1} %s\n", file_name) local num_lines = 1 local num_skip = 0 repeat @@ -31,12 +31,12 @@ function M:peek(job) child:start_kill() if job.skip > 0 and num_lines < limit then - ya.manager_emit( + ya.emit( "peek", { tostring(math.max(0, job.skip - (limit - num_lines))), only_if = tostring(job.file.url), upper_bound = "" } ) else - ya.preview_widgets(job, { ui.Text(lines):area(job.area) }) + ya.preview_widget(job, { ui.Text(lines):area(job.area) }) end end @@ -44,7 +44,7 @@ function M:seek(job) local h = cx.active.current.hovered if h and h.url == job.file.url then local step = math.floor(job.units * job.area.h / 10) - ya.manager_emit("peek", { + ya.emit("peek", { math.max(0, cx.active.preview.skip + step), only_if = tostring(job.file.url), }) @@ -81,15 +81,15 @@ local get_compression_target = ya.sync(function() table.insert(paths, tostring(url)) end -- The compression targets are aquired, now unselect them - ya.manager_emit("escape", {}) + ya.emit("escape", {}) end return paths, default_name end) local function invoke_compress_command(paths, name) local cmd_output, err_code = Command("ouch") - :args({ "c", "-y" }) - :args(paths) + :arg({ "c", "-y" }) + :arg(paths) :arg(name) :stderr(Command.PIPED) :output() @@ -116,7 +116,7 @@ function M:entry(job) default_fmt = "zip" end - ya.manager_emit("escape", { visual = true }) + ya.emit("escape", { visual = true }) -- Get the files that need to be compressed and infer a default archive name local paths, default_name = get_compression_target()