From 17dc2994f28494553720e0095f6e439f416d322a Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Tue, 29 Dec 2020 22:08:46 -0600 Subject: [PATCH] Dropped GNOME tweaks End of year clean up. I've slowly been working away from my GNOME plugin with a handful of customizations. The addition of disabling the Activities hot corner in GNOME helped put the nail in the coffin. Dropped the additional CSS that completely removes the window title bars, just going at things a bit more stock in 2021 --- gnome/extension/extension.js | 69 ----------------------------------- gnome/extension/metadata.json | 12 ------ gnome/gnome-shell.css | 12 ------ gnome/gtk.css | 28 -------------- install | 10 +---- 5 files changed, 2 insertions(+), 129 deletions(-) delete mode 100644 gnome/extension/extension.js delete mode 100644 gnome/extension/metadata.json delete mode 100644 gnome/gnome-shell.css delete mode 100644 gnome/gtk.css diff --git a/gnome/extension/extension.js b/gnome/extension/extension.js deleted file mode 100644 index f27159b..0000000 --- a/gnome/extension/extension.js +++ /dev/null @@ -1,69 +0,0 @@ -const Config = imports.misc.config; -const ExtensionUtils = imports.misc.extensionUtils; -const Main = imports.ui.main; -const SessionMode = imports.ui.sessionMode; - -const moveClock = false; - -const disableHotCorners = function () { - Main.layoutManager.hotCorners.forEach(function (hotCorner) { - if (!hotCorner) return; - hotCorner._toggleOverview = function () {}; - hotCorner._pressureBarrier._trigger = function () {}; - }); -}; - -let activities; -let centerBox; -let children; -let dateMenu; -let hotCornerCallback; -let rightBox; - -function enable() { - // Hides the activities button - activities = Main.panel.statusArea['activities']; - activities.container.hide(); - - // Disables the activities hot corner - disableHotCorners(); - hotCornerCallback = Main.layoutManager.connect('hot-corners-changed', disableHotCorners); - - // Moves the clock to the right - if (moveClock && Main.sessionMode.panel.center.indexOf('dateMenu') > -1) { - centerBox = Main.panel._centerBox; - rightBox = Main.panel._rightBox; - dateMenu = Main.panel.statusArea.dateMenu; - children = centerBox.get_children(); - - if (children.indexOf(dateMenu.container) > -1) { - centerBox.remove_actor(dateMenu.container); - children = rightBox.get_children(); - rightBox.insert_child_at_index(dateMenu.container, children.length - 1); - } - } -} - -function disable() { - // Shows the activities button - activities.container.show(); - - // Enables the activities hot corner - Main.layoutManager.disconnect(hotCornerCallback); - Main.layoutManager._updateHotCorners(); - - // Moves the clock to the center - if (Main.sessionMode.panel.center.indexOf('dateMenu') > -1) { - centerBox = Main.panel._centerBox; - rightBox = Main.panel._rightBox; - dateMenu = Main.panel.statusArea.dateMenu; - children = rightBox.get_children(); - - if (children.indexOf(dateMenu.container) > -1) { - rightBox.remove_actor(dateMenu.container); - centerBox.add_actor(dateMenu.container); - } - } -} - -function init() { } diff --git a/gnome/extension/metadata.json b/gnome/extension/metadata.json deleted file mode 100644 index 67f727b..0000000 --- a/gnome/extension/metadata.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "uuid": "custom@gnome-shell-extensions.joshtronic.com", - "name": "Customizations", - "description": "Moves clock to the right, hides activities button and disables the activities hot corner.", - "url": "https://github.com/joshtronic/dotfiles", - "shell-version": [ - "3.22", - "3.24", - "3.26", - "3.28" - ] -} diff --git a/gnome/gnome-shell.css b/gnome/gnome-shell.css deleted file mode 100644 index 0ea9062..0000000 --- a/gnome/gnome-shell.css +++ /dev/null @@ -1,12 +0,0 @@ -/* Ditch the rounded corners on the top panel */ -#panel .panel-corner { - -panel-corner-radius: 0; - -panel-corner-background-color: transparent; - -panel-corner-border-width: 0; - -panel-corner-border-color: transparent; -} - -/* Give app icon consistent padding with activities and status */ -#panel .panel-status-menu-box { - padding: 0 12px; -} diff --git a/gnome/gtk.css b/gnome/gtk.css deleted file mode 100644 index 1c639e5..0000000 --- a/gnome/gtk.css +++ /dev/null @@ -1,28 +0,0 @@ -/* Hides server-side window decorations (makes it look like a twm) */ -window.ssd separator:first-child + headerbar:backdrop, -window.ssd separator:first-child + headerbar, -window.ssd headerbar:first-child:backdrop, -window.ssd headerbar:first-child, -window.ssd headerbar:last-child:backdrop, -window.ssd headerbar:last-child, -window.ssd stack headerbar:first-child:backdrop, -window.ssd stack headerbar:first-child, -window.ssd stack headerbar:last-child:backdrop, -window.ssd stack headerbar:last-child, -window.ssd decoration, -window.ssd headerbar.titlebar { - border-radius: 0; -} - -window.ssd headerbar * { - margin-top: -100px; -} - -window.ssd headerbar.titlebar, -window.ssd headerbar.titlebar button.titlebutton { - border: none; - font-size: 0; - margin: 0; - min-height: 0; - padding: 0; -} diff --git a/install b/install index 0b0acea..67ce482 100755 --- a/install +++ b/install @@ -23,15 +23,12 @@ git remote rm origin git remote add origin git@github.com:joshtronic/dotfiles.git rm -rf \ - "$DOTCONFIG/gtk-3.0/gtk.css" \ "$DOTCONFIG/nvim/init.vim" \ "$DOTFZF" \ "$DOTLOCAL" \ "$HOME/.bashrc" \ "$HOME/.gitconfig" \ - "$HOME/.local/share/gnome-shell/extensions/custom@gnome-shell-extensions.joshtronic.com" \ "$HOME/.screenrc" \ - "$HOME/.themes/custom/gnome-shell/gnome-shell.css" \ "$HOME/.vim" \ "$HOME/.vimrc" \ "$HOME/.zshrc" @@ -39,7 +36,6 @@ rm -rf \ mkdir -p \ "$DOTCONFIG/"{gtk-3.0,nvim} \ "$DOTLOCAL" \ - "$HOME/.local/share/gnome-shell/extensions" \ "$HOME/.local/share/vim/"{swap,undo} \ "$HOME/.themes/custom/gnome-shell" \ "$HOME/.vim/colors" \ @@ -47,9 +43,6 @@ mkdir -p \ ln -s "$DOTFILES/bashrc" "$HOME/.bashrc" ln -s "$DOTFILES/gitconfig" "$HOME/.gitconfig" -ln -s "$DOTFILES/gnome/extension" "$HOME/.local/share/gnome-shell/extensions/custom@gnome-shell-extensions.joshtronic.com" -ln -s "$DOTFILES/gnome/gnome-shell.css" "$HOME/.themes/custom/gnome-shell/gnome-shell.css" -ln -s "$DOTFILES/gnome/gtk.css" "$HOME/.config/gtk-3.0/gtk.css" ln -s "$DOTFILES/init.vim" "$DOTCONFIG/nvim/init.vim" ln -s "$DOTFILES/screenrc" "$HOME/.screenrc" ln -s "$DOTFILES/vimrc" "$HOME/.vimrc" @@ -94,6 +87,7 @@ done # TODO: Want to be able to toggle between these for a bit curl -o "$HOME/.vim/colors/solarized.vim" https://raw.githubusercontent.com/altercation/vim-colors-solarized/master/colors/solarized.vim +# Never did much toggling, seems I've been "happy" with flattened curl -o "$HOME/.vim/colors/flattened_dark.vim" https://raw.githubusercontent.com/romainl/flattened/master/colors/flattened_dark.vim # Can't seem to get this guy to use truecolor in my terminal... git clone https://github.com/lifepillar/vim-solarized8.git "$HOME/.vim/pack/themes/opt/solarized8" @@ -102,7 +96,7 @@ cd "$HOME" || exit rm -f "${HOME}/.zcompdump*" # Required to kill the terminal's border in GNOME 3.32+ -gsettings set org.gnome.Terminal.Legacy.Settings headerbar "@mb false" +# gsettings set org.gnome.Terminal.Legacy.Settings headerbar "@mb false" echo echo "If this is your first time, you should restart GNOME"