U can actually. I wrote a helper function to run string commands hope it 
helps.

```
import os

def _bash(arg):
    return Popen(
        arg,
        shell=True,
        stdout=PIPE
    ).communicate()[0].decode('utf-8').strip()


def bash_script(path):
    return _bash(os.path.expanduser(path))


def bash_command(command):
    return _bash(command)

```

On Monday, 24 August 2020 at 00:30:36 UTC+8 [email protected] wrote:

> I had tried with Dmenu(dmenu_command="#thing_to_do"), i can open 
> aplications but i cant run string commands on it, maybe can i create 
> scripts and run it with a Key?
>
> On Sunday, August 23, 2020 at 5:52:47 AM UTC+2 [email protected] wrote:
>
>> There is a built-in extension for dmenu in qtile. Check out the extension 
>> section in the docs.
>>
>> On Sunday, August 23, 2020 at 9:40:50 AM UTC+8 [email protected] wrote:
>>
>>> I want to to set a key to run terminal“s command (setsetxkbmap 
>>> #keyboardlayout), i thought using dmenu but not sure how can i do it 
>>> correctly.
>>>
>>> Key(["mod1", "shift"], "x", lazy.spawn("dmenu_run -p 'Run:'  
>>> dmenu_prompt "setxkbmap latam""),       
>>>     desc='Dmenu Run Launcher'),
>>>
>>> An more directly way would be great
>>>
>>

-- 
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/c0083541-4d87-4aaa-8723-34d52dd7c223n%40googlegroups.com.

Reply via email to