aboutsummaryrefslogtreecommitdiff
path: root/env/.local/bin/system
diff options
context:
space:
mode:
authoriceyrazor <iceyrazor@mailfence.com>2026-06-10 00:48:19 -0500
committericeyrazor <iceyrazor@mailfence.com>2026-06-10 00:48:19 -0500
commit2097b0ebfdd07ae7a8295c26703d8d88ee7a5f8f (patch)
tree97edcae29f2817f045e0fda462609679935a6fb1 /env/.local/bin/system
parent09156e6cea71093079af580acdd6d4a8594e14b9 (diff)
Squashed commit of the following:
made all scripts mostly posix moved from gajim to dino
Diffstat (limited to 'env/.local/bin/system')
-rwxr-xr-xenv/.local/bin/system/kaomoji-picker.sh8
-rwxr-xr-xenv/.local/bin/system/neoboot.sh4
-rwxr-xr-xenv/.local/bin/system/start-scripts/autostart.sh10
-rwxr-xr-xenv/.local/bin/system/start-scripts/newsboat-fetch.sh4
-rwxr-xr-xenv/.local/bin/system/stbar/killbar.sh1
-rwxr-xr-xenv/.local/bin/system/url-handler.sh10
6 files changed, 19 insertions, 18 deletions
diff --git a/env/.local/bin/system/kaomoji-picker.sh b/env/.local/bin/system/kaomoji-picker.sh
index a59e3c7..ac8e6b8 100755
--- a/env/.local/bin/system/kaomoji-picker.sh
+++ b/env/.local/bin/system/kaomoji-picker.sh
@@ -6,14 +6,14 @@ KAO_FILE="$HOME/stuff/manual-programs/KaomojiList/kaomojis.json"
choices=$(jq '.[]|.categories|.[]|.name' "$KAO_FILE" | sed 's/"//g')
-choice=$(echo "$choices" | sed /^$/d | rofi -dmenu "$prompt_message")
+choice=$(echo "$choices" | sed /^$/d | rofi -dmenu)
emojlist=$(jq -r --arg sel "$choice" '..| select(.name==$sel)? | .emoticons | .[]' "$KAO_FILE")
-emoj=$(echo "$emojlist" | sed /^$/d | rofi -dmenu "$prompt_message")
+emoj=$(echo "$emojlist" | sed /^$/d | rofi -dmenu)
if [ "$WAYLAND_DISPLAY" ]; then
- printf -- "$emoj" | wl-copy
+ printf -- "%s" "$emoj" | wl-copy
else
- printf -- "$emoj" | xclip -sel clip
+ printf -- "%s" "$emoj" | xclip -sel clip
fi
diff --git a/env/.local/bin/system/neoboot.sh b/env/.local/bin/system/neoboot.sh
index 014f4b1..e93af89 100755
--- a/env/.local/bin/system/neoboot.sh
+++ b/env/.local/bin/system/neoboot.sh
@@ -1,12 +1,12 @@
#!/bin/sh
normal() {
- fastfetch -c $HOME/.config/fastfetch/ascii.jsonc
+ fastfetch -c "$HOME/.config/fastfetch/ascii.jsonc"
printf "\n"
}
if [ -z $(pgrep VRChat) ]; then
- if [[ "$(cat /etc/hostname)" == "Witchen" ]]; then
+ if [ "$(cat /etc/hostname)" = "Witchen" ]; then
normal
else
normal
diff --git a/env/.local/bin/system/start-scripts/autostart.sh b/env/.local/bin/system/start-scripts/autostart.sh
index db9d31f..b17876a 100755
--- a/env/.local/bin/system/start-scripts/autostart.sh
+++ b/env/.local/bin/system/start-scripts/autostart.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-cd "$(dirname "$0")"
+cd "$(dirname "$0")" || exit
sleep 0.1
xset s 0
@@ -9,7 +9,7 @@ if [ "$WAYLAND_DISPLAY" ]; then
PID=$(pidof swaybg)
swaybg -o HDMI-A-1 -i "/home/iceyrazor/stuff/media/wallpapers/neotheta2.png" -m fill -o DP-1 -i "/home/iceyrazor/stuff/media/wallpapers/neotheta2.png" -m fill & disown
sleep 0.4s
- kill $PID
+ kill "$PID"
fi
xrdb -merge /home/iceyrazor/.Xresources &
@@ -47,7 +47,7 @@ if [ -z "$(pgrep wezterm)" ]; then
wezterm -e ~/.local/bin/system/task.sh &
fi
-if [ "$(cat /etc/hostname)" == "Kasino" ]; then
+if [ "$(cat /etc/hostname)" = "Kasino" ]; then
if [ -z "$(pgrep vesktop)" ]; then
vesktop %U & disown
fi
@@ -64,8 +64,8 @@ if [ "$(cat /etc/hostname)" == "Kasino" ]; then
QT_QPA_PLATFORMTHEME="" mumble & disown
fi
- if [ -z "$(pgrep gajim)" ]; then
- gajim & disown
+ if [ -z "$(pgrep dino)" ]; then
+ dino & disown
fi
if [ -z "$(pgrep mpd)" ]; then
diff --git a/env/.local/bin/system/start-scripts/newsboat-fetch.sh b/env/.local/bin/system/start-scripts/newsboat-fetch.sh
index 06b08d9..5eefe9b 100755
--- a/env/.local/bin/system/start-scripts/newsboat-fetch.sh
+++ b/env/.local/bin/system/start-scripts/newsboat-fetch.sh
@@ -4,9 +4,9 @@ newsboat_loop(){
#newsboat -x print-unread | xargs -0 notify-send "newsboat feed"
unreads=$(newsboat -x print-unread)
- unreadnum=$(printf "$unreads" | sed 's/ .*//g')
+ unreadnum=$(printf -- "%s" "$unreads" | sed 's/ .*//g')
- if (( $unreadnum > 0 )); then
+ if [ "$unreadnum" -gt 0 ]; then
notify-send "newsboat feed" "$unreads"
fi
notify-send "Vitamins!" "take them"
diff --git a/env/.local/bin/system/stbar/killbar.sh b/env/.local/bin/system/stbar/killbar.sh
index 1450a84..b639ed1 100755
--- a/env/.local/bin/system/stbar/killbar.sh
+++ b/env/.local/bin/system/stbar/killbar.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
pids=$(ps -AO pid | awk '/stbar.sh|newsboat-fetch.sh/ {print $1}')
# pids=$(pstree -pla | grep stbar | sed 's,|,,g' | sed 's/ //g' | sed 's/^ //g' | sed 's/ .*//' | sed 's/[^0-9]*//g')
# pids2=$(ps -AO pid | grep "sh ./newsboat-fetch.sh" | sed 's/S.*//g' | sed 's/^ *//g')
diff --git a/env/.local/bin/system/url-handler.sh b/env/.local/bin/system/url-handler.sh
index d7be722..5d0e893 100755
--- a/env/.local/bin/system/url-handler.sh
+++ b/env/.local/bin/system/url-handler.sh
@@ -2,7 +2,7 @@
url=$@
prompt_message="Open with:"
-echo $url
+echo "$url"
choices="
clipboard
@@ -12,11 +12,11 @@ browser/xdg-open
choice=$(echo "$choices" | sed /^$/d | rofi -dmenu "$prompt_message")
choice=$(echo "$choice" | sed -e 's/browser\/xdg-open/xdg-open/')
-if [ "$choice" == "clipboard" ]; then
- if [ -z $WAYLAND_DISPLAY ]; then
- printf "$url" | xclip -selection clipboard
+if [ "$choice" = "clipboard" ]; then
+ if [ -z "$WAYLAND_DISPLAY" ]; then
+ printf -- "%s" "$url" | xclip -selection clipboard
else
- printf "$url" | wl-copy
+ printf -- "%s" "$url" | wl-copy
fi
else
$choice "$url" & disown