New backup 2025-03-04 02:15:01
This commit is contained in:
parent
5b38aa45ce
commit
5b291584e4
3 changed files with 16 additions and 9 deletions
|
@ -9,7 +9,8 @@
|
|||
padding: 5px 0px;
|
||||
}
|
||||
.workspaces,
|
||||
.music {
|
||||
.music,
|
||||
.active_window {
|
||||
margin: 10px;
|
||||
}
|
||||
.tray_children {
|
||||
|
@ -54,7 +55,8 @@ circular-progress {
|
|||
}
|
||||
.rightgroup>label,
|
||||
.rightgroup>button,
|
||||
.music {
|
||||
.music,
|
||||
.active_window {
|
||||
background-color: $color9;
|
||||
border: 2px solid $color1;
|
||||
color: $color0;
|
||||
|
@ -78,6 +80,7 @@ label {
|
|||
color: $color0;
|
||||
// margin: 10px 0px;
|
||||
padding: 5px;
|
||||
min-width: 25px;
|
||||
}
|
||||
.workspaces button:hover {
|
||||
background-color: $color1;
|
||||
|
|
|
@ -36,10 +36,10 @@
|
|||
`${replace(entry.name,".*:","")}`))))
|
||||
|
||||
(deflisten active_window_name :initial false
|
||||
:interval "1s"
|
||||
:interval "1s"
|
||||
"scripts/activewindow")
|
||||
(defwidget windowtitle []
|
||||
(box
|
||||
(box :class "active_window"
|
||||
{active_window_name}))
|
||||
|
||||
(defwidget clock []
|
||||
|
@ -110,7 +110,7 @@
|
|||
(revealer-on-hover
|
||||
:revealvar reveal_tray
|
||||
:revealvar-name "reveal_tray"
|
||||
""
|
||||
{reveal_tray ? "" : ""}
|
||||
(tray_children)))
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
title_rewrites=("— Alacritty" "")
|
||||
#declare -A titles
|
||||
#declare -A icons
|
||||
titles=(" — Alacritty" " — LibreWolf" " — LibreOffice Calc" " — LibreOffice Writer" " — LibreOffice Draw" " — LibreOffice Math" " - KeePassXC" " — Dolphin")
|
||||
icons=(" " " " " " " " " " " " " " " ")
|
||||
|
||||
function get_window_name() {
|
||||
output=$(swaymsg -t get_tree | jq -r '.. | (.nodes? // empty)[] | select(.focused==true).name')
|
||||
for s in "${title_rewrites[@]}";do
|
||||
if [[ "${output}" == *"${s}"* ]]; then
|
||||
output="${output/${s}/}"
|
||||
for s in "${!titles[@]}";do
|
||||
if [[ "${output}" == *"${titles[${s}]}"* ]]; then
|
||||
output="${output/${titles[s]}/}"
|
||||
output="${icons[${s}]} ${output}"
|
||||
fi
|
||||
done
|
||||
echo $output
|
||||
|
|
Loading…
Add table
Reference in a new issue