Skip to content

Commit

Permalink
fix(chezmoi/gnome-ext): cleanup + no ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
scottames committed Aug 26, 2024
1 parent ba035a1 commit 0a02856
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
1 change: 0 additions & 1 deletion home/.chezmoiignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
.cache
.gsettings.yaml

.chezmoiscripts/45_gnome_extensions.sh
{{- if not (regexMatch "^gnome" .desktop_session) }}
### Ignore if not running gnome

Expand Down
14 changes: 5 additions & 9 deletions home/.chezmoiscripts/run_once_after_45_gnome_extensions.sh.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/env bash

# shellcheck disable=SC1054,SC1083
{{ if regexMatch "^gnome" .desktop_session }}
set -ex

echo '
██████╗ ███╗ ██╗ ██████╗ ███╗ ███╗███████╗
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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}"
Expand All @@ -78,6 +75,5 @@ function _install_gnome_extensions() {
_install_gnome_extensions

# shellcheck disable=SC1056,SC1072,SC1083,SC1009,SC1073
{{ end -}}

# vi: ft=bash
13 changes: 1 addition & 12 deletions home/.gsettings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}'']'
Expand Down

0 comments on commit 0a02856

Please sign in to comment.