From 0a02856aab3d730217a999cc26e1b5cf73133b97 Mon Sep 17 00:00:00 2001 From: Scott Ames Date: Sun, 25 Aug 2024 20:11:04 -0700 Subject: [PATCH] fix(chezmoi/gnome-ext): cleanup + no ignore --- home/.chezmoiignore | 1 - .../run_once_after_45_gnome_extensions.sh.tmpl | 14 +++++--------- home/.gsettings.yaml | 13 +------------ 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/home/.chezmoiignore b/home/.chezmoiignore index d6975a12..a3dddaa1 100644 --- a/home/.chezmoiignore +++ b/home/.chezmoiignore @@ -4,7 +4,6 @@ .cache .gsettings.yaml -.chezmoiscripts/45_gnome_extensions.sh {{- if not (regexMatch "^gnome" .desktop_session) }} ### Ignore if not running gnome diff --git a/home/.chezmoiscripts/run_once_after_45_gnome_extensions.sh.tmpl b/home/.chezmoiscripts/run_once_after_45_gnome_extensions.sh.tmpl index 75f86271..d4b8b4e2 100644 --- a/home/.chezmoiscripts/run_once_after_45_gnome_extensions.sh.tmpl +++ b/home/.chezmoiscripts/run_once_after_45_gnome_extensions.sh.tmpl @@ -1,7 +1,6 @@ #!/bin/env bash -# shellcheck disable=SC1054,SC1083 -{{ if regexMatch "^gnome" .desktop_session }} +set -ex echo ' ██████╗ ███╗ ██╗ ██████╗ ███╗ ███╗███████╗ @@ -18,7 +17,6 @@ echo ' ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝ ' _gnome_extensions_installed=( - "nightthemeswitcher@romainvigier.fr" "pano@elhan.io" "paperwm@paperwm.github.com" "user-theme@gnome-shell-extensions.gcampax.github.com" @@ -46,15 +44,14 @@ fi function _install_gnome_extensions() { if ! dbhostexec which gext &>/dev/null; then - if [[ $(cat /proc/version | grep arch) ]]; then + if [[ $(cat /proc/version | grep 'arch\|Red Hat') ]]; then - if ! dbhostexec which pipx &>/dev/null; then + if ! which pipx &>/dev/null; then printf "Missing pipx! Cannot install gext\n" return 1 fi - dbhostexec pipx install gnome-extensions-cli - dbhostexec pipx runpip gnome-extensions-cli install pygobject + pipx install gnome-extensions-cli else dbhostexec pip install --upgrade gnome-extensions-cli @@ -64,7 +61,7 @@ function _install_gnome_extensions() { echo "🚀 gext already installed!" fi - _gext="$(dbhostexec which gext)" + _gext="$(which gext)" for _ext in "${_gnome_extensions_removed[@]}"; do dbhostexec $_gext uninstall "${_ext}" @@ -78,6 +75,5 @@ function _install_gnome_extensions() { _install_gnome_extensions # shellcheck disable=SC1056,SC1072,SC1083,SC1009,SC1073 -{{ end -}} # vi: ft=bash diff --git a/home/.gsettings.yaml b/home/.gsettings.yaml index 4ee92d8a..a1d9fcb4 100644 --- a/home/.gsettings.yaml +++ b/home/.gsettings.yaml @@ -38,18 +38,7 @@ org.gnome.settings-daemon.plugins.media-keys: org.gnome.settings-daemon.plugins.power: sleep-inactive-ac-type: '''nothing''' org.gnome.shell: - favorite-apps: '[''firefox.desktop'', ''vivaldi-stable.desktop'', ''1password.desktop'', ''org.gnome.Software.desktop'', ''org.flameshot.Flameshot.desktop'', ''org.gnome.Nautilus.desktop'', ''org.wezfurlong.wezterm.desktop'']' -org.gnome.shell.extensions.nightthemeswitcher.gtk-variants: - day: '''Catppuccin-Frappe-Standard-Flamingo-dark''' - enabled: "true" - night: '''Catppuccin-Mocha-Standard-Flamingo-dark''' -org.gnome.shell.extensions.nightthemeswitcher.shell-variants: - day: '''Catppuccin-Frappe-Standard-Flamingo-dark''' - enabled: "true" - night: '''Catppuccin-Mocha-Standard-Flamingo-dark''' -org.gnome.shell.extensions.nightthemeswitcher.time: - sunrise: "0.0" - sunset: "0.016666666666666666" + favorite-apps: '[''org.mozilla.firefox.desktop'', ''vivaldi-stable.desktop'', ''1password.desktop'', ''org.gnome.Software.desktop'', ''org.flameshot.Flameshot.desktop'', ''org.gnome.Nautilus.desktop'', ''org.wezfurlong.wezterm.desktop'']' org.gnome.shell.extensions.paperwm: use-default-background: "true" winprops: '[''{"wm_class":"gnome-calculator","title":"calc","scratch_layer":true}'', ''{"wm_class":"keymapp","title":"keymapp","scratch_layer":true}'', ''{"wm_class":"Keymapp","title":"Keymapp","scratch_layer":true}'', ''{"wm_class":"zoom","title":"zoom","scratch_layer":true}'', ''{"wm_class":"zoom.real ","title":"zoom.real","scratch_layer":true}'', ''{"wm_class":"zoom.real","title":"zoom.real","scratch_layer":true}'']'