Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upfix #60 (shorcuts settings on linux) #68
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
nitzanel
Feb 17, 2018
When running this fork i get the following error:
expected ',' or ']' to follow array element:
['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/,'/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/vim-anywhere/']
I think there is a problem in the sed command at line 115.
nitzanel
commented on 4c6b412
Feb 17, 2018
•
|
When running this fork i get the following error:
I think there is a problem in the sed command at line 115. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Oh, you are right. It's fixed, thanks |
mmai
closed this
Feb 17, 2018
mmai
reopened this
Feb 17, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
cknadler
Feb 17, 2018
Owner
Hey Henri,
Thanks for the PR! I'm not very familiar with sed, so line 115 throws me for a bit of a loop. Any way you can break this down / document what you're doing here so I can understand? Thanks!
Cheers,
Chris
|
Hey Henri, Thanks for the PR! I'm not very familiar with Cheers, |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mmai
Feb 17, 2018
Contributor
Hi Chris,
Thanks for this nice app
Here I use sed with the > character as a separator, for example echo "hello" | sed -e "s>ell>arp>" replaces ell by arp in hello and gives harpo.
The goal of the line is to get the current 'custom-keybindigs' configuration and to add the $kbd_path entry. So we first get the configuration with gsettings get $media_keys custom-keybindings which gives something like ['/org/gnome.../custom0', '/org/gnome/.../custom1/'] if there are some bindings, but returns @as [] if there is no binding.
There are two sed commands chained to take these two cases in account.
The first sed command manages the case when there are some bindings :
it replaces '] by ', '$kbd_path'], so ['/org/gnome.../custom0', '/org/gnome/.../custom1/'] becomes ['/org/gnome.../custom0', '/org/gnome/.../custom1/', '$kb_path']
The second one manages the case when there is no binding, it replaces @as [] by ['$kbd_path'].
The first sed command does nothing when there is no binding because there is no ' character in the original string @as [], and the second sed command does nothing when there are bindings because in this case the original string does not contain the sequence @as [] .
I hope it makes more sense,
Henri
|
Hi Chris, Thanks for this nice app Here I use sed with the The goal of the line is to get the current 'custom-keybindigs' configuration and to add the $kbd_path entry. So we first get the configuration with There are two sed commands chained to take these two cases in account. The first sed command manages the case when there are some bindings : The second one manages the case when there is no binding, it replaces The first sed command does nothing when there is no binding because there is no I hope it makes more sense, Henri |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
base0x10
Feb 17, 2018
Hey, I tested the most recent version of this PR on Fedora 27 and Ubuntu 17.10 (both of which suffer from #60 which crashes gnome on startup). LGTM
base0x10
commented
Feb 17, 2018
|
Hey, I tested the most recent version of this PR on Fedora 27 and Ubuntu 17.10 (both of which suffer from #60 which crashes gnome on startup). LGTM |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
akkartik
Feb 18, 2018
Hi @cknadler, while you guys go back and forth reviewing this PR, could you please add a note to the Readme that people probably shouldn't run the install script on Linux, or something like that? It'll save people a whole lot of pain, and probably spare you some bad vibes as well. You can always remove that prose once you're confident it's not going to fuck up people's window managers in strange ways.
akkartik
commented
Feb 18, 2018
|
Hi @cknadler, while you guys go back and forth reviewing this PR, could you please add a note to the Readme that people probably shouldn't run the install script on Linux, or something like that? It'll save people a whole lot of pain, and probably spare you some bad vibes as well. You can always remove that prose once you're confident it's not going to fuck up people's window managers in strange ways. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
cknadler
Feb 18, 2018
Owner
@mmai Awesome, thanks Henri. I'll merge this for now. If you can accomplish the same result without shelling out to sed, I'd happily accept another pull request. I think I understand what you're doing now, but I'm afraid I'll have a tough time maintaining this if I ever need to change it.
Thanks again!
|
@mmai Awesome, thanks Henri. I'll merge this for now. If you can accomplish the same result without shelling out to Thanks again! |
mmai commentedFeb 17, 2018
This fixes the session crashing on ubuntu 17.10 (and probably on other versions as well).