Rework stuff

This commit is contained in:
speediegq 2022-10-01 18:10:37 +02:00
parent 776a054830
commit 2e0a3a545c
6 changed files with 12 additions and 12 deletions

View file

@ -26,7 +26,7 @@ static const char *autostart[] = {
shell, "-c", NOTIFICATION "& > /tmp/notification-log", NULL,
/* Run the defined status bar */
shell, "-c", "speedwm_status", NULL,
shell, "-c", "speedwm_status &", NULL,
NULL
};

View file

@ -124,7 +124,7 @@ esac
# Update status
UPDATESTATUS() {
pkill status && status &
pkill -x status && status &
}
case "$1" in

View file

@ -154,11 +154,11 @@ echo USE
case "$OPT" in
"-start") $SYSTRAY --edge $EDGE --align right --SetDockType true --SetPartialStrut true --expand true --width $WIDTH --transparent $TRANSPARENT --alpha $ALPHA --tint 0x${TINT} --height $HEIGHT &
touch /tmp/systray-started ; pgrep -x status && pkill status ; status &
touch /tmp/systray-started ; pgrep -x status && pkill -x status ; status &
if [ "$HIDE_BAR_WHEN_SYSTRAY_SHOW" = "true" ]; then
xsetroot -name "fsignal:23"
fi ;;
"-stop") rm -f /tmp/systray-started ; pkill $SYSTRAY ; pgrep -x status && pkill status ; status &
"-stop") rm -f /tmp/systray-started ; pkill -x $SYSTRAY ; pgrep -x status && pkill -x status ; status &
if [ "$HIDE_BAR_WHEN_SYSTRAY_SHOW" = "true" ]; then
xsetroot -name "fsignal:23"
fi ;;

View file

@ -171,12 +171,12 @@ MORE_OPTIONS() {
case "$(printf 'Start\nStop\nStart without audio\nPlay last\n------\nMore options\nAbout\nExit' | $RUNLAUNCHER -l 40 -p 'Record your screen:')" in
"Exit") STATUS=idle && exit 0 ;;
"Start") echo "$OUTPUT_FILENAME" > /tmp/outputfilename && STATUS=recording && touch /tmp/dfmpeg-recording
pgrep -x status && pkill status && status &
pgrep -x status && pkill -x status && status &
$startrec && exit 0 ;;
"Stop") pkill ffmpeg ; rm /tmp/dfmpeg-recording ; STATUS=idle
pgrep -x status && pkill status && status & ;;
"Stop") pkill -x ffmpeg ; rm /tmp/dfmpeg-recording ; STATUS=idle
pgrep -x status && pkill -x status && status & ;;
"Start without audio") echo "$OUTPUT_FILENAME" > /tmp/outputfilename && STATUS=recording && touch /tmp/dfmpeg-recording
pgrep -x status && pkill status && status &
pgrep -x status && pkill -x status && status &
$startrec_no_audio && exit 0 ;;
"Play last") DFMPEG_STATUS=idle && $MEDIA_PLAYER $(cat /tmp/outputfilename) && exit 0 ;;
"More options") MORE_OPTIONS && exit 0 ;;

View file

@ -318,8 +318,8 @@ SWAL_EXPORT_SCRIPT_WAL()
command -v speedwm_run > /dev/null && speedwm_run -loadconfig # For speedie.gq/speedwm
command -v speedwm_run > /dev/null && speedwm_run -rnoload # For speedie.gq/speedwm
pgrep -x status && pkill status ; status & # For speedie.gq/speedwm
pgrep -x stellar && pkill stellar ; stellar & # For speedie.gq/stellar
pgrep -x status && pkill -x status ; status & # For speedie.gq/speedwm
pgrep -x stellar && pkill -x stellar ; stellar & # For speedie.gq/stellar
}
# Send notification

View file

@ -38,7 +38,7 @@ fi
# Load .Xresources if available
XRESOURCES() {
pgrep -x status > /dev/null && pkill status
pgrep -x status > /dev/null && pkill -x status
if [ -e "$HOME/.Xresources" ]; then
if [ -e "${BINDIR}xrdb" ]; then
xrdb $HOME/.Xresources
@ -194,7 +194,7 @@ case "$ARGS" in
"-unloadconfig") UNLOADCONFIG ; RESET ; exit 0 ;;
"-deleteconfig") DELETECONFIG ; RESET ; exit 0 ;;
"-noxrdb") START_SPEEDWM ; exit 0 ;;
"-stop") pgrep -x speedwm && pkill speedwm ; echo "speedwm has been stopped." ; exit 0
"-stop") pgrep -x speedwm && pkill -x speedwm ; echo "speedwm has been stopped." ; exit 0
echo "speedwm is not running, cannot stop it." ; exit 1 ;;
"-nomkconfig") CHECKEXISTINGWM ; XRESOURCES ; AUTOSTART ; LOADSWAL ; RESET ; START_SPEEDWM ; exit 0 ;;
esac