最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

browser - running ladybird via hotkey in i3wm - Stack Overflow

programmeradmin2浏览0评论

I recently compiled ladybird in an SerenityOS using i3wm. I am trying to figure out how to bind i3wm to the hotkey

$mod+w 

I have tried running it using the following code

bindsym exec --no-startup-id /home/hasabob/ladybird/Meta/ladybird.sh run ladybird

I tried running the pure bash equivalent of this in a terminal

/home/hasabob/ladybird/Meta/ladybird.sh run ladybird

and it worked, but only inside the directory. As soon as i exited the directory i would get an error message along the lines of 'this directory is not a git repository, neither are any of its parents' (i don't currently have access to the system, most of this is going of my memory of the issue). This means, as far as i can tell, that i need to run that command within the directory, somehow, from the config file. I tried making a shell script that just runs this command from within the Meta/ directory, but when i run the shell script outside the Meta/ directory, i get the exact same error message. I am neither intelligent enough nor patient enough to solve this problem. Sorry for the really stupid question by the way, i am noob.

EDIT:

i found a solution. I was originally going to use subshells (very useful if you don't know about them, just quickly check all that out) I ended up playing around a little and found that the following works

set $ladyDir /home/hasabob/ladybird/Meta
bindsym $mod+w exec --no-startup-id alacritty -e sh -c "cd $ladyDir && ./ladybird.sh run"

Im not actually totally sure why this works rather than subshells, so can some please tell me? i would really like to learn.

发布评论

评论列表(0)

  1. 暂无评论