Compare commits
No commits in common. "76cb7597c164b8ffe0f5e532f506633a0d8fd33d" and "f9a5207e76bcf7e3cb31c15fd1ac2e80b94cd1f1" have entirely different histories.
76cb7597c1
...
f9a5207e76
|
@ -1,51 +0,0 @@
|
||||||
#!/usr/bin/env lua
|
|
||||||
|
|
||||||
local bindings = {
|
|
||||||
{
|
|
||||||
'"Toggle terminal transparency"',
|
|
||||||
'"${HOME}/scripts/toggle-term-transparency.sh"',
|
|
||||||
"\"['<Primary>dead_acute']\"",
|
|
||||||
},
|
|
||||||
{ '"Toggle bg"', '"${HOME}/scripts/switch-bg.sh t"', "\"['<Primary>ccedilla']\"" },
|
|
||||||
}
|
|
||||||
local custom_list = '"['
|
|
||||||
for i, _ in pairs(bindings) do
|
|
||||||
custom_list = custom_list .. "'custom" .. (i - 1) .. "',"
|
|
||||||
end
|
|
||||||
custom_list = custom_list:sub(1, custom_list:len() - 1) .. ']"'
|
|
||||||
print(custom_list)
|
|
||||||
os.execute("gsettings set org.cinnamon.desktop.keybindings custom-list " .. custom_list)
|
|
||||||
local gset = function(index, name, command, binding)
|
|
||||||
print(
|
|
||||||
"Setting keybinding custom"
|
|
||||||
.. index
|
|
||||||
.. ", with name "
|
|
||||||
.. name
|
|
||||||
.. ", command "
|
|
||||||
.. command
|
|
||||||
.. ", and binding "
|
|
||||||
.. binding
|
|
||||||
.. "."
|
|
||||||
)
|
|
||||||
local cmd = "gsettings set org.cinnamon.desktop.keybindings.custom-keybinding:/org/cinnamon/desktop/keybindings/custom-keybindings/custom"
|
|
||||||
.. index
|
|
||||||
.. "/ name "
|
|
||||||
.. name
|
|
||||||
print(cmd)
|
|
||||||
os.execute(cmd)
|
|
||||||
cmd = "gsettings set org.cinnamon.desktop.keybindings.custom-keybinding:/org/cinnamon/desktop/keybindings/custom-keybindings/custom"
|
|
||||||
.. index
|
|
||||||
.. "/ command "
|
|
||||||
.. command
|
|
||||||
print(cmd)
|
|
||||||
os.execute(cmd)
|
|
||||||
cmd = "gsettings set org.cinnamon.desktop.keybindings.custom-keybinding:/org/cinnamon/desktop/keybindings/custom-keybindings/custom"
|
|
||||||
.. index
|
|
||||||
.. "/ binding "
|
|
||||||
.. binding
|
|
||||||
print(cmd)
|
|
||||||
os.execute(cmd)
|
|
||||||
end
|
|
||||||
for i, binding in pairs(bindings) do
|
|
||||||
gset(i - 1, binding[1], binding[2], binding[3])
|
|
||||||
end
|
|
|
@ -9,9 +9,9 @@
|
||||||
|
|
||||||
set(){
|
set(){
|
||||||
|
|
||||||
gsettings set org.cinnamon.desktop.keybindings.custom-keybinding:/org/cinnamon/desktop/keybindings/custom-keybindings/custom"${1}"/ name "${2}"
|
gsettings set org.cinnamon.desktop.keybindings.custom-keybinding:/org/cinnamon/desktop/keybindings/custom-keybindings/custom${1}/ name "${2}"
|
||||||
gsettings set org.cinnamon.desktop.keybindings.custom-keybinding:/org/cinnamon/desktop/keybindings/custom-keybindings/custom"${1}"/ command "${3}"
|
gsettings set org.cinnamon.desktop.keybindings.custom-keybinding:/org/cinnamon/desktop/keybindings/custom-keybindings/custom${1}/ command "${3}"
|
||||||
gsettings set org.cinnamon.desktop.keybindings.custom-keybinding:/org/cinnamon/desktop/keybindings/custom-keybindings/custom"${1}"/ binding "${4}"
|
gsettings set org.cinnamon.desktop.keybindings.custom-keybinding:/org/cinnamon/desktop/keybindings/custom-keybindings/custom${1}/ binding "${4}"
|
||||||
}
|
}
|
||||||
|
|
||||||
## Terminal
|
## Terminal
|
||||||
|
|
Loading…
Reference in New Issue