go back to a more elegant and consistent look, while merging some of the ideas of the previous one
This commit is contained in:
parent
5a600d1cdc
commit
2b59f0f44d
3 changed files with 83 additions and 23 deletions
|
@ -14,7 +14,7 @@
|
||||||
"output": "DP-2",
|
"output": "DP-2",
|
||||||
"layer": "top",
|
"layer": "top",
|
||||||
"modules-left": ["hyprland/workspaces", "hyprland/mode"],
|
"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": ["tray", "custom/scratchpad-indicator", "pulseaudio",], */
|
||||||
"modules-right": ["group/taskbar", "group/group-power"],
|
"modules-right": ["group/taskbar", "group/group-power"],
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"custom/pacman": {
|
"custom/pacman": {
|
||||||
"format": "<span color=\"#8BE9FD\"> </span>{} | ",
|
"format": "<span color=\"#8BE9FD\"> </span>{}",
|
||||||
"tooltip": true,
|
"tooltip": true,
|
||||||
"tooltip-format": "Available updates",
|
"tooltip-format": "Available updates",
|
||||||
"interval": 60,
|
"interval": 60,
|
||||||
|
@ -159,10 +159,8 @@
|
||||||
"group/networks": {
|
"group/networks": {
|
||||||
"orientation": "inherit",
|
"orientation": "inherit",
|
||||||
"modules": [
|
"modules": [
|
||||||
"custom/pacman",
|
|
||||||
"network",
|
"network",
|
||||||
"custom/vpn",
|
"custom/vpn",
|
||||||
"bluetooth"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"network": {
|
"network": {
|
||||||
|
@ -214,11 +212,11 @@
|
||||||
},
|
},
|
||||||
"cpu": {
|
"cpu": {
|
||||||
"interval": 10,
|
"interval": 10,
|
||||||
"format": "<span color=\"#cf7cac\">{icon}</span> {usage}% | ",
|
"format": "<span color=\"#cf7cac\">{icon}</span> {usage}%",
|
||||||
"format-icons": [""]
|
"format-icons": [""]
|
||||||
},
|
},
|
||||||
"memory": {
|
"memory": {
|
||||||
"format": "<span color=\"#8BE9FD\">{icon}</span> {percentage}% | ",
|
"format": "<span color=\"#8BE9FD\">{icon}</span> {percentage}%",
|
||||||
"format-icons": [""]
|
"format-icons": [""]
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
|
@ -245,22 +243,22 @@
|
||||||
},
|
},
|
||||||
"disk": {
|
"disk": {
|
||||||
"interval": 30,
|
"interval": 30,
|
||||||
"format": " <span color=\"#8694c0\"></span><span color=\"#50FA7B\"> </span>/: {percentage_used}% | ",
|
"format": " <span color=\"#8694c0\"></span><span color=\"#50FA7B\"> </span>/: {percentage_used}%",
|
||||||
"path": "/"
|
"path": "/"
|
||||||
},
|
},
|
||||||
"disk#disk2": {
|
"disk#disk2": {
|
||||||
"interval": 30,
|
"interval": 30,
|
||||||
"format": " <span color=\"#ff79c6\"> </span>SSD: {percentage_used}% | ",
|
"format": " <span color=\"#ff79c6\"> </span>SSD: {percentage_used}%",
|
||||||
"path": "/mnt/SSD"
|
"path": "/mnt/SSD"
|
||||||
},
|
},
|
||||||
"disk#disk3": {
|
"disk#disk3": {
|
||||||
"interval": 30,
|
"interval": 30,
|
||||||
"format": " <span color=\"#8BE9FD\"> </span>Games: {percentage_used}% | ",
|
"format": " <span color=\"#8BE9FD\"> </span>Games: {percentage_used}%",
|
||||||
"path": "/media/Games"
|
"path": "/media/Games"
|
||||||
},
|
},
|
||||||
"disk#disk4": {
|
"disk#disk4": {
|
||||||
"interval": 30,
|
"interval": 30,
|
||||||
"format": " <span color=\"#ffb86c\"> </span>Backups: {percentage_used}% | ",
|
"format": " <span color=\"#ffb86c\"> </span>Backups: {percentage_used}%",
|
||||||
"path": "/mnt/Backups"
|
"path": "/mnt/Backups"
|
||||||
},"pulseaudio": {
|
},"pulseaudio": {
|
||||||
"format": "{volume}% {icon}",
|
"format": "{volume}% {icon}",
|
||||||
|
@ -296,7 +294,7 @@
|
||||||
"tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%"
|
"tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%"
|
||||||
},
|
},
|
||||||
"custom/vpn": {
|
"custom/vpn": {
|
||||||
"format": "<span color=\"#ff5555\"> </span> | ",
|
"format": "<span color=\"#ff5555\"> </span>",
|
||||||
"tooltip": true,
|
"tooltip": true,
|
||||||
"tooltip-format": "Connected to VPN",
|
"tooltip-format": "Connected to VPN",
|
||||||
"exec": "echo '{\"class\": \"connected\"}'",
|
"exec": "echo '{\"class\": \"connected\"}'",
|
||||||
|
@ -315,7 +313,7 @@
|
||||||
},
|
},
|
||||||
"custom/gpu-usage": {
|
"custom/gpu-usage": {
|
||||||
"exec": "cat /sys/class/hwmon/hwmon1/device/gpu_busy_percent",
|
"exec": "cat /sys/class/hwmon/hwmon1/device/gpu_busy_percent",
|
||||||
"format": "<span color=\"#8694c0\"></span><span color=\"#bd93f9\"> </span>{}% | ",
|
"format": "<span color=\"#8694c0\"></span><span color=\"#bd93f9\"> </span>{}% ",
|
||||||
"return-type": "",
|
"return-type": "",
|
||||||
"interval": 1,
|
"interval": 1,
|
||||||
"tooltip": false
|
"tooltip": false
|
||||||
|
|
|
@ -70,6 +70,17 @@ window#waybar.hidden {
|
||||||
|
|
||||||
#bluetooth {
|
#bluetooth {
|
||||||
color: #f8f8f2;
|
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 {
|
#battery {
|
||||||
|
@ -133,7 +144,8 @@ window#waybar.hidden {
|
||||||
#clock {
|
#clock {
|
||||||
color: #f8f8f2;
|
color: #f8f8f2;
|
||||||
}
|
}
|
||||||
#statistics {
|
#custom-gpu-usage {
|
||||||
|
color: #f8f8f2;
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
|
@ -143,14 +155,34 @@ window#waybar.hidden {
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
transition: none;
|
transition: none;
|
||||||
color: #f8f8f2;
|
|
||||||
background: #282a36;
|
background: #282a36;
|
||||||
}
|
}
|
||||||
|
|
||||||
#memory {
|
#memory {
|
||||||
color: #f8f8f2;
|
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 {
|
#cpu {
|
||||||
color: #f8f8f2;
|
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 {
|
#taskbar {
|
||||||
|
@ -167,10 +199,30 @@ window#waybar.hidden {
|
||||||
|
|
||||||
#disk {
|
#disk {
|
||||||
color: #f8f8f2;
|
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 {
|
#temperature {
|
||||||
color: #f8f8f2;
|
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 {
|
#idle_inhibitor {
|
||||||
|
@ -280,5 +332,15 @@ window#waybar.hidden {
|
||||||
}
|
}
|
||||||
#custom-pacman {
|
#custom-pacman {
|
||||||
color: #f8f2f2;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,13 @@ local M = {}
|
||||||
|
|
||||||
function M:peek(job)
|
function M:peek(job)
|
||||||
local child = Command("ouch")
|
local child = Command("ouch")
|
||||||
:args({ "l", "-t", "-y", tostring(job.file.url) })
|
:arg({ "l", "-t", "-y", tostring(job.file.url) })
|
||||||
:stdout(Command.PIPED)
|
:stdout(Command.PIPED)
|
||||||
:stderr(Command.PIPED)
|
:stderr(Command.PIPED)
|
||||||
:spawn()
|
:spawn()
|
||||||
local limit = job.area.h
|
local limit = job.area.h
|
||||||
local file_name = string.match(tostring(job.file.url), ".*[/\\](.*)")
|
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_lines = 1
|
||||||
local num_skip = 0
|
local num_skip = 0
|
||||||
repeat
|
repeat
|
||||||
|
@ -31,12 +31,12 @@ function M:peek(job)
|
||||||
|
|
||||||
child:start_kill()
|
child:start_kill()
|
||||||
if job.skip > 0 and num_lines < limit then
|
if job.skip > 0 and num_lines < limit then
|
||||||
ya.manager_emit(
|
ya.emit(
|
||||||
"peek",
|
"peek",
|
||||||
{ tostring(math.max(0, job.skip - (limit - num_lines))), only_if = tostring(job.file.url), upper_bound = "" }
|
{ tostring(math.max(0, job.skip - (limit - num_lines))), only_if = tostring(job.file.url), upper_bound = "" }
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
ya.preview_widgets(job, { ui.Text(lines):area(job.area) })
|
ya.preview_widget(job, { ui.Text(lines):area(job.area) })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ function M:seek(job)
|
||||||
local h = cx.active.current.hovered
|
local h = cx.active.current.hovered
|
||||||
if h and h.url == job.file.url then
|
if h and h.url == job.file.url then
|
||||||
local step = math.floor(job.units * job.area.h / 10)
|
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),
|
math.max(0, cx.active.preview.skip + step),
|
||||||
only_if = tostring(job.file.url),
|
only_if = tostring(job.file.url),
|
||||||
})
|
})
|
||||||
|
@ -81,15 +81,15 @@ local get_compression_target = ya.sync(function()
|
||||||
table.insert(paths, tostring(url))
|
table.insert(paths, tostring(url))
|
||||||
end
|
end
|
||||||
-- The compression targets are aquired, now unselect them
|
-- The compression targets are aquired, now unselect them
|
||||||
ya.manager_emit("escape", {})
|
ya.emit("escape", {})
|
||||||
end
|
end
|
||||||
return paths, default_name
|
return paths, default_name
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local function invoke_compress_command(paths, name)
|
local function invoke_compress_command(paths, name)
|
||||||
local cmd_output, err_code = Command("ouch")
|
local cmd_output, err_code = Command("ouch")
|
||||||
:args({ "c", "-y" })
|
:arg({ "c", "-y" })
|
||||||
:args(paths)
|
:arg(paths)
|
||||||
:arg(name)
|
:arg(name)
|
||||||
:stderr(Command.PIPED)
|
:stderr(Command.PIPED)
|
||||||
:output()
|
:output()
|
||||||
|
@ -116,7 +116,7 @@ function M:entry(job)
|
||||||
default_fmt = "zip"
|
default_fmt = "zip"
|
||||||
end
|
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
|
-- Get the files that need to be compressed and infer a default archive name
|
||||||
local paths, default_name = get_compression_target()
|
local paths, default_name = get_compression_target()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue