eww + culr tweaks
This commit is contained in:
parent
d20d3d8310
commit
1a49ec52ce
4 changed files with 12 additions and 11 deletions
|
@ -2,17 +2,17 @@
|
|||
|
||||
la_culr()
|
||||
{
|
||||
ls -lha --group-directories-first --color $@ | culr
|
||||
ls -lha --group-directories-first --color $@ | culr -t 80 -o roygbiv-split
|
||||
}
|
||||
|
||||
ls_culr()
|
||||
{
|
||||
ls -lh --group-directories-first --color $@ | culr
|
||||
ls -lh --group-directories-first --color $@ | culr -t 80 -o roygbiv-split
|
||||
}
|
||||
|
||||
ps_culr()
|
||||
{
|
||||
ps ww$@ | culr
|
||||
ps ww$@ | culr -t 80 -o roygbiv-split
|
||||
}
|
||||
|
||||
alias ...='cd ../..'
|
||||
|
@ -37,7 +37,7 @@ alias gm='git merge'
|
|||
alias l='ls_culr'
|
||||
alias la='la_culr'
|
||||
alias p='ps_culr'
|
||||
alias mnt='mount | column -t | culr'
|
||||
alias mnt='mount | column -t | culr -t 80 -o roygbiv-split'
|
||||
# alias kaboom='printf "type any input if you wish to update\n\npress enter to continue\n"; read upgrade; if [ -n "$upgrade" ]; then echo upgrading..; sudo nix-channel --update; else echo no upgrade!; fi; sudo nixos-rebuild switch -j9 && rm ~/.gtkrc-2.0; home-manager switch && sudo nix-collect-garbage && nix-store --optimise'
|
||||
eval "$(zoxide init zsh)"
|
||||
fresh
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
.bar {
|
||||
color: $fg;
|
||||
label {
|
||||
font-size: 1.4rem;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,14 +4,14 @@ limit=128
|
|||
socat -u UNIX-CLIENT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock STDOUT |
|
||||
while read line; do
|
||||
if [[ "$line" == activewindow\>\>* ]]; then
|
||||
windowtitle="$(printf $line | cut -d',' -f 2)"
|
||||
apptitle="$(printf $line | cut -d',' -f 1 | cut -d'>' -f 3)"
|
||||
windowtitle="$(echo $line | cut -d',' -f 2)"
|
||||
apptitle="$(echo $line | cut -d',' -f 1 | cut -d'>' -f 3 | rev | cut -d'.' -f -1 | rev)"
|
||||
combined="$windowtitle - $apptitle"
|
||||
if [[ "${#combined}" -lt $limit ]]; then
|
||||
printf '{"title": "'$combined'"}'
|
||||
echo '{"title": "'$combined'"}'
|
||||
else
|
||||
clipto=$((limit-${#apptitle}))
|
||||
printf '{"title": "'"${windowtitle:0:$clipto} - $apptitle"'"}'
|
||||
echo '{"title": "'"${windowtitle:0:$clipto} - $apptitle"'"}'
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -95,9 +95,10 @@ playerctl -F metadata -f '{{title}}\{{artist}}\{{status}}\{{position}}\{{mpris:l
|
|||
fi
|
||||
fi
|
||||
|
||||
|
||||
jaq --null-input -r -c \
|
||||
--arg artist "$(sanitize "$artist")" \
|
||||
--arg title "$(sanitize "$title")" \
|
||||
--arg artist "$(sanitize "${artist:0:32}")" \
|
||||
--arg title "$(sanitize "${title:0:32}")" \
|
||||
--arg status "$status" \
|
||||
--arg pos "$(get_position "$position" "$len")" \
|
||||
--arg pos_time "$(get_position_time "$position" "$len")" \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue