Rework stuff
This commit is contained in:
parent
776a054830
commit
2e0a3a545c
|
@ -26,7 +26,7 @@ static const char *autostart[] = {
|
||||||
shell, "-c", NOTIFICATION "& > /tmp/notification-log", NULL,
|
shell, "-c", NOTIFICATION "& > /tmp/notification-log", NULL,
|
||||||
|
|
||||||
/* Run the defined status bar */
|
/* Run the defined status bar */
|
||||||
shell, "-c", "speedwm_status", NULL,
|
shell, "-c", "speedwm_status &", NULL,
|
||||||
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
|
@ -124,7 +124,7 @@ esac
|
||||||
|
|
||||||
# Update status
|
# Update status
|
||||||
UPDATESTATUS() {
|
UPDATESTATUS() {
|
||||||
pkill status && status &
|
pkill -x status && status &
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
|
|
@ -154,11 +154,11 @@ echo USE
|
||||||
|
|
||||||
case "$OPT" in
|
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 &
|
"-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
|
if [ "$HIDE_BAR_WHEN_SYSTRAY_SHOW" = "true" ]; then
|
||||||
xsetroot -name "fsignal:23"
|
xsetroot -name "fsignal:23"
|
||||||
fi ;;
|
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
|
if [ "$HIDE_BAR_WHEN_SYSTRAY_SHOW" = "true" ]; then
|
||||||
xsetroot -name "fsignal:23"
|
xsetroot -name "fsignal:23"
|
||||||
fi ;;
|
fi ;;
|
||||||
|
|
|
@ -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
|
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 ;;
|
"Exit") STATUS=idle && exit 0 ;;
|
||||||
"Start") echo "$OUTPUT_FILENAME" > /tmp/outputfilename && STATUS=recording && touch /tmp/dfmpeg-recording
|
"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 ;;
|
$startrec && exit 0 ;;
|
||||||
"Stop") pkill ffmpeg ; rm /tmp/dfmpeg-recording ; STATUS=idle
|
"Stop") pkill -x ffmpeg ; rm /tmp/dfmpeg-recording ; STATUS=idle
|
||||||
pgrep -x status && pkill status && status & ;;
|
pgrep -x status && pkill -x status && status & ;;
|
||||||
"Start without audio") echo "$OUTPUT_FILENAME" > /tmp/outputfilename && STATUS=recording && touch /tmp/dfmpeg-recording
|
"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 ;;
|
$startrec_no_audio && exit 0 ;;
|
||||||
"Play last") DFMPEG_STATUS=idle && $MEDIA_PLAYER $(cat /tmp/outputfilename) && exit 0 ;;
|
"Play last") DFMPEG_STATUS=idle && $MEDIA_PLAYER $(cat /tmp/outputfilename) && exit 0 ;;
|
||||||
"More options") MORE_OPTIONS && exit 0 ;;
|
"More options") MORE_OPTIONS && exit 0 ;;
|
||||||
|
|
|
@ -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 -loadconfig # For speedie.gq/speedwm
|
||||||
command -v speedwm_run > /dev/null && speedwm_run -rnoload # 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 status && pkill -x status ; status & # For speedie.gq/speedwm
|
||||||
pgrep -x stellar && pkill stellar ; stellar & # For speedie.gq/stellar
|
pgrep -x stellar && pkill -x stellar ; stellar & # For speedie.gq/stellar
|
||||||
}
|
}
|
||||||
|
|
||||||
# Send notification
|
# Send notification
|
||||||
|
|
|
@ -38,7 +38,7 @@ fi
|
||||||
|
|
||||||
# Load .Xresources if available
|
# Load .Xresources if available
|
||||||
XRESOURCES() {
|
XRESOURCES() {
|
||||||
pgrep -x status > /dev/null && pkill status
|
pgrep -x status > /dev/null && pkill -x status
|
||||||
if [ -e "$HOME/.Xresources" ]; then
|
if [ -e "$HOME/.Xresources" ]; then
|
||||||
if [ -e "${BINDIR}xrdb" ]; then
|
if [ -e "${BINDIR}xrdb" ]; then
|
||||||
xrdb $HOME/.Xresources
|
xrdb $HOME/.Xresources
|
||||||
|
@ -194,7 +194,7 @@ case "$ARGS" in
|
||||||
"-unloadconfig") UNLOADCONFIG ; RESET ; exit 0 ;;
|
"-unloadconfig") UNLOADCONFIG ; RESET ; exit 0 ;;
|
||||||
"-deleteconfig") DELETECONFIG ; RESET ; exit 0 ;;
|
"-deleteconfig") DELETECONFIG ; RESET ; exit 0 ;;
|
||||||
"-noxrdb") START_SPEEDWM ; 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 ;;
|
echo "speedwm is not running, cannot stop it." ; exit 1 ;;
|
||||||
"-nomkconfig") CHECKEXISTINGWM ; XRESOURCES ; AUTOSTART ; LOADSWAL ; RESET ; START_SPEEDWM ; exit 0 ;;
|
"-nomkconfig") CHECKEXISTINGWM ; XRESOURCES ; AUTOSTART ; LOADSWAL ; RESET ; START_SPEEDWM ; exit 0 ;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue