桌面体验自动化

桌面体验自动化

我正在尝试在 Ansible 剧本中应用以下逻辑:

自从:

dconf read /org/gnome/shell/favorite-apps ['firefox.desktop', 'thunderbird.desktop', 'org.gnome.Nautilus.desktop', 'rhythmbox.desktop', 'libreoffice-writer.desktop', 'snap-store_ubuntu-software.desktop', 'yelp.desktop', 'google-chrome.desktop', 'org.gnome.Terminal.desktop', 'linphone.desktop']

和:

dconf read /org/gnome/shell/favorite-apps ['firefox.desktop', 'thunderbird.desktop', 'org.gnome.Nautilus.desktop', 'rhythmbox.desktop', 'libreoffice-writer.desktop', 'snap-store_ubuntu-software.desktop', 'yelp.desktop', 'google-chrome.desktop', 'org.gnome.Terminal.desktop', 'linphone.desktop']

应用它们我怎么才能使它工作:

          - name: Set Chrome as fav
            dconf: key="/org/gnome/shell/favorite-apps" value="'org.gnome.Nautilus.desktop', 'libreoffice-writer.desktop', 'google-chrome.desktop', 'org.gnome.Terminal.desktop', 'linphone.desktop'"

提前感谢您的建议。

答案1

解决我的麻烦的方法是使用 ansible 运行脚本:

#!/bin/bash
#configure dock to be on the bottom
gsettings set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM
#configure buttons
gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close"
#configure keymap swap
gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "['<Alt>Shift_L']"
#configure keymap swap
gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Shift>Alt_L']"
#remove autosuspend
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
#remove autosuspend
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'nothing'
#remove current screenshot button
gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot '[]'
#configure favourites
dconf write /org/gnome/shell/favorite-apps "['org.gnome.Nautilus.desktop', 'google-chrome.desktop', 'org.gnome.Terminal.desktop', 'linphone.desktop', 'flameshot.desktop']"
#configure bulgarian keymapping && us maps
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us'), ('xkb', 'bg+phonetic')]"
#configure flameshot screenshot tool
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'flameshot'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command '/usr/bin/flameshot gui'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding 'Print'

相关内容