commit 91008af5060c5dbca5247091011a0b19564f6ae7
parent d7734cf705f5b3c3a252ef383734e22adf135e7a
Author: regexghost <dev@regexghost.com>
Date: Fri, 19 Jun 2026 01:13:24 +0100
power management functions fix, changed to posix read and removed kde/plasma commands
Diffstat:
3 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/dotfiles/.kshrc b/dotfiles/.kshrc
@@ -95,7 +95,8 @@ alias bga='bug add'
# Git Aliases
alias gd='git diff'
-alias gdc='git diff --word-diff-regex=.'
+alias gdc='git diff --cached'
+alias gdw='git diff --word-diff-regex=.'
alias gs='git status .'
alias gsa='git status'
alias gpl='git pull'
@@ -294,10 +295,12 @@ export HISTSIZE=80000
export HISTFILESIZE=80000
export HISTFILE="$HOME/.history"
-export HISTCONTROL=ignoreboth:erasedups
+export HISTCONTROL=ignoredups:erasedups
export MICRO_TRUECOLOR=1
export PASSWORD_STORE_CLIP_TIME=120
+#set +o emacs
+
# Quick file/directory access
alias doc='cd ~/Documents/'
diff --git a/dotfiles/Power_Management-Substitution-jwm-pi-.kshrc b/dotfiles/Power_Management-Substitution-jwm-pi-.kshrc
@@ -1,7 +1,7 @@
#### Start Substitute - Power_Management
## Shutdown with confirmation
shutdown () {
- read -p "Shutdown? (y/N) " yesOrNoShutdown
+ read yesOrNoShutdown"?Shutdown? (y/N) "
if [[ "$yesOrNoShutdown" == "y" ]]; then
mocp -M "$XDG_CONFIG_HOME/moc" --stop
rm -rf "$XDG_CACHE_HOME/reddit-rss"
@@ -12,7 +12,7 @@ shutdown () {
## Reboot with confirmation
reboot () {
- read -p "Reboot? (y/N) " yesOrNoReboot
+ read yesOrNoReboot"?Reboot? (y/N) "
if [[ "$yesOrNoReboot" == "y" ]]; then
mocp -M "$XDG_CONFIG_HOME/moc" --stop
/usr/sbin/reboot
@@ -21,31 +21,31 @@ reboot () {
## Hibernate to disk with confirmation
hibernate () {
- read -p "Hibernate? (y/N) " yesOrNoHibernate
- [[ "$yesOrNoHibernate" == "y" ]] && qdbus6 org.kde.Solid.PowerManagement /org/freedesktop/PowerManagement Hibernate
+ read yesOrNoHibernate"?Hibernate? (y/N) "
+ [[ "$yesOrNoHibernate" == "y" ]] && systemctl hibernate
}
## Hybrid-Sleep with confirmation, i.e. sleep to RAM and disk in case battery dies
hybrid-sleep () {
- read -p "Hybrid-Sleep? (y/N) " yesOrNoHybridSleep
+ read yesOrNoHybridSleep"?Hybrid-Sleep? (y/N) "
[[ "$yesOrNoHybridSleep" == "y" ]] && systemctl hybrid-sleep
}
## Sleep with confirmation (i.e. RAM only)
qsleep () {
- read -p "Sleep? (y/N) " yesOrNoQSleep
- [[ "$yesOrNoQSleep" == "y" ]] && qdbus6 org.kde.Solid.PowerManagement /org/freedesktop/PowerManagement Suspend
+ read yesOrNoQSleep"?Sleep? (y/N) "
+ [[ "$yesOrNoQSleep" == "y" ]] && systemctl suspend
}
## Log Out with confirmation
log-out () {
- read -p "Log Out? (y/N) " yesOrNoLogOut
- [[ "$yesOrNoLogOut" == "y" ]] && qdbus6 org.kde.LogoutPrompt /LogoutPrompt org.kde.LogoutPrompt.promptLogout
+ read yesOrNoLogOut"?Log Out? (y/N) "
+ [[ "$yesOrNoLogOut" == "y" ]] && jwm -exit
}
## Lock screen with confirmation
lock () {
- read -p "Lock Screen? (y/N) " yesOrNoLock
- [[ "$yesOrNoLock" == "y" ]] && qdbus6 org.kde.screensaver /ScreenSaver Lock
+ read yesOrNoLock"?Lock Screen? (y/N) "
+ [[ "$yesOrNoLock" == "y" ]] && slock
}
#### End Substitute
diff --git a/terminal-scripts/stream-check.sh b/terminal-scripts/stream-check.sh
@@ -36,7 +36,7 @@ if ! [ "$youtube_at" = "NONE" ]; then
fi
fi
if ! [ "$kick_at" = "NONE" ]; then
- wget --timeout=5 -q --user-agent "NetSurf" "https://kick.com/api/v1/channels/${kick_at}" -O /tmp/live_kick.html
+ wget --hsts-file="$XDG_STATE_HOME/wget-hsts" --timeout=5 -q --user-agent "NetSurf" "https://kick.com/api/v1/channels/${kick_at}" -O /tmp/live_kick.html
if grep -q "is_live\":true" /tmp/live_kick.html; then
if [ "$format" = "pretty" ]; then
echo "${name} is live on Kick: https://www.kick.com/${kick_at}"