everforest and titlebar fix

This commit is contained in:
atagen 2023-05-21 21:07:49 +10:00
parent 707157c0fe
commit d20d3d8310
5 changed files with 78 additions and 29 deletions

View file

@ -93,8 +93,8 @@ in {
gtk-theme.name
fonts.sans.name
icons.name
palette-shex.bright.yellow
palette-shex.bright.black
palette-shex.util.fg
palette-shex.normal.black
(builtins.toString borders.thickness)
(builtins.toString borders.rounding)
]
@ -324,7 +324,7 @@ in {
programs.helix = {
enable = true;
settings = {
theme = "kanagawa";
theme = "everforest_dark";
editor.lsp.display-messages = true;
};
};

View file

@ -1,10 +1,18 @@
#!/usr/bin/env bash
limit=128
socat -u UNIX-CLIENT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock STDOUT |
while read line; do
if [[ "$line" == activewindow\>\>* ]]; then
windowtitle="$(echo $line | cut -d',' -f 2)"
echo '{"title": "'$windowtitle'"}'
windowtitle="$(printf $line | cut -d',' -f 2)"
apptitle="$(printf $line | cut -d',' -f 1 | cut -d'>' -f 3)"
combined="$windowtitle - $apptitle"
if [[ "${#combined}" -lt $limit ]]; then
printf '{"title": "'$combined'"}'
else
clipto=$((limit-${#apptitle}))
printf '{"title": "'"${windowtitle:0:$clipto} - $apptitle"'"}'
fi
fi
done