It'd be great if you could post the contents of the log and the rofi script. Also, is the file executable? (Did you chmod 755 the file?) And if so does it work directly from the terminal? like sh ~/location of script/script.sh?
On Tue, 8 Jun, 2021, 14:25 Aditya Manga, <[email protected]> wrote: > Thanks for the messages, > > Magus - I checked the cat logs and there are a bunch of errors though I > can't really make sense of them relating to the script/command. The script > is a rofi script that opens a rofi window. I can attach my full log and > send it to the thread if it would help, however I've added an excerpt of > the errors I get upon restarting qtile (there are no changes to the log > file after running the keybind). > > And ah Justine I looked through your config - thank you. Would the > > qtile.cmd_spawn(os.path.expanduser("~/path/to/file.sh") > > code work even in keybinds to execute a bash script? > > On Tuesday, June 8, 2021 at 4:47:05 PM UTC+8 Justine Smithies wrote: > >> Take a look at my config here as it should help. >> >> https://github.com/justinesmithies/dotfiles >> >> On Tue, 8 Jun 2021, 08:58 Aditya Manga, <[email protected]> wrote: >> >>> Hi, I understand this might be a slightly newbie question however I'm at >>> a loss for what to try after several attempts. >>> >>> I'm trying to run a .sh script through a mod + R keybind however I can't >>> seem to figure out how to make it work. My code is: >>> >>> Key([mod], "r", >>> lazy.spawn("sh ~/.config/rofi/scripts/appsmenu.sh"), desc="Spawn a >>> command using a prompt widget"), >>> >>> This code allows qtile to restart however the keybinding doesn't work - >>> I've confirmed that the code does work within a terminal. I've also tried >>> using the shell command. Furthermore I tried using lazy.spawncmd however in >>> that case qtile simply didn't even restart. >>> >>> I'd appreciate any help in being able to run the .sh script through the >>> key binding as it's a method I plan to use a lot more in the future for >>> more complicated, longer scripts. >>> >>> -- >>> >> You received this message because you are subscribed to the Google Groups >>> "qtile-dev" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/qtile-dev/01eccd4e-f473-4340-b634-eeadc655030dn%40googlegroups.com >>> <https://groups.google.com/d/msgid/qtile-dev/01eccd4e-f473-4340-b634-eeadc655030dn%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > You received this message because you are subscribed to the Google Groups > "qtile-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/qtile-dev/6f37d0ad-0be8-4399-9b6f-2c34dbcea94bn%40googlegroups.com > <https://groups.google.com/d/msgid/qtile-dev/6f37d0ad-0be8-4399-9b6f-2c34dbcea94bn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "qtile-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/qtile-dev/CALCidow%3DqP_bn8%3DN2goDU6M9jtu-_a4tsQ%3D_O%2BFZNSmuYq4_zA%40mail.gmail.com.
