Add keybind

This commit is contained in:
Mylloon 2024-02-28 12:42:26 +01:00
parent 4118d0f782
commit 9379fdc0d2
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

20
arch.sh
View file

@ -437,8 +437,26 @@ main() {
sudo systemctl start clamav-daemon.service
# === GPU Screen recorder ==
systemctl enable --now --user gpu-screen-recorder
# Configuration
wget -q --show-progress ${repo}/.config/gpu-screen-recorder.env -P "$HOME"/.config/
# Enable
systemctl enable --now --user gpu-screen-recorder
# Keybind
custom_keybindings_list=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
if ! echo "$custom_keybindings_list" | grep -q "gpu-screen-recorder"
then
if [ "$custom_keybindings_list" = "@as []" ] # creating new list if not exists
then
custom_keybindings_list="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/gpu-screen-recorder/']"
else # if already existing, adding our new element
custom_keybindings_list=$(echo "$custom_keybindings_list" | sed "s/\[//" | sed "s/\]//")
custom_keybindings_list="[$custom_keybindings_list, '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/gpu-screen-recorder/']"
fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$custom_keybindings_list" # update the list
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/gpu-screen-recorder/ name "Shadowplay" # set name
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/gpu-screen-recorder/ command "killall -SIGUSR1 gpu-screen-recorder" # set command
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/gpu-screen-recorder/ binding "<Control>F9" # set shortcut
fi
printf "\nConcernant le Secure Boot, voici le tuto :"
echo "https://www.reddit.com/r/archlinux/comments/zo83gb/how_i_setup_secure_boot_for_arch_linux_simple/"