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;
|
padding: 5px 0px;
|
||||||
}
|
}
|
||||||
.workspaces,
|
.workspaces,
|
||||||
.music {
|
.music,
|
||||||
|
.active_window {
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
.tray_children {
|
.tray_children {
|
||||||
|
@ -54,7 +55,8 @@ circular-progress {
|
||||||
}
|
}
|
||||||
.rightgroup>label,
|
.rightgroup>label,
|
||||||
.rightgroup>button,
|
.rightgroup>button,
|
||||||
.music {
|
.music,
|
||||||
|
.active_window {
|
||||||
background-color: $color9;
|
background-color: $color9;
|
||||||
border: 2px solid $color1;
|
border: 2px solid $color1;
|
||||||
color: $color0;
|
color: $color0;
|
||||||
|
@ -78,6 +80,7 @@ label {
|
||||||
color: $color0;
|
color: $color0;
|
||||||
// margin: 10px 0px;
|
// margin: 10px 0px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
min-width: 25px;
|
||||||
}
|
}
|
||||||
.workspaces button:hover {
|
.workspaces button:hover {
|
||||||
background-color: $color1;
|
background-color: $color1;
|
||||||
|
|
|
@ -36,10 +36,10 @@
|
||||||
`${replace(entry.name,".*:","")}`))))
|
`${replace(entry.name,".*:","")}`))))
|
||||||
|
|
||||||
(deflisten active_window_name :initial false
|
(deflisten active_window_name :initial false
|
||||||
:interval "1s"
|
:interval "1s"
|
||||||
"scripts/activewindow")
|
"scripts/activewindow")
|
||||||
(defwidget windowtitle []
|
(defwidget windowtitle []
|
||||||
(box
|
(box :class "active_window"
|
||||||
{active_window_name}))
|
{active_window_name}))
|
||||||
|
|
||||||
(defwidget clock []
|
(defwidget clock []
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
(revealer-on-hover
|
(revealer-on-hover
|
||||||
:revealvar reveal_tray
|
:revealvar reveal_tray
|
||||||
:revealvar-name "reveal_tray"
|
:revealvar-name "reveal_tray"
|
||||||
""
|
{reveal_tray ? "" : ""}
|
||||||
(tray_children)))
|
(tray_children)))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
#!/bin/bash
|
#!/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() {
|
function get_window_name() {
|
||||||
output=$(swaymsg -t get_tree | jq -r '.. | (.nodes? // empty)[] | select(.focused==true).name')
|
output=$(swaymsg -t get_tree | jq -r '.. | (.nodes? // empty)[] | select(.focused==true).name')
|
||||||
for s in "${title_rewrites[@]}";do
|
for s in "${!titles[@]}";do
|
||||||
if [[ "${output}" == *"${s}"* ]]; then
|
if [[ "${output}" == *"${titles[${s}]}"* ]]; then
|
||||||
output="${output/${s}/}"
|
output="${output/${titles[s]}/}"
|
||||||
|
output="${icons[${s}]} ${output}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo $output
|
echo $output
|
||||||
|
|
Loading…
Add table
Reference in a new issue