add flameshot another shortcut

This commit is contained in:
Mylloon 2024-05-13 13:55:59 +02:00
parent 151ff3dbf8
commit 6618242463
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

12
arch.sh
View file

@ -106,18 +106,24 @@ function main {
wget -q --show-progress ${repo}/.config/flameshot/flameshot.ini -P "$HOME"/.config/flameshot/
# Change keybindings
gsettings set org.gnome.shell.keybindings show-screenshot-ui "[]"
local custom_keybindings_list
local custom_keybindings_list flameshot_shortcuts
custom_keybindings_list=$(gsettings get ${gs_mediakey} custom-keybindings)
flameshot_shortcuts="'${shortcut}/flameshot-shortcut/', '${shortcut}/flameshot-shortcut-2/'"
if [[ $custom_keybindings_list == "@as []" ]] # creating new list if not exists
then
custom_keybindings_list="['${shortcut}/flameshot-shortcut/']"
custom_keybindings_list="[${flameshot_shortcuts}]"
else # if already existing, adding our new element
custom_keybindings_list="${custom_keybindings_list::-1}, '${shortcut}/flameshot-shortcut/']"
custom_keybindings_list="${custom_keybindings_list::-1}, ${flameshot_shortcuts}]"
fi
gsettings set ${gs_mediakey} custom-keybindings "$custom_keybindings_list"
# Shortcut 1
gsettings set ${gs_mediakey}.custom-keybinding:${shortcut}/flameshot-shortcut/ name "Flameshot" # set name
gsettings set ${gs_mediakey}.custom-keybinding:${shortcut}/flameshot-shortcut/ command "flameshot gui" # set command
gsettings set ${gs_mediakey}.custom-keybinding:${shortcut}/flameshot-shortcut/ binding "Print" # set key
# Shortcut 2
gsettings set ${gs_mediakey}.custom-keybinding:${shortcut}/flameshot-shortcut-2/ name "Flameshot Windows style" # set name
gsettings set ${gs_mediakey}.custom-keybinding:${shortcut}/flameshot-shortcut-2/ command "flameshot gui" # set command
gsettings set ${gs_mediakey}.custom-keybinding:${shortcut}/flameshot-shortcut-2/ binding "<Shift><Super>s" # set key
# === Emoji picker ==