diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2022-08-07 21:04:11 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2022-08-07 21:04:11 +0200 |
commit | 9fe2bc3fa66f25be635c5d4d66285718a0b116da (patch) | |
tree | 2da5d44d23da9e8984b9d58b854d6effa6f3493b /floats | |
parent | 0a425fd64f18e1a37db9d2efbed312df702c6d2c (diff) | |
download | scripts-9fe2bc3fa66f25be635c5d4d66285718a0b116da.tar.gz scripts-9fe2bc3fa66f25be635c5d4d66285718a0b116da.zip |
Made some floating windows scripts work on bspwm and not change the window name.
Diffstat (limited to 'floats')
-rwxr-xr-x | floats/mpvFloat.sh | 3 | ||||
-rwxr-xr-x | floats/mpvFloatLoop.sh | 3 | ||||
-rwxr-xr-x | floats/urxvtFloat.sh | 7 | ||||
-rwxr-xr-x | floats/youtube-dlFloat.sh | 2 | ||||
-rwxr-xr-x | floats/youtube-dlFloatAudio.sh | 2 |
5 files changed, 12 insertions, 5 deletions
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 "$@" |