1774fadea8
Add vim Add xfce setup script Fix opensuse setup script
193 lines
7.3 KiB
Bash
Executable File
193 lines
7.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# A Bash script for setup up XFCE on openSUSE
|
|
|
|
clear
|
|
|
|
echo "This script will reconfigure your XFCE Desktop Environment."
|
|
echo "You probably don't want this unless you're me!"
|
|
echo
|
|
echo "Press Ctrl-C to cancel or Enter to continue."
|
|
|
|
read
|
|
|
|
# Get the script directory
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
|
|
# Symlink gtk.css to $XDG_CONFIG_HOME/gtk-3.0/gtk.css
|
|
echo
|
|
echo "Symlinking $SCRIPT_DIR/gtk.css to $XDG_CONFIG_HOME/gtk-3.0/gtk.css"
|
|
ln -sf $SCRIPT_DIR/gtk.css $XDG_CONFIG_HOME/gtk-3.0/gtk.css
|
|
|
|
# Symlink xfce4-panel.xml to $XDG_CONFIG_HOME/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
|
|
echo
|
|
echo "Symlinking $SCRIPT_DIR/xfce4-panel.xml to $XDG_CONFIG_HOME/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml"
|
|
ln -sf $SCRIPT_DIR/xfce4-panel.xml $XDG_CONFIG_HOME/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
|
|
|
|
# Enable the screensaver and set to a timeout of 14 minutes
|
|
echo
|
|
echo "Enabling the screensaver and setting a timeout of 14 minutes"
|
|
xfconf-query -c xfce4-screensaver -p /saver/idle-activation/enabled --create --type bool -s true
|
|
xfconf-query -c xfce4-screensaver -p /saver/idle-activation/delay --create --type int -s 14
|
|
|
|
# Set the screensaver to Matrix
|
|
echo
|
|
echo "Setting the screensaver to Matrix"
|
|
xfconf-query -c xfce4-screensaver -p /saver/mode --create --type int -s 2
|
|
xfconf-query -c xfce4-screensaver -p /saver/themes/list --create --force-array --type string -s "screensavers-glmatrix"
|
|
|
|
# Lock the screen after 1 minute of screensaving
|
|
echo
|
|
echo "Locking the screen after 1 minute of screensaving"
|
|
xfconf-query -c xfce4-screensaver -p /lock/saver-activation/delay --create --type int -s 1
|
|
|
|
# Dracula theme
|
|
echo
|
|
echo "Setting the Dracula theme"
|
|
xfconf-query -c xfwm4 -p /general/theme -s "Dracula"
|
|
xfconf-query -c xsettings -p /Net/ThemeName -s "Dracula"
|
|
|
|
# Icon theme
|
|
echo
|
|
echo "Setting the Vimix-dark icon theme"
|
|
xfconf-query -c xsettings -p /Net/IconThemeName -s "Vimix-dark"
|
|
|
|
# Fonts
|
|
echo
|
|
echo "Setting fonts"
|
|
xfconf-query -c xfwm4 -p /general/title_font -s "Segoe UI Variable Bold 14.5"
|
|
xfconf-query -c xsettings -p /Gtk/FontName -s "Segoe UI Variable Regular 11.5"
|
|
xfconf-query -c xsettings -p /Gtk/MonospaceFontName -s "Hack 12"
|
|
gsettings set org.gnome.desktop.interface monospace-font-name 'Hack 12'
|
|
gsettings set org.gnome.desktop.interface font-name 'Segoe UI Variable Regular 11.5'
|
|
|
|
# Font sub-pixel order
|
|
# Depends on the monitor?
|
|
echo
|
|
echo "Disabling sub-pixel order"
|
|
xfconf-query -c xsettings -p /Xft/RGBA -s "none"
|
|
|
|
# Window button layout
|
|
echo
|
|
echo "Setting the window button layout"
|
|
xfconf-query -c xfwm4 -p /general/button_layout -s "|HC"
|
|
xfconf-query -c xsettings -p /Gtk/DecorationLayout -s "icon,menu:minimize,close"
|
|
|
|
# Mouse cursor
|
|
echo
|
|
echo "Setting the mouse cursor"
|
|
xfconf-query -c xsettings -p /Gtk/CursorThemeName -s "Adwaita"
|
|
xfconf-query -c xsettings -p /Gtk/CursorThemeSize -s 16
|
|
|
|
# Reclaim the Super key
|
|
echo
|
|
echo "Reclaiming the Super key"
|
|
xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/Super_L" --reset
|
|
|
|
# Easy dragging/resize windows with Super key
|
|
echo
|
|
echo "Setting easy dragging/resize windows with Super key"
|
|
xfconf-query -c xfwm4 -p /general/easy_click -s "Super"
|
|
|
|
# Remove Alt Space menu
|
|
echo
|
|
echo "Removing Alt+Space menu"
|
|
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Alt>space" --reset
|
|
|
|
# Set Ctrl Alt Delte to start the task manager
|
|
echo
|
|
echo "Setting Ctrl+Alt+Delete and Ctrl+Escape to start the task manager"
|
|
xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/<Primary><Alt>Delete" --create --type string -s "xfce4-taskmanager"
|
|
xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/<Primary><Shift>Escape" --create --type string -s "xfce4-taskmanager"
|
|
|
|
# Remove size margins when maximizing
|
|
echo
|
|
echo "Removing size margins when maximizing"
|
|
xfconf-query -c xfwm4 -p /general/margin_left -s 0; xfconf-query -c xfwm4 -p /general/margin_right -s 0
|
|
|
|
# No confusing shade when scrolling on titlebar
|
|
echo
|
|
echo "Disabling shade when scrolling on titlebar"
|
|
xfconf-query -c xfwm4 -p /general/mousewheel_rollup -s false
|
|
|
|
# Center most windows
|
|
echo
|
|
echo "Setting placement ratio to center most windows"
|
|
xfconf-query -c xfwm4 -p /general/placement_ratio -s 90
|
|
|
|
# Transparency on popups
|
|
echo
|
|
echo "Setting popup opacity to 98"
|
|
xfconf-query -c xfwm4 -p /general/popup_opacity -s 98
|
|
|
|
# Only raise windows when clicking on them
|
|
echo
|
|
echo "Only raising windows when clicking on them (not when scrolling)"
|
|
xfconf-query -c xfwm4 -p /general/raise_with_any_button -s false
|
|
|
|
# Disable workspaces
|
|
# (think this one over)
|
|
echo
|
|
echo "Disabling workspaces"
|
|
xfconf-query -c xfwm4 -p /general/workspace_count -s 1
|
|
|
|
# Disable button & menu icons
|
|
echo
|
|
echo "Disabling button and menu icons"
|
|
xfconf-query -c xsettings -p /Gtk/ButtonImages -s false
|
|
xfconf-query -c xsettings -p /Gtk/ButtonImages -s false
|
|
|
|
# Thunar location buttons
|
|
echo
|
|
echo "Enabling Thunar location buttons"
|
|
xfconf-query -c thunar -p /last-location-bar -s "ThunarLocationButtons"
|
|
|
|
# Launch file explorer on Super E
|
|
echo
|
|
echo "Setting Super+E and Ctrl+Alt+E to launch the file explorer"
|
|
xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/<Super>e" --create --type string -s "exo-open --launch FileManager"
|
|
xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/<Ctrl><Alt>e" --create --type string -s "exo-open --launch FileManager"
|
|
|
|
# Lock the computer with Super L
|
|
echo
|
|
echo "Setting Super+L to lock the computer"
|
|
xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/<Super>l" --create --type string -s "xflock4"
|
|
|
|
# Disable Middle Click Pasting
|
|
echo
|
|
echo "Disabling middle click pasting"
|
|
gsettings set org.gnome.desktop.interface gtk-enable-primary-paste false
|
|
|
|
# Clipboard history on Super V
|
|
echo
|
|
echo "Setting Super+V to launch the clipboard history"
|
|
xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/<Super>v" --create --type string -s "xfce4-popup-clipman"
|
|
|
|
# Clipboard history settings
|
|
echo
|
|
echo "Setting clipboard history settings"
|
|
xfconf-query -c xfce4-panel -p /plugins/clipman/settings/add-primary-clipboard --create --type bool -s false
|
|
xfconf-query -c xfce4-panel -p /plugins/clipman/tweaks/popup-at-pointer --create --type bool -s true
|
|
|
|
# Desktop display
|
|
echo
|
|
echo "Setting desktop display settings"
|
|
xfconf-query -c xfce4-desktop -p /desktop-icons/confirm-sorting --create -s false
|
|
xfconf-query -c xfce4-desktop -p /desktop-icons/gravity --type string --create -s 2
|
|
xfconf-query -c xfce4-desktop -p /desktop-icons/icon-size --create --type int -s 82
|
|
xfconf-query -c xfce4-desktop -p /desktop-icons/primary --create --type bool -s true
|
|
xfconf-query -c xfce4-desktop -p /desktop-icons/show-hidden-files --create --type bool -s true
|
|
xfconf-query -c xfce4-desktop -p /desktop-icons/show-tooltips --create --type bool -s false
|
|
xfconf-query -c xfce4-desktop -p /desktop-icons/file-icons/show-device-fixed --create --type bool -s false
|
|
xfconf-query -c xfce4-desktop -p /desktop-icons/file-icons/show-filesystem --create --type bool -s false
|
|
xfconf-query -c xfce4-desktop -p /desktop-icons/file-icons/home --create --type bool -s false
|
|
xfconf-query -c xfce4-desktop -p /desktop-icons/file-icons/trash --create --type bool -s false
|
|
xfconf-query -c xfce4-desktop -p /desktop-icons/file-icons/show-unknown-removable --create --type bool -s true
|
|
|
|
# Tell the user we're done
|
|
echo
|
|
echo "All done!"
|
|
echo "You must reboot your system, otherwise things will not work as expected."
|
|
|
|
exit 0
|