From e4b925062c843691c54993457968dc1c252ef5e9 Mon Sep 17 00:00:00 2001 From: RhiobeT Date: Wed, 17 Aug 2022 18:35:01 +0200 Subject: [PATCH] Remove outdated Sway scripts --- .config/sway/status.sh | 9 -------- .config/sway/workspace-rename.sh | 35 -------------------------------- 2 files changed, 44 deletions(-) delete mode 100755 .config/sway/status.sh delete mode 100755 .config/sway/workspace-rename.sh diff --git a/.config/sway/status.sh b/.config/sway/status.sh deleted file mode 100755 index ffeb738..0000000 --- a/.config/sway/status.sh +++ /dev/null @@ -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 |" diff --git a/.config/sway/workspace-rename.sh b/.config/sway/workspace-rename.sh deleted file mode 100755 index 8f6e125..0000000 --- a/.config/sway/workspace-rename.sh +++ /dev/null @@ -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