New backup 2025-03-04 02:00:02
This commit is contained in:
parent
4c57c75b4d
commit
5b38aa45ce
1 changed files with 7 additions and 0 deletions
|
@ -1,7 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
title_rewrites=("— Alacritty" "")
|
||||||
|
|
||||||
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
|
||||||
|
if [[ "${output}" == *"${s}"* ]]; then
|
||||||
|
output="${output/${s}/}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
echo $output
|
echo $output
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue