Auto-configure GNOME if possible
This commit is contained in:
parent
54b30fb614
commit
3babdcb719
46
configs/gnome/desktop-settings.sh
Normal file
46
configs/gnome/desktop-settings.sh
Normal file
@ -0,0 +1,46 @@
|
||||
#! /bin/sh
|
||||
# This script configures GNOME to my liking
|
||||
set -e
|
||||
|
||||
# Require gsettings
|
||||
if ! command -v gsettings >/dev/null 2>&1; then
|
||||
echo "gsettings is not installed, skipping some GNOME configuration"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Mouse settings
|
||||
gsettings set org.gnome.desktop.interface gtk-enable-primary-paste true # Middle click paste
|
||||
gsettings set org.gnome.desktop.peripherals.touchpad disable-while-typing false # Allow touchpad while typing
|
||||
gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false # Disable natural scrolling on touchpad
|
||||
|
||||
# Keyboard settings
|
||||
gsettings set org.gnome.desktop.wm.keybindings close "['<Super><Shift>q']" # Close windows with Mod+Shift+q
|
||||
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-1 "['<Shift><Super>exclam']" # Move a window to ws 1
|
||||
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-2 "['<Shift><Super>at']" # Move a window to ws 2
|
||||
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-3 "['<Shift><Super>numbersign']" # Move a window to ws 3
|
||||
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-4 "['<Shift><Super>dollar']" # Move a window to ws 4
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['<Super>1']" # Switch to ws 1
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-2 "['<Super>2']" # Switch to ws 2
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-3 "['<Super>3']" # Switch to ws 3
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-4 "['<Super>4']" # Switch to ws 4
|
||||
|
||||
# Allow Mod+Enter to open a terminal
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name "Open Terminal"
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command "gnome-terminal"
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding "<Super>Return"
|
||||
|
||||
# Top Bar settings
|
||||
gsettings set org.gnome.desktop.interface clock-format 24h # 24 hour clock
|
||||
gsettings set org.gnome.desktop.interface clock-show-date true # Show date in top bar
|
||||
gsettings set org.gnome.desktop.interface clock-show-weekday true # Show weekday in top bar
|
||||
|
||||
# Window settings
|
||||
gsettings set org.gnome.desktop.wm.preferences focus-mode 'sloppy' # Focus windows on mouse hover
|
||||
gsettings set org.gnome.desktop.wm.preferences auto-raise false # Don't auto-raise windows
|
||||
|
||||
# Desktop settings
|
||||
gsettings set org.gnome.desktop.interface enable-hot-corners false # Disable hot corners
|
||||
gsettings set org.gnome.mutter edge-tiling true # Enable edge tiling
|
||||
gsettings set org.gnome.mutter dynamic-workspaces false # Use a fixed number of workspaces
|
||||
gsettings set org.gnome.desktop.wm.preferences num-workspaces 4 # Use 4 workspaces
|
||||
gsettings set org.gnome.mutter workspaces-only-on-primary true # Only use workspaces on primary monitor
|
7
configs/gnome/terminal/terminal.dconf
Normal file
7
configs/gnome/terminal/terminal.dconf
Normal file
@ -0,0 +1,7 @@
|
||||
[legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9]
|
||||
custom-command='/usr/bin/zsh'
|
||||
default-size-columns=100
|
||||
default-size-rows=40
|
||||
login-shell=true
|
||||
use-custom-command=true
|
||||
visible-name='Default'
|
@ -40,13 +40,13 @@ endif
|
||||
" This is where the plugins be
|
||||
call plug#begin()
|
||||
|
||||
Plug 'github/copilot.vim'
|
||||
" Plug 'github/copilot.vim'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
Plug 'nathanaelkane/vim-indent-guides'
|
||||
Plug 'ggandor/leap.nvim'
|
||||
" Plug 'ggandor/leap.nvim'
|
||||
|
||||
" And this is where the plugins no longer be
|
||||
call plug#end()
|
||||
@ -67,7 +67,7 @@ hi IndentGuidesOdd ctermbg=darkgrey
|
||||
hi IndentGuidesEven ctermbg=lightgrey
|
||||
|
||||
" Enable leap for jumping
|
||||
lua require('leap').add_default_mappings()
|
||||
" lua require('leap').add_default_mappings()
|
||||
|
||||
" Make the gitgutter look cleaner
|
||||
let g:gitgutter_override_sign_column_highlight = 0
|
||||
|
16
helpers/configure-gnome.sh
Normal file
16
helpers/configure-gnome.sh
Normal file
@ -0,0 +1,16 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
# Check if dconf is available
|
||||
if ! command -v dconf >/dev/null 2>&1; then
|
||||
echo "dconf is not installed, skipping GNOME configuration"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Configure gnome-terminal
|
||||
echo "Writing gnome-terminal settings..."
|
||||
dconf load "/org/gnome/terminal/" < configs/gnome/terminal/terminal.dconf
|
||||
|
||||
# Configure GNOME itself
|
||||
echo "Writing GNOME settings..."
|
||||
sh ./configs/gnome/desktop-settings.sh
|
@ -28,4 +28,5 @@
|
||||
- shell:
|
||||
- [git submodule update --init --recursive, Installing submodules]
|
||||
- [chmod +x configs/scripts/catto, Making catto executable]
|
||||
- [chmod +x configs/scripts/aspath, Making aspath executable]
|
||||
- [chmod +x configs/scripts/aspath, Making aspath executable]
|
||||
- [sh ./helpers/configure-gnome.sh, Configuring GNOME]
|
Loading…
x
Reference in New Issue
Block a user