From 8b1013499650d7d3692662d25f79b6642715559f Mon Sep 17 00:00:00 2001 From: Or Bin Date: Sun, 17 Dec 2023 14:49:03 +0200 Subject: [PATCH 1/6] Remove plasma-org.kde.plasma.desktop-appletsrc --- .../plasma-org.kde.plasma.desktop-appletsrc | 271 ------------------ 1 file changed, 271 deletions(-) delete mode 100644 configuration/plasma-org.kde.plasma.desktop-appletsrc diff --git a/configuration/plasma-org.kde.plasma.desktop-appletsrc b/configuration/plasma-org.kde.plasma.desktop-appletsrc deleted file mode 100644 index 412e74b..0000000 --- a/configuration/plasma-org.kde.plasma.desktop-appletsrc +++ /dev/null @@ -1,271 +0,0 @@ -[ActionPlugins][0] -MiddleButton;NoModifier=org.kde.paste -RightButton;NoModifier=org.kde.contextmenu -wheel:Vertical;NoModifier=org.kde.switchdesktop - -[ActionPlugins][1] -RightButton;NoModifier=org.kde.contextmenu - -[Containments][3] -activityId= -formfactor=2 -immutability=1 -lastScreen=0 -location=4 -plugin=org.kde.panel -wallpaperplugin=org.kde.image - -[Containments][3][Applets][20] -immutability=1 -plugin=org.kde.plasma.digitalclock - -[Containments][3][Applets][20][Configuration] -PreloadWeight=10 - -[Containments][3][Applets][20][Configuration][Appearance] -customDateFormat=ddd dd/MM/yy -dateFormat=custom - -[Containments][3][Applets][20][Configuration][ConfigDialog] -DialogHeight=558 -DialogWidth=720 - -[Containments][3][Applets][4] -immutability=1 -plugin=org.kde.plasma.kickoff - -[Containments][3][Applets][4][Configuration] -PreloadWeight=44 - -[Containments][3][Applets][4][Configuration][ConfigDialog] -DialogHeight=558 -DialogWidth=720 - -[Containments][3][Applets][4][Configuration][General] -favoritesDisplay=1 -favoritesPortedToKAstats=true -systemFavorites=suspend\\,hibernate\\,reboot\\,shutdown - -[Containments][3][Applets][4][Configuration][Shortcuts] -global=Alt+F1 - -[Containments][3][Applets][4][Shortcuts] -global=Meta+F1 - -[Containments][3][Applets][5] -immutability=1 -plugin=org.kde.plasma.pager - -[Containments][3][Applets][5][Configuration] -PreloadWeight=0 - -[Containments][3][Applets][6] -immutability=1 -plugin=org.kde.plasma.icontasks - -[Containments][3][Applets][6][Configuration] -PreloadWeight=10 - -[Containments][3][Applets][6][Configuration][ConfigDialog] -DialogHeight=558 -DialogWidth=720 - -[Containments][3][Applets][6][Configuration][General] -# Clicking grouped tasks shows "Present Windows" effect -groupedTaskVisualization=2 -launchers=preferred://browser,preferred://filemanager,applications:org.kde.konsole.desktop,applications:com.spotify.Client.desktop{% if computer_type == "work" %},applications:slack_slack.desktop{% endif %} - -[Containments][3][Applets][7] -immutability=1 -plugin=org.kde.plasma.marginsseparator - -[Containments][3][Applets][7][Configuration] -PreloadWeight=10 - -[Containments][3][Applets][8] -immutability=1 -plugin=org.kde.plasma.systemtray - -[Containments][3][Applets][8][Configuration] -PreloadWeight=29 -SystrayContainmentId=9 - -[Containments][3][ConfigDialog] -DialogHeight=84 -DialogWidth=1920 - -[Containments][3][Configuration] -PreloadWeight=10 - -[Containments][3][General] -AppletOrder=4;5;6;7;8;20 - -[Containments][30] -ItemGeometries-1920x1080= -ItemGeometriesHorizontal= -activityId=7462aed4-032c-40d4-b276-d8d59739eb75 -formfactor=0 -immutability=1 -lastScreen=0 -location=0 -plugin=org.kde.plasma.folder -wallpaperplugin=org.kde.image - -[Containments][30][Configuration] -PreloadWeight=42 - -[Containments][30][Wallpaper][org.kde.image][General] -Image=file:///home/or/.config/pc-setup/wallpaper.jpg - -[Containments][31] -ItemGeometries-1920x1080= -ItemGeometriesHorizontal= -activityId=7462aed4-032c-40d4-b276-d8d59739eb75 -formfactor=0 -immutability=1 -lastScreen=1 -location=0 -plugin=org.kde.plasma.folder -wallpaperplugin=org.kde.image - -[Containments][31][Configuration] -PreloadWeight=42 - -[Containments][31][Wallpaper][org.kde.image][General] -Image=file://{{ wallpaper_path }} - -[Containments][4][Applets][5][Configuration] -PreloadWeight=53 - -[Containments][4][Applets][9][Configuration] -PreloadWeight=11 - -[Containments][9] -activityId= -formfactor=2 -immutability=1 -lastScreen=0 -location=4 -plugin=org.kde.plasma.private.systemtray -wallpaperplugin=org.kde.image - -[Containments][9][Applets][10] -immutability=1 -plugin=org.kde.plasma.vault - -[Containments][9][Applets][10][Configuration] -PreloadWeight=18 - -[Containments][9][Applets][11] -immutability=1 -plugin=org.kde.plasma.volume - -[Containments][9][Applets][11][Configuration] -PreloadWeight=18 - -[Containments][9][Applets][12] -immutability=1 -plugin=org.kde.kdeconnect - -[Containments][9][Applets][12][Configuration] -PreloadWeight=18 - -[Containments][9][Applets][13] -immutability=1 -plugin=org.kde.plasma.clipboard - -[Containments][9][Applets][13][Configuration] -PreloadWeight=18 - -[Containments][9][Applets][14] -immutability=1 -plugin=org.kde.plasma.devicenotifier - -[Containments][9][Applets][14][Configuration] -PreloadWeight=18 - -[Containments][9][Applets][15] -immutability=1 -plugin=org.kde.plasma.keyboardlayout - -[Containments][9][Applets][15][Configuration] -PreloadWeight=18 - -[Containments][9][Applets][16] -immutability=1 -plugin=org.kde.plasma.printmanager - -[Containments][9][Applets][16][Configuration] -PreloadWeight=18 - -[Containments][9][Applets][17] -immutability=1 -plugin=org.kde.plasma.keyboardindicator - -[Containments][9][Applets][17][Configuration] -PreloadWeight=18 - -[Containments][9][Applets][18] -immutability=1 -plugin=org.kde.plasma.nightcolorcontrol - -[Containments][9][Applets][18][Configuration] -PreloadWeight=18 - -[Containments][9][Applets][19] -immutability=1 -plugin=org.kde.plasma.notifications - -[Containments][9][Applets][19][Configuration] -PreloadWeight=23 - -[Containments][9][Applets][22] -immutability=1 -plugin=org.kde.plasma.battery - -[Containments][9][Applets][22][Configuration] -PreloadWeight=18 - -[Containments][9][Applets][23] -immutability=1 -plugin=org.kde.plasma.networkmanagement - -[Containments][9][Applets][23][Configuration] -PreloadWeight=18 - -[Containments][9][Applets][24] -immutability=1 -plugin=org.kde.plasma.bluetooth - -[Containments][9][Applets][24][Configuration] -PreloadWeight=18 - -[Containments][9][Applets][25] -immutability=1 -plugin=org.kde.plasma.mediacontroller - -[Containments][9][Applets][25][Configuration] -PreloadWeight=18 - -[Containments][9][Applets][29] -immutability=1 -plugin=org.kde.plasma.manage-inputmethod - -[Containments][9][Applets][29][Configuration] -PreloadWeight=34 - -[Containments][9][ConfigDialog] -DialogHeight=558 -DialogWidth=720 - -[Containments][9][Configuration] -PreloadWeight=10 - -[Containments][9][General] -extraItems=org.kde.plasma.networkmanagement,org.kde.plasma.vault,org.kde.kupapplet,org.kde.plasma.volume,org.kde.plasma.mediacontroller,org.kde.kdeconnect,org.kde.plasma.clipboard,org.kde.plasma.devicenotifier,org.kde.plasma.keyboardlayout,org.kde.plasma.battery,org.kde.plasma.printmanager,org.kde.plasma.keyboardindicator,org.kde.plasma.nightcolorcontrol,org.kde.plasma.notifications,org.kde.plasma.bluetooth,TelegramDesktop,multipass-gui,Slack1 -hiddenItems=ibus-ui-gtk3,multipass-gui -knownItems=org.kde.plasma.networkmanagement,org.kde.plasma.vault,org.kde.kupapplet,org.kde.plasma.volume,org.kde.plasma.mediacontroller,org.kde.kdeconnect,org.kde.plasma.clipboard,org.kde.plasma.devicenotifier,org.kde.plasma.keyboardlayout,org.kde.plasma.battery,org.kde.plasma.printmanager,org.kde.plasma.keyboardindicator,org.kde.plasma.nightcolorcontrol,org.kde.plasma.notifications,org.kde.plasma.bluetooth -shownItems=org.kde.plasma.nightcolorcontrol,TelegramDesktop,Slack1 - -[ScreenMapping] -itemsOnDisabledScreens= From 20ffd0121985e69fd038005e9dff8def7001466f Mon Sep 17 00:00:00 2001 From: Or Bin Date: Sun, 17 Dec 2023 15:26:50 +0200 Subject: [PATCH 2/6] Install Slack with flatpak instead of Snap --- tasks/basic-consumer-tools.yml | 7 +++---- tasks/configuration.yml | 10 ++-------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/tasks/basic-consumer-tools.yml b/tasks/basic-consumer-tools.yml index 0dfbf96..349bc8a 100644 --- a/tasks/basic-consumer-tools.yml +++ b/tasks/basic-consumer-tools.yml @@ -41,8 +41,7 @@ - us.zoom.Zoom - name: Install Slack - snap: - name: slack - classic: yes - become: yes + community.general.flatpak: + name: + - com.slack.Slack when: computer_type == "work" diff --git a/tasks/configuration.yml b/tasks/configuration.yml index 4f89c73..35543ac 100644 --- a/tasks/configuration.yml +++ b/tasks/configuration.yml @@ -203,12 +203,6 @@ loop: "{{ cura_configuration }}" when: find_cura_config_dir.matched > 0 -- name: Add missing Slack desktop entry - copy: - src: "/var/lib/snapd/desktop/applications/slack_slack.desktop" - dest: "{{ ansible_user_dir }}/.local/share/applications/slack_slack.desktop" - when: computer_type == "work" - - name: Set autostart directory set_fact: autostart_dir: "/etc/xdg/autostart" @@ -216,8 +210,8 @@ - name: Add Slack to autostart (startup/boot) copy: - src: "/var/lib/snapd/desktop/applications/slack_slack.desktop" - dest: "{{ autostart_dir }}/slack_slack.desktop" + src: "/var/lib/flatpak/app/com.slack.Slack/current/active/export/share/applications/com.slack.Slack.desktop" + dest: "{{ autostart_dir }}/" when: computer_type == "work" and configure_gnome become: "{{ configure_gnome }}" From 396c9714c9579bdf3c9741de461108b61fc7163e Mon Sep 17 00:00:00 2001 From: Or Bin Date: Sun, 17 Dec 2023 15:27:01 +0200 Subject: [PATCH 3/6] Fix Telegram Desktop autostart --- tasks/configuration.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/configuration.yml b/tasks/configuration.yml index 35543ac..b563466 100644 --- a/tasks/configuration.yml +++ b/tasks/configuration.yml @@ -218,7 +218,7 @@ - name: Add Telegram Desktop to autostart (startup/boot) copy: src: "/var/lib/flatpak/app/org.telegram.desktop/current/active/export/share/applications/org.telegram.desktop.desktop" - dest: "{{ autostart_dir }}/telegram-desktop_telegram-desktop.desktop" + dest: "{{ autostart_dir }}/" register: telegram_autostart_desktop_entry when: configure_gnome become: "{{ configure_gnome }}" @@ -228,8 +228,8 @@ path: "{{ telegram_autostart_desktop_entry.dest }}" after: "\nExec=" before: "\n" - regexp: "telegram-desktop -- " - replace: "telegram-desktop -startintray -- " + regexp: "org.telegram.desktop -- " + replace: "org.telegram.desktop -startintray -- " when: configure_gnome become: "{{ configure_gnome }}" From 76f894ea27f3932eb8dec07ceb5c2cf0d086b1f7 Mon Sep 17 00:00:00 2001 From: Or Bin Date: Sun, 17 Dec 2023 16:45:32 +0200 Subject: [PATCH 4/6] Set correct locale --- tasks/configuration.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/configuration.yml b/tasks/configuration.yml index b563466..cc9fa82 100644 --- a/tasks/configuration.yml +++ b/tasks/configuration.yml @@ -99,6 +99,8 @@ - name: Configure Gnome (gsettings) shell: | + gsettings set org.gnome.system.locale region 'en_IL.UTF-8' + # Keyboard layouts gsettings set org.gnome.desktop.input-sources mru-sources "[('xkb', 'us'), ('xkb', 'il')]" gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us'), ('xkb', 'il')]" From 057e087e9437edc77c57a84145e085d3e26e8903 Mon Sep 17 00:00:00 2001 From: Or Bin Date: Sun, 17 Dec 2023 17:11:45 +0200 Subject: [PATCH 5/6] Configure "switch windows" shortcut --- tasks/configuration.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/configuration.yml b/tasks/configuration.yml index cc9fa82..66d6912 100644 --- a/tasks/configuration.yml +++ b/tasks/configuration.yml @@ -109,6 +109,7 @@ gsettings set org.freedesktop.ibus.general.hotkey triggers "['Shift_L', 'Shift_R', 'Shift']" gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['Shift_L', 'Shift_R', 'XF86Keyboard']" gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "['Shift_L', 'Shift_R', 'XF86Keyboard']" + gsettings set org.gnome.desktop.wm.keybindings switch-windows "['Tab']" # Lock shortcut gsettings set org.gnome.settings-daemon.plugins.media-keys screensaver "['l', 'Escape']" From 80582a2d16349ac66d1708527c428077d851dc26 Mon Sep 17 00:00:00 2001 From: Or Bin Date: Mon, 18 Dec 2023 12:31:13 +0200 Subject: [PATCH 6/6] Update favorite apps --- tasks/configuration.yml | 2 +- vars/default.yml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tasks/configuration.yml b/tasks/configuration.yml index 66d6912..e5e6a44 100644 --- a/tasks/configuration.yml +++ b/tasks/configuration.yml @@ -114,7 +114,7 @@ # Lock shortcut gsettings set org.gnome.settings-daemon.plugins.media-keys screensaver "['l', 'Escape']" - gsettings set org.gnome.shell favorite-apps "['google-chrome.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Terminal.desktop', 'com.spotify.Client.desktop']" + gsettings set org.gnome.shell favorite-apps '{{ favorite_apps.work if computer_type == "work" else favorite_apps.personal | tojson }}' gsettings set org.gnome.desktop.interface color-scheme "prefer-dark" gsettings set org.gnome.desktop.interface clock-format "24h" diff --git a/vars/default.yml b/vars/default.yml index d2b070e..1ac4295 100644 --- a/vars/default.yml +++ b/vars/default.yml @@ -56,6 +56,19 @@ wallpapers_s3_base_url: "https://or-public-wallpapers-2.s3.eu-central-1.amazonaw wallpaper_by_computer_type: personal: "alexander_stream_estuary_side_stones_improved.jpg" work: "carmel_forest_improved.jpg" +favorite_apps: + personal: + - google-chrome.desktop + - org.gnome.Nautilus.desktop + - org.gnome.Terminal.desktop + - com.spotify.Client.desktop + work: + - google-chrome.desktop + - org.gnome.Nautilus.desktop + - org.gnome.Terminal.desktop + - com.spotify.Client.desktop + - lens-desktop.desktop + - com.slack.Slack.desktop # Used by geerlingguy.docker: docker_compose_version: v2.12.2