From 9fe2bc3fa66f25be635c5d4d66285718a0b116da Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Sun, 7 Aug 2022 21:04:11 +0200 Subject: Made some floating windows scripts work on bspwm and not change the window name. --- floats/mpvFloat.sh | 3 ++- floats/mpvFloatLoop.sh | 3 ++- floats/urxvtFloat.sh | 7 ++++++- floats/youtube-dlFloat.sh | 2 +- floats/youtube-dlFloatAudio.sh | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) (limited to 'floats') diff --git a/floats/mpvFloat.sh b/floats/mpvFloat.sh index eaed921..b5d023b 100755 --- a/floats/mpvFloat.sh +++ b/floats/mpvFloat.sh @@ -1,2 +1,3 @@ #!/bin/sh -nohup mpv --geometry=-10-10 --autofit=40% --title="mpvfloat" "$@" >/dev/null & +pgrep -x bspwm >/dev/null && bspc rule -a mpv --one-shot state=floating +nohup mpv --geometry=-10-10 --autofit=40% "$@" >/dev/null & diff --git a/floats/mpvFloatLoop.sh b/floats/mpvFloatLoop.sh index c65bd8d..e0e1714 100755 --- a/floats/mpvFloatLoop.sh +++ b/floats/mpvFloatLoop.sh @@ -1,2 +1,3 @@ #!/bin/sh -nohup mpv --loop-playlist --geometry=-0-0 --autofit=40% --title="mpvfloat" "$@" >/dev/null & +pgrep -x bspwm >/dev/null && bspc rule -a mpv --one-shot state=floating +nohup mpv --loop-playlist --geometry=-10-10 --autofit=40% "$@" >/dev/null & diff --git a/floats/urxvtFloat.sh b/floats/urxvtFloat.sh index cefc6a3..a6bc851 100755 --- a/floats/urxvtFloat.sh +++ b/floats/urxvtFloat.sh @@ -1,2 +1,7 @@ #!/bin/sh -urxvt -title floating -geometry "$1x$2-5-5" -e "$3" +pgrep -x bspwm >/dev/null && bspc rule -a URxvt --one-shot state=floating + +width="$1" +height="$2" +shift 2 +urxvt -geometry "${width}x${height}-10-10" -e "$@" diff --git a/floats/youtube-dlFloat.sh b/floats/youtube-dlFloat.sh index 5976e3f..09f8a6c 100755 --- a/floats/youtube-dlFloat.sh +++ b/floats/youtube-dlFloat.sh @@ -1,2 +1,2 @@ #!/bin/sh -urxvt -title "floating" -geometry "100x8-0-0" -e youtube-dl.sh "$1" +urxvtFloat.sh 100 8 youtube-dl.sh "$@" diff --git a/floats/youtube-dlFloatAudio.sh b/floats/youtube-dlFloatAudio.sh index 1988653..6283a5c 100755 --- a/floats/youtube-dlFloatAudio.sh +++ b/floats/youtube-dlFloatAudio.sh @@ -1,2 +1,2 @@ #!/bin/sh -urxvt -title "floating" -geometry "100x8-0-0" -e youtube-dlAudio.sh "$1" +urxvtFloat.sh 100 8 youtube-dlAudio.sh "$@" -- cgit v1.2.1