Remove outdated Sway scripts

This commit is contained in:
2022-08-17 18:35:01 +02:00
parent af1ebdaede
commit e4b925062c
2 changed files with 0 additions and 44 deletions

View File

@@ -1,9 +0,0 @@
date_formatted=$(date +'%d/%m/%Y %R')
battery_status=$(acpi -b | awk '{printf "%3d%", substr($4, 1, length($4)-1)}')
ram_status=$(free -m | awk '/Mem/{mem = $3}; END {printf "%5dMB", mem}')
cpu_status=$(top -bn1 | awk '/Cpu/{cpu = 100 - $8}; END {printf "%3d\%", cpu}')
echo "| RAM: ${ram_status} | CPU: $cpu_status | BAT: $battery_status | $date_formatted |"

View File

@@ -1,35 +0,0 @@
#!/bin/sh
swaymsg -t subscribe -m '[ "window" ]' | while read -r event ; do
if [ "$(jq -r '.change' <<< $event)" = 'focus' ] ; then
current_workspace="$(swaymsg -t get_workspaces | jq -r '.[] | select(.focused)')"
workspace_num="$(jq -r '.num' <<< $current_workspace)"
workspace_name="$(jq -r '.name' <<< $current_workspace)"
app_name="$(jq -r '.container.app_id' <<< $event)"
if [ $app_name = 'null' ] ; then
app_name="$(jq -r '.container.window_properties.instance' <<< $event)"
fi
if [ "$app_name" = "kitty" ] ; then
app_name=""
elif [ "$app_name" = "Chromium" ] || [ "$app_name" = "google-chrome" ]; then
case "$(jq -r '.container.name' <<< $event)" in
*YouTube*)
app_name=""
;;
*)
app_name=""
;;
esac
elif [ "$app_name" = "discord" ] ; then
app_name=""
elif [ "$app_name" = "spotify" ] ; then
app_name=""
elif [ "$app_name" = "GEMOC Studio" ] ; then
app_name=""
fi
swaymsg rename workspace "$workspace_name" to "$workspace_num:$app_name"
fi
done