You are not logged in.
Hi
I'm trying to make a scratchpad with Alacritty+ncmpcpp so that it'll open when I press super+m. I'm using bspwm with sxhkd.
sxhkdrc:
https://pastebin.com/EU2967cG
The script itself:
https://pastebin.com/SNKEkSrL
The rule in bspwmrc:
https://pastebin.com/advjcUVk
Offline
What is not working?
Arch is home!
https://github.com/Docbroke
Offline
xdotool search --onlyvisible --class scpad_nc windowunmap || xdotool search --class scpad_nc windowmap windowactivate || exec alacritty -e ncmpcpp --class scpad_ncidk what alacritty sets, you might have to match "--classname" and possibly "--limit 1"
Offline
xdotool search --onlyvisible --class scpad_nc windowunmap || xdotool search --class scpad_nc windowmap windowactivate || exec alacritty -e ncmpcpp --class scpad_ncidk what alacritty sets, you might have to match "--classname" and possibly "--limit 1"
Do I put that in the script?
Offline
What is not working?
I've made a scratchpad so that Alacritty opens when I press super+u. It works perfectly. Now I want to open Alacritty with ncmpcpp in another scratchpad. But when I press super+m Alacritty opens and immediately closes again.
Offline
1. Does your script work as intended when run from terminal? You can try running your script with " bash -x <your script>" to check where it is failing.
2. what is xdo?
Last edited by Docbroke (2023-08-26 01:19:22)
Arch is home!
https://github.com/Docbroke
Offline
https://archlinux.org/packages/extra/x86_64/xdo/
Do I put that in the script?
Understand what it does, but the main problem is actually sth. else
https://man.archlinux.org/man/extra/ala … tty.1.en#e
xdotool search --onlyvisible --class scpad_nc windowunmap || xdotool search --class scpad_nc windowmap windowactivate || exec alacritty --class scpad_nc -e ncmpcppOffline
1. Does your script work as intended when run from terminal? You can try running your script with " bash -x <your script>" to check where it is failing.
2. what is xdo?
No it doesn't work.
bash -x scpad_nc
++ xdotool search --class scpad_nc
+ winclass=
+ '[' -z '' ']'
+ alacritty -e ncmpcpp --class scpad_ncMaybe it should be xdotool everywhere? I might've misunderstood something. I tried changing it to xdotool but still doesn't work.
Offline
I followed this guide:
Offline
Stop following idiots on youtube and read post #7 and esp. the linked manpage paragraph to understand why "alacritty -e ncmpcpp --class scpad_nc" won't work but "alacritty --class scpad_nc -e ncmpcpp" will.
You can probably use xdo instead of xdotool (I've never used the former, no idea whether it works) but there's little point in using two tools that effectively do the same on different syntax.
Offline