From e1b2350268567ebabbba84d604458ef39cc3473c Mon Sep 17 00:00:00 2001 From: Tracey Clark Date: Tue, 6 Mar 2018 08:54:16 -0600 Subject: [PATCH 1/2] Added script to configure GTK - Gnome Added another script to reset gtk --- gnome-config.sh | 13 +++++++++++++ gtk.css | 9 +++++++++ reset_gtk.sh | 3 ++- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 gnome-config.sh create mode 100644 gtk.css diff --git a/gnome-config.sh b/gnome-config.sh new file mode 100644 index 0000000..401f8be --- /dev/null +++ b/gnome-config.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Set certain configuration options in gnome +# because the cult of simple design has gone too far +# Works for budgie wm on Ubuntu 17.10 as well + +# Restore menu icons +gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gtk/ButtonImages': <1>, 'Gtk/MenuImages': <1>}" + +# To reduce GNOME 3 titlebar height +cp gtk.css ~/.config/gtk-3.0/gtk.css + +# Restart gnome shell - manually with alt+f2, type r and press return (not in budgie) +gnome-shell --replace \ No newline at end of file diff --git a/gtk.css b/gtk.css new file mode 100644 index 0000000..dbef915 --- /dev/null +++ b/gtk.css @@ -0,0 +1,9 @@ +.header-bar.default-decoration { + padding-top: 0px; + padding-bottom: 0px; +} + +.header-bar.default-decoration .button.titlebutton { + padding-top: 0px; + padding-bottom: 0px; +} \ No newline at end of file diff --git a/reset_gtk.sh b/reset_gtk.sh index 39c2def..aec01e7 100644 --- a/reset_gtk.sh +++ b/reset_gtk.sh @@ -20,4 +20,5 @@ for f in .gnome .gnome2 .gconf .gconfd .metacity; do mv $f ${f}.bak; done or mkd dconf reset -f /org/gnome/ # Reset Gnome Extensions -mv ~/.local/share/gnome-shell/extensions ~/.local/share/gnome-shell/extensions-bkup \ No newline at end of file +mv ~/.local/share/gnome-shell/extensions ~/.local/share/gnome-shell/extensions-bkup +mkdir -p ~/.local/share/gnome-shell/extensions \ No newline at end of file From e7d84333f42e062fb23181d0c5e2a8e181a83782 Mon Sep 17 00:00:00 2001 From: Tracey Clark Date: Tue, 6 Mar 2018 09:25:17 -0600 Subject: [PATCH 2/2] Added logic to restart gnome-shell or budgie-wm depending on which is running --- gnome-config.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/gnome-config.sh b/gnome-config.sh index 401f8be..9420893 100644 --- a/gnome-config.sh +++ b/gnome-config.sh @@ -9,5 +9,21 @@ gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gtk/Butto # To reduce GNOME 3 titlebar height cp gtk.css ~/.config/gtk-3.0/gtk.css -# Restart gnome shell - manually with alt+f2, type r and press return (not in budgie) -gnome-shell --replace \ No newline at end of file + +# Restart gnome shell if its running - manually with alt+f2, type restart and press return (not in budgie) +if pgrep -x "gedit" > /dev/null +then + echo "Restarting Gnome shell" + gnome-shell --replace +else + echo "Gnome shell is not running so not restarting it" +fi + +# If budgie is running restart budgie +if pgrep -x "gedit" > /dev/null +then + echo "Restarting Budgie window manager" + budgie-wm --replace +else + echo "Budgie window manager is not running so not restarting it" +fi \ No newline at end of file