Initial commit
This commit is contained in:
commit
4d987af661
BIN
.repo-assets/icon.png
Normal file
BIN
.repo-assets/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
BIN
.repo-assets/icon.xcf
Normal file
BIN
.repo-assets/icon.xcf
Normal file
Binary file not shown.
17
desktop-entries/blender.desktop
Normal file
17
desktop-entries/blender.desktop
Normal file
@ -0,0 +1,17 @@
|
||||
[Desktop Entry]
|
||||
Name=Blender 2.91
|
||||
GenericName=3D modeler
|
||||
Comment=3D modeling, animation, rendering and post-production
|
||||
Keywords=3d;cg;modeling;animation;painting;sculpting;texturing;video editing;video tracking;rendering;render engine;cycles;game engine;python;
|
||||
Exec=blender %f
|
||||
Icon=blender
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=3DGraphics;Graphics;
|
||||
MimeType=application/x-blender;
|
||||
Name[en_US.UTF-8]=Blender
|
||||
X-GNOME-FullName[en_US.UTF-8]=Blender
|
||||
Comment[en_US.UTF-8]=3D modeling, animation, rendering and post-production
|
||||
NoDisplay=false
|
||||
Path=
|
||||
X-GNOME-UsesNotifications=false
|
10
desktop-entries/calf.desktop
Normal file
10
desktop-entries/calf.desktop
Normal file
@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Version=1.1
|
||||
Type=Application
|
||||
Name=Calf Plugin Pack for JACK
|
||||
NoDisplay=true
|
||||
Comment=Process and produce sounds using a set of plugins with JACK interface
|
||||
Icon=calf
|
||||
Exec=calfjackhost
|
||||
Actions=
|
||||
Categories=AudioVideo;Music;
|
12
desktop-entries/com.discordapp.Discord.desktop
Normal file
12
desktop-entries/com.discordapp.Discord.desktop
Normal file
@ -0,0 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Version=1.1
|
||||
Type=Application
|
||||
Name=Discord
|
||||
GenericName=Internet Messenger
|
||||
Comment=All-in-one voice and text chat for gamers that's free, secure, and works on both your desktop and phone.
|
||||
Icon=com.discordapp.Discord
|
||||
Exec=discord-launcher
|
||||
Path=/usr/bin
|
||||
Actions=
|
||||
Categories=InstantMessaging;Network;
|
||||
StartupWMClass=discord
|
@ -0,0 +1,17 @@
|
||||
[Desktop Entry]
|
||||
Version=1.1
|
||||
Type=Application
|
||||
Name=Nextcloud Desktop
|
||||
GenericName=Folder Sync
|
||||
NoDisplay=true
|
||||
Comment=Nextcloud desktop synchronization client
|
||||
Icon=Nextcloud
|
||||
Exec=nextcloud
|
||||
Actions=Quit;
|
||||
MimeType=application/vnd.nextcloud;
|
||||
Categories=Utility;X-SuSE-SyncUtility;
|
||||
Keywords=Nextcloud;syncing;file;sharing;
|
||||
|
||||
[Desktop Action Quit]
|
||||
Name=Quit Nextcloud
|
||||
Exec=nextcloud --quit
|
14
desktop-entries/com.spotify.Client.desktop
Normal file
14
desktop-entries/com.spotify.Client.desktop
Normal file
@ -0,0 +1,14 @@
|
||||
[Desktop Entry]
|
||||
Version=1.1
|
||||
Type=Application
|
||||
Name=Spotify
|
||||
GenericName=Online music streaming service
|
||||
Comment=Access all of your favorite music
|
||||
Icon=com.spotify.Client
|
||||
X-GNOME-UsesNotifications=true
|
||||
Exec=spotify-launcher
|
||||
Actions=
|
||||
MimeType=x-scheme-handler/spotify;
|
||||
Categories=Audio;AudioVideo;Music;
|
||||
Keywords=Music;Player;Streaming;Online;
|
||||
StartupWMClass=Spotify
|
14
desktop-entries/emacs.desktop
Normal file
14
desktop-entries/emacs.desktop
Normal file
@ -0,0 +1,14 @@
|
||||
[Desktop Entry]
|
||||
Version=1.1
|
||||
Type=Application
|
||||
Name=Emacs (New Instance)
|
||||
GenericName=Text Editor
|
||||
NoDisplay=true
|
||||
Comment=Edit text
|
||||
Icon=emacs
|
||||
Exec=emacs %F
|
||||
Actions=
|
||||
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
|
||||
Categories=Development;TextEditor;Utility;
|
||||
StartupNotify=true
|
||||
StartupWMClass=Emacs
|
22
desktop-entries/emacsclient.desktop
Normal file
22
desktop-entries/emacsclient.desktop
Normal file
@ -0,0 +1,22 @@
|
||||
[Desktop Entry]
|
||||
Version=1.1
|
||||
Type=Application
|
||||
Name=Emacs
|
||||
GenericName=Text Editor
|
||||
Comment=Edit text
|
||||
Icon=emacs
|
||||
Exec=emacsclient -cn %F
|
||||
Actions=new-window;new-instance;
|
||||
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
|
||||
Categories=Development;TextEditor;Utility;
|
||||
Keywords=emacsclient;
|
||||
StartupNotify=true
|
||||
StartupWMClass=Emacs
|
||||
|
||||
[Desktop Action new-window]
|
||||
Name=New Window
|
||||
Exec=emacsclient -cn %F
|
||||
|
||||
[Desktop Action new-instance]
|
||||
Name=New Instance
|
||||
Exec=emacs %F
|
11
desktop-entries/fish.desktop
Normal file
11
desktop-entries/fish.desktop
Normal file
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Version=1.1
|
||||
Type=Application
|
||||
Name=fish
|
||||
GenericName=Command-line interpreter
|
||||
NoDisplay=true
|
||||
Icon=fish
|
||||
Exec=fish
|
||||
Terminal=true
|
||||
Actions=
|
||||
Categories=ConsoleOnly;System;System-Tools;TerminalEmulator;
|
13
desktop-entries/org.gnome.PowerStats.desktop
Normal file
13
desktop-entries/org.gnome.PowerStats.desktop
Normal file
@ -0,0 +1,13 @@
|
||||
[Desktop Entry]
|
||||
Version=1.1
|
||||
Type=Application
|
||||
Name=Power Statistics
|
||||
NoDisplay=true
|
||||
Comment=Observe power management
|
||||
Icon=org.gnome.PowerStats
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
Exec=gnome-power-statistics
|
||||
Actions=
|
||||
Categories=GNOME;GTK;Monitor;System;System-Tools;
|
||||
Keywords=battery;consumption;charge;
|
||||
StartupNotify=true
|
13
desktop-entries/org.gnome.Weather.desktop
Normal file
13
desktop-entries/org.gnome.Weather.desktop
Normal file
@ -0,0 +1,13 @@
|
||||
[Desktop Entry]
|
||||
Version=1.1
|
||||
Type=Application
|
||||
Name=Weather
|
||||
NoDisplay=true
|
||||
Comment=Show weather conditions and forecast
|
||||
Icon=org.gnome.Weather
|
||||
DBusActivatable=true
|
||||
Exec=gapplication launch org.gnome.Weather
|
||||
Actions=
|
||||
Categories=Core;GNOME;GTK;Utility;X-SuSE-DesktopUtility;
|
||||
Keywords=Weather;Forecast;
|
||||
StartupNotify=true
|
9
desktop-entries/uefi-firmware-settings.desktop
Normal file
9
desktop-entries/uefi-firmware-settings.desktop
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Version=1.1
|
||||
Type=Application
|
||||
Name=UEFI Setup
|
||||
Comment=Reboot to UEFI setup
|
||||
Icon=mx-boot-options
|
||||
Exec=reboot-uefi
|
||||
Actions=
|
||||
Categories=Utility;
|
9
desktop-entries/windows.desktop
Normal file
9
desktop-entries/windows.desktop
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Version=1.1
|
||||
Type=Application
|
||||
Name=Windows
|
||||
Comment=Reboot to Microsoft Windows
|
||||
Icon=windows95
|
||||
Exec=reboot-windows
|
||||
Actions=
|
||||
Categories=Utility;
|
14
desktop-entries/yelp.desktop
Normal file
14
desktop-entries/yelp.desktop
Normal file
@ -0,0 +1,14 @@
|
||||
[Desktop Entry]
|
||||
Version=1.1
|
||||
Type=Application
|
||||
Name=Help
|
||||
NoDisplay=true
|
||||
Comment=Get help with GNOME
|
||||
Icon=org.gnome.Yelp
|
||||
OnlyShowIn=GNOME;Unity;
|
||||
Exec=yelp %u
|
||||
Actions=
|
||||
MimeType=x-scheme-handler/ghelp;x-scheme-handler/help;x-scheme-handler/info;x-scheme-handler/man;
|
||||
Categories=Core;Documentation;GNOME;GTK;Utility;
|
||||
Keywords=documentation;information;manual;help;
|
||||
StartupNotify=true
|
488
opensuse-personalizer.sh
Normal file
488
opensuse-personalizer.sh
Normal file
@ -0,0 +1,488 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# opensuse-personalizer.sh
|
||||
# Interactive post-install setup script for OpenSUSE installations
|
||||
#
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Constants
|
||||
#
|
||||
################################################################################
|
||||
|
||||
########################################
|
||||
# Zypper packages
|
||||
|
||||
# To remove
|
||||
RM= \
|
||||
libreoffice gedit
|
||||
|
||||
# To remove (and prevent reinstallation of)
|
||||
AL= \
|
||||
gnome-clocks gnome-packagekit gnome-software tigervnc vlc-noX xterm yast2
|
||||
|
||||
# To install
|
||||
IN= \
|
||||
# (Necessary packages) \
|
||||
wget nano git-core flatpak opi \
|
||||
\
|
||||
# (Theming) \
|
||||
papirus-icon-theme fira-code-fonts \
|
||||
\
|
||||
# (Shell utilities) \
|
||||
fish fzf fortune toilet cowsay \
|
||||
\
|
||||
# (Programs) \
|
||||
emacs inkscape gimp shotcut audacity geary nextcloud-desktop steam blender \
|
||||
\
|
||||
# (GNOME utilities) \
|
||||
gnome-session-wayland gnome-characters gnome-disk-utility gnome-font-viewer gnome-dictionary gnome-logs gnome-screenshot gnome-text-editor gnome-weather gnome-tweaks eog dconf-editor baobab totem menulibre Fragments \
|
||||
\
|
||||
# (Misc.) \
|
||||
distribution-logos-openSUSE distribution-logos-openSUSE-icons distribution-logos-openSUSE-Tumbleweed
|
||||
|
||||
########################################
|
||||
# Flatpak packages
|
||||
|
||||
# To install
|
||||
FLATPAK_PACKAGES= \
|
||||
com.discordapp.Discord \
|
||||
com.spotify.Client \
|
||||
com.github.tchx84.Flatseal \
|
||||
org.nickvision.Tagger
|
||||
|
||||
########################################
|
||||
# GNOME extensions
|
||||
|
||||
GNOME_EXTENSIONS= \
|
||||
AlphabeticalAppGrid@stuarthayhurst \
|
||||
color-picker@tuberry \
|
||||
places-menu@gnome-shell-extensions.gcampax.github.com
|
||||
|
||||
########################################
|
||||
# Directories
|
||||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
TMP_WORKDIR="/tmp/opensuse-setup-script-workdir/"
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Pre-setup prompts
|
||||
#
|
||||
################################################################################
|
||||
|
||||
########################################
|
||||
# Pre-setup
|
||||
|
||||
# Ensure we're not running as root
|
||||
if [ "$EUID" == 0 ]; then
|
||||
echo "DO NOT RUN THIS SCRIPT AS ROOT!"
|
||||
echo "Please run this script as a regular user."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure zenity is installed
|
||||
echo "Ensuring zenity is installed..."
|
||||
sudo zypper --non-interactive in zenity
|
||||
|
||||
########################################
|
||||
# Prompt for system chassis
|
||||
|
||||
system_chassis=$(hostnamectl chassis)
|
||||
|
||||
function string_eq ()
|
||||
{
|
||||
[[ "${1}" == "${2}" ]] && echo TRUE || echo FALSE
|
||||
}
|
||||
|
||||
function prompt_chassis_type ()
|
||||
{
|
||||
|
||||
entry=$(zenity --title="Chassis Type" --list --radiolist --width=200 --height=400 \
|
||||
--text="Confirm the chassis type for this system:\n" \
|
||||
--column="Selected" --column="Chassis Type" \
|
||||
$(string_eq "${system_chassis}" "desktop") "Desktop" \
|
||||
$(string_eq "${system_chassis}" "laptop") "Laptop" \
|
||||
$(string_eq "${system_chassis}" "tablet") "Tablet" \
|
||||
$(string_eq "${system_chassis}" "convertible") "Convertible")
|
||||
|
||||
# Ensure entry is lowercase
|
||||
entry=${entry,,}
|
||||
|
||||
|
||||
case "${entry}" in
|
||||
"desktop"|"laptop"|"convertible"|"tablet")
|
||||
if
|
||||
zenity --question --title="Chassis Type" --text="Use ${entry} as chassis type?" --default-cancel --no-wrap
|
||||
then
|
||||
system_chassis="${entry}"
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
zenity --warning --title="Chassis Type" --text="Please choose a chassis type for this system." --no-wrap
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
}
|
||||
|
||||
# Repeatedly show the prompt until we receive valid input
|
||||
until prompt_chassis_type; do : ; done
|
||||
|
||||
# Set chassis type
|
||||
echo "Setting chassis type to ${system_chassis}"
|
||||
sudo hostnamectl chassis "${system_chassis}"
|
||||
|
||||
########################################
|
||||
# Prompt for system name
|
||||
|
||||
system_name="mycomputer"
|
||||
|
||||
function prompt_system_name ()
|
||||
{
|
||||
|
||||
entry=$(zenity --entry --title="System Name" --text="All lowercase letters, no spaces or symbols:" --entry-text="${system_name}")
|
||||
|
||||
# Filter all non-letter characters out of the user's entry
|
||||
entry=${entry//[^[:alpha:]]/}
|
||||
|
||||
# Ensure entry is lowercase
|
||||
entry=${entry,,}
|
||||
|
||||
case "${entry}" in
|
||||
"mycomputer")
|
||||
zenity --warning --title="System Name" --text="Please enter a name for this system." --no-wrap
|
||||
return 1
|
||||
;;
|
||||
"")
|
||||
zenity --warning --title="System Name" --text="Please enter a name for this system." --no-wrap
|
||||
return 1
|
||||
;;
|
||||
*)
|
||||
if
|
||||
zenity --question --title="System Name" --text="Use ${entry} as system name?" --default-cancel --no-wrap
|
||||
then
|
||||
system_name="${entry}"
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
}
|
||||
|
||||
# Repeatedly show the prompt until we receive valid input
|
||||
until prompt_system_name; do : ; done
|
||||
|
||||
# Set hostname and pretty hostname
|
||||
echo "Setting hostname to ${system_name}..."
|
||||
sudo hostnamectl hostname "${system_name}"
|
||||
echo "Setting pretty hostname to ${system_name^}"
|
||||
sudo hostnamectl hostname --pretty "${system_name^}"
|
||||
|
||||
########################################
|
||||
# Prompt for optional additions
|
||||
|
||||
optional_additions=""
|
||||
|
||||
function prompt_optional_additions ()
|
||||
{
|
||||
|
||||
ENTRY=$(zenity --title="Optional Additions" --list --checklist --width=600 --height=440 \
|
||||
--text="Select any additional configuration changes that you would like applied to the system:\n" \
|
||||
--column="Apply" --column="Title" --column="Description" \
|
||||
FALSE "Xournal++" "Install Xournal++ for taking handwritten notes" \
|
||||
FALSE "EasyEffects" "Install EasyEffects for applying effects (e.g. equalizers) to system audio devices" \
|
||||
FALSE "Media Control Key Shortcuts" "Set up media control keyboard shortcuts (for keyboards without dedicated media control keys)" \
|
||||
FALSE "Touchpad Lock Toggle Shortcut" "Set up a touchpad lock toggle keyboard shortcut (for systems with touchpads)" \
|
||||
FALSE "Power Button Screen Lock Override" "Override the power button's default behavior with a screen lock shortcut (for tablets or convertibles)" \
|
||||
FALSE '"Reboot to Windows" Launcher' "Install a desktop entry that reboots the system to Microsoft Windows (for systems that multi-boot with Windows)")
|
||||
|
||||
case "${ENTRY}" in
|
||||
"")
|
||||
if
|
||||
zenity --question --title="Optional Additions" --text="Apply only baseline system configuration?" --default-cancel --no-wrap
|
||||
then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if
|
||||
ADDITIONS_LIST=$(echo " • ${ENTRY}" | sed "s/|/\n • /g")
|
||||
zenity --question --title="Optional Additions" --text="Confirm your selection of the following additions:\n${ADDITIONS_LIST}" --default-cancel --no-wrap
|
||||
then
|
||||
optional_additions="${ENTRY}"
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Repeatedly show the prompt until we receive valid input
|
||||
until prompt_optional_additions; do : ; done
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Package setup
|
||||
#
|
||||
################################################################################
|
||||
|
||||
########################################
|
||||
# Package operations
|
||||
|
||||
echo "Setting up packages..."
|
||||
sudo zypper --non-interactive rm ${RM} ${AL}
|
||||
sudo zypper --non-interactive al ${AL}
|
||||
sudo zypper --non-interactive in ${IN}
|
||||
|
||||
########################################
|
||||
# Flatpak operations
|
||||
|
||||
echo "Setting up Flatpak remotes..."
|
||||
FLATHUB_REMOTE=https://flathub.org/repo/flathub.flatpakrepo
|
||||
sudo flatpak remote-add --if-not-exists flathub "${FLATHUB_REMOTE}"
|
||||
|
||||
echo "Setting up Flatpak packages..."
|
||||
sudo flatpak install --noninteractive ${FLATPAK_PACKAGES}
|
||||
|
||||
########################################
|
||||
# Codec installation
|
||||
|
||||
echo "Setting up codecs..."
|
||||
opi codecs
|
||||
|
||||
########################################
|
||||
# (OPTIONAL) Extra packages
|
||||
|
||||
if [[ "${optional_additions}" == *"Xournal++"* ]]; then
|
||||
echo "Installing Xournal++..."
|
||||
sudo zypper al texlive
|
||||
sudo zypper in xournalpp
|
||||
fi
|
||||
|
||||
if [[ "${optional_additions}" == *"EasyEffects"* ]]; then
|
||||
echo "Installing EasyEffects..."
|
||||
sudo zypper in easyeffects
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# System configuration
|
||||
#
|
||||
################################################################################
|
||||
|
||||
########################################
|
||||
# GRUB configuration
|
||||
|
||||
# Silence GRUB
|
||||
echo "Configuring GRUB..."
|
||||
echo "# Automatically added by personal-opensuse-setup.sh
|
||||
GRUB_TIMEOUT=0
|
||||
GRUB_HIDDEN_TIMEOUT=0
|
||||
GRUB_QUIET=true
|
||||
GRUB_HIDDEN_TIMEOUT_QUIET=true" | sudo tee --append /etc/default/grub
|
||||
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
|
||||
########################################
|
||||
# PolicyKit configuration
|
||||
|
||||
# Create a local policy that unlocks basic networking settings for users
|
||||
echo "Configuring PolicyKit..."
|
||||
sudo mkdir -p /etc/polkit/localauthority/50-local.d/
|
||||
echo "[Allow users to modify system network settings]
|
||||
Identity=unix-group:users
|
||||
Action=org.freedesktop.NetworkManager.settings.modify.system
|
||||
ResultAny=auth_admin_keep
|
||||
ResultInactive=auth_admin_keep
|
||||
ResultActive=yes" | sudo tee /etc/polkit/localauthority/50-local.d/10-NetworkManager.pkla
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# GNOME keyboard shortcuts
|
||||
#
|
||||
################################################################################
|
||||
|
||||
echo "Configuring GNOME keyboard shortcuts..."
|
||||
|
||||
########################################
|
||||
# Navigation
|
||||
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['<Primary><Super>Left']"
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['<Primary><Super>Right']"
|
||||
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-left "['<Primary><Shift><Super>Left']"
|
||||
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-left "['<Primary><Shift><Super>Right']"
|
||||
|
||||
# Swap "switch applications" (grouped alt+tab) for "switch windows" (non-grouped alt+tab) shortcuts
|
||||
gsettings set org.gnome.shell.window-switcher current-workspace-only false
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-windows $(gsettings get org.gnome.desktop.wm.keybindings switch-applications)
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward $(gsettings get org.gnome.desktop.wm.keybindings switch-applications-backward)
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-applications []
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward []
|
||||
|
||||
########################################
|
||||
# (OPTIONAL) Media
|
||||
|
||||
if [[ "${optional_additions}" == *"Media Control Key Shortcuts"* ]]; then
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys mic-mute "['<Super>Home']"
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys next "['<Control><Super>Page_Down']"
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys previous "['<Control><Super>Page_Up']"
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys volume-down "['<Super>Page_Down']"
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys volume-mute "['<Super>End']"
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys volume-up "['<Super>Page_Up']"
|
||||
fi
|
||||
|
||||
########################################
|
||||
# Windows
|
||||
|
||||
gsettings set org.gnome.desktop.wm.keybindings close "['<Super>w']"
|
||||
gsettings set org.gnome.desktop.wm.keybindings toggle-fullscreen "['<Super>f']"
|
||||
|
||||
########################################
|
||||
# Custom shortcuts
|
||||
|
||||
# Helper function (because gsettings doesn't make this simple)
|
||||
function add_custom_gnome_keybinding ()
|
||||
{
|
||||
EXISTING_KEYBINDINGS=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
|
||||
KEYBINDING_INDEX=$(expr $(echo $EXISTING_KEYBINDINGS | grep -oE '[0-9]+' | sort -n | tail -n 1) + 1)
|
||||
KEYBINDING_PATH=/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom${KEYBINDING_INDEX}/
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$(echo ${EXISTING_KEYBINDINGS} | sed s/.$//), '${KEYBINDING_PATH}']"
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:${KEYBINDING_PATH} name "${1}"
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:${KEYBINDING_PATH} command "${2}"
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:${KEYBINDING_PATH} binding "${3}"
|
||||
}
|
||||
|
||||
# Add custom shortcuts
|
||||
add_custom_gnome_keybinding "Launch Terminal" "gnome-terminal" "<Super>Return"
|
||||
add_custom_gnome_keybinding "Toggle Night Light" "gnome-toggle-night-light" "<Alt><Super>n"
|
||||
|
||||
# (OPTIONAL) Add custom shortcuts
|
||||
if [[ "${optional_additions}" == *"Touchpad Lock Toggle Shortcut"* ]]; then
|
||||
add_custom_gnome_keybinding "Toggle Touchpad Lock" "gnome-toggle-touchpad-lock" "<Alt><Super>t"
|
||||
fi
|
||||
if [[ "${optional_additions}" == *"Power Button Screen Lock Override"* ]]; then
|
||||
add_custom_gnome_keybinding "Lock Screen" "gdm-lock-screen" "PowerOff"
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# GNOME appearance configuration
|
||||
#
|
||||
################################################################################
|
||||
|
||||
echo "Configuring GNOME appearance settings..."
|
||||
|
||||
gsettings set org.gnome.desktop.interface icon-theme "Papirus"
|
||||
gsettings set org.gnome.desktop.interface clock-format '24h'
|
||||
gsettings set org.gnome.desktop.interface clock-show-date false
|
||||
gsettings set org.gnome.desktop.interface clock-show-weekday false
|
||||
gsettings set org.gnome.desktop.interface font-antialiasing "rgba"
|
||||
gsettings set org.gnome.desktop.interface font-name "Cantarell 10"
|
||||
gsettings set org.gnome.desktop.interface document-font-name "Cantarell 10"
|
||||
gsettings set org.gnome.desktop.interface monospace-font-name "Fira Code 10"
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# GNOME app folder configuration
|
||||
#
|
||||
################################################################################
|
||||
|
||||
echo "Configuring GNOME app folders..."
|
||||
|
||||
########################################
|
||||
# Utilities folder
|
||||
|
||||
UTILITIES_FOLDER_PATH=/org/gnome/desktop/app-folders/folders/Utilities/
|
||||
gsettings set org.gnome.desktop.app-folders folder-children "['Utilities']"
|
||||
gsettings set org.gnome.desktop.app-folders.folder:${UTILITIES_FOLDER_PATH} name "X-GNOME-Utilities.directory"
|
||||
gsettings set org.gnome.desktop.app-folders.folder:${UTILITIES_FOLDER_PATH} translate true
|
||||
gsettings set org.gnome.desktop.app-folders.folder:${UTILITIES_FOLDER_PATH} apps "['org.gnome.FileRoller.desktop', 'org.gnome.Characters.desktop', 'ca.desrt.dconf-editor.desktop', 'org.gnome.Dictionary.desktop', 'org.gnome.baobab.desktop', 'org.gnome.DiskUtility.desktop', 'org.gnome.Evince.desktop', 'com.github.wwmm.easyeffects.desktop', 'org.gnome.Extensions.desktop', 'com.github.tchx84.Flatseal.desktop', 'org.gnome.font-viewer.desktop', 'de.haeckerfelix.Fragments.desktop', 'org.gnome.eog.desktop', 'org.gnome.Logs.desktop', 'menulibre.desktop', 'org.gnome.Screenshot.desktop', 'gnome-system-monitor.desktop', 'org.nickvision.tagger.desktop', 'org.gnome.tweaks.desktop', 'uefi-firmware-settings.desktop', 'org.gnome.Totem.desktop']"
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# GNOME extension setup
|
||||
#
|
||||
################################################################################
|
||||
|
||||
echo "Setting up GNOME extensions..."
|
||||
|
||||
for EXTENSION in "${GNOME_EXTENSIONS}"; do
|
||||
busctl --user call org.gnome.Shell.Extensions /org/gnome/Shell/Extensions org.gnome.Shell.Extensions InstallRemoteExtension s ${EXTENSION}
|
||||
done
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Personal configuration files and scripts
|
||||
#
|
||||
################################################################################
|
||||
|
||||
########################################
|
||||
# Emacs
|
||||
|
||||
echo "Downloading Emacs configuration..."
|
||||
wget https://jessieh.net/emacs -O ${HOME}/.config/emacs/init.el
|
||||
|
||||
########################################
|
||||
# Fish
|
||||
|
||||
echo "Downloading Fish configuration..."
|
||||
wget https://jessieh.net/fish -O ${HOME}/.config/fish/config.fish
|
||||
|
||||
echo "Setting default shell to Fish..."
|
||||
chsh -s $(which fish)
|
||||
|
||||
########################################
|
||||
# Utility scripts
|
||||
|
||||
echo "Installing scripts..."
|
||||
|
||||
if [[ "${optional_additions}" != *'"Reboot to Windows" Launcher'* ]]; then
|
||||
rm ${SCRIPT_DIR}/scripts/reboot-windows
|
||||
fi
|
||||
|
||||
chmod +x ${SCRIPT_DIR}/scripts/*
|
||||
sudo cp ${SCRIPT_DIR}/scripts/* /usr/bin
|
||||
|
||||
########################################
|
||||
# Desktop entries
|
||||
|
||||
echo "Installing desktop entries..."
|
||||
|
||||
if [[ "${optional_additions}" != *'"Reboot to Windows" Launcher'* ]]; then
|
||||
rm ${SCRIPT_DIR}/desktop_entries/windows.desktop
|
||||
fi
|
||||
|
||||
mkdir -p ${HOME}/.local/share/applications/
|
||||
cp ${SCRIPT_DIR}/desktop-entries/* ${HOME}/.local/share/applications/
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Post-setup suggestions
|
||||
#
|
||||
################################################################################
|
||||
|
||||
echo
|
||||
echo "Personalization complete!"
|
||||
echo
|
||||
echo "Recommended next steps:"
|
||||
echo " • Log in to Firefox Sync"
|
||||
echo " • Configure Nextcloud client"
|
||||
if [[ "${optional_additions}" == *"EasyEffects"* ]]; then
|
||||
echo " • Install an audio device profile from"
|
||||
echo " https://autoeq.app"
|
||||
fi
|
||||
echo " • Install a Wireguard VPN profile from"
|
||||
echo " https://mullvad.net/en/account/#/wireguard-config/?platform=linux"
|
||||
echo " • Configure display settings and run 'gdm-update-display-settings'"
|
||||
echo " • Run 'themer' to install/update unofficial libadwaita themes"
|
20
scripts/discord-launcher
Normal file
20
scripts/discord-launcher
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# discord-launcher
|
||||
# Launches discord and forces it to use the correct (dark) GTK theme variant
|
||||
#
|
||||
################################################################################
|
||||
|
||||
export GTK_THEME=:dark
|
||||
export GTK_THEME_VARIANT="dark"
|
||||
|
||||
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=discord com.discordapp.Discord &
|
||||
|
||||
# This is dumb, but it works...
|
||||
for i in {1..11}
|
||||
do
|
||||
xprop -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT dark -id $(wmctrl -lp | grep Discord | cut -d ' ' -f1)
|
||||
sleep 1
|
||||
done
|
10
scripts/gdm-lock-screen
Normal file
10
scripts/gdm-lock-screen
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# gdm-lock-screen
|
||||
# Instructs GDM to lock the screen via D-Bus
|
||||
#
|
||||
################################################################################
|
||||
|
||||
dbus-send --type=method_call --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock
|
10
scripts/gdm-update-display-settings
Normal file
10
scripts/gdm-update-display-settings
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# gdm-update-display-settings
|
||||
# Copies user's current display settings to GDM's config folder
|
||||
#
|
||||
################################################################################
|
||||
|
||||
sudo cp .config/monitors.xml /var/lib/gdm/.config/ && echo "Copied .config/monitors.xml to /var/lib/gdm/.config"
|
42
scripts/gnome-toggle-night-light
Normal file
42
scripts/gnome-toggle-night-light
Normal file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# gnome-toggle-night-light
|
||||
# Requires notify-send to be installed
|
||||
#
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# User configuration
|
||||
################################################################################
|
||||
|
||||
title="Night Light"
|
||||
body_enabled="Night light has been enabled."
|
||||
body_disabled="Night light has been disabled."
|
||||
icon_enabled="night-light"
|
||||
icon_disabled="night-light-disabled"
|
||||
key="org.gnome.settings-daemon.plugins.color night-light-enabled"
|
||||
|
||||
################################################################################
|
||||
# gnome-toggle code
|
||||
################################################################################
|
||||
|
||||
value=$(gsettings get $key)
|
||||
|
||||
notif_id_file_name=/tmp/tmp.$(echo $key | tr -d ' ').nid
|
||||
{ prev_notif_id=$(<$notif_id_file_name); } 2> /dev/null
|
||||
|
||||
replace_flag=""
|
||||
case $prev_notif_id in
|
||||
''|*[!0-9]*) ;;
|
||||
*) replace_flag="--replace-id=$prev_notif_id" ;;
|
||||
esac
|
||||
|
||||
if [[ $value == "true" ]]; then
|
||||
gsettings set $key false
|
||||
notify-send "$title Disabled" "$body_disabled" --icon $icon_disabled $replace_flag --transient --expire-time=0 --print-id > $notif_id_file_name
|
||||
else
|
||||
gsettings set $key true
|
||||
notify-send "$title Enabled" "$body_enabled" --icon $icon_enabled $replace_flag --transient --expire-time=0 --print-id > $notif_id_file_name
|
||||
fi
|
42
scripts/gnome-toggle-touchpad-lock
Normal file
42
scripts/gnome-toggle-touchpad-lock
Normal file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# gnome-toggle-touchpad-lock
|
||||
# Requires notify-send to be installed
|
||||
#
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# User configuration
|
||||
################################################################################
|
||||
|
||||
title="Touchpad Lock"
|
||||
body_enabled="Touchpad will be locked while typing."
|
||||
body_disabled="Touchpad will be unlocked while typing."
|
||||
icon_enabled="touchpad-disabled"
|
||||
icon_disabled="input-touchpad"
|
||||
key="org.gnome.desktop.peripherals.touchpad disable-while-typing"
|
||||
|
||||
################################################################################
|
||||
# gnome-toggle code
|
||||
################################################################################
|
||||
|
||||
value=$(gsettings get $key)
|
||||
|
||||
notif_id_file_name=/tmp/tmp.$(echo $key | tr -d ' ').nid
|
||||
{ prev_notif_id=$(<$notif_id_file_name); } 2> /dev/null
|
||||
|
||||
replace_flag=""
|
||||
case $prev_notif_id in
|
||||
''|*[!0-9]*) ;;
|
||||
*) replace_flag="--replace-id=$prev_notif_id" ;;
|
||||
esac
|
||||
|
||||
if [[ $value == "true" ]]; then
|
||||
gsettings set $key false
|
||||
notify-send "$title Disabled" "$body_disabled" --icon $icon_disabled $replace_flag --transient --expire-time=0 --print-id > $notif_id_file_name
|
||||
else
|
||||
gsettings set $key true
|
||||
notify-send "$title Enabled" "$body_enabled" --icon $icon_enabled $replace_flag --transient --expire-time=0 --print-id > $notif_id_file_name
|
||||
fi
|
17
scripts/reboot-uefi
Normal file
17
scripts/reboot-uefi
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# reboot-uefi
|
||||
# Prompts the user to reboot to system firmware (UEFI) setup
|
||||
#
|
||||
################################################################################
|
||||
|
||||
########################################
|
||||
# Prompt user and execute reboot seq.
|
||||
########################################
|
||||
|
||||
if zenity --question --icon device_pci --text="Reboot to UEFI setup?" --title "UEFI Setup" --default-cancel --no-wrap --timeout=10
|
||||
then
|
||||
pkexec systemctl reboot --firmware-setup
|
||||
fi
|
37
scripts/reboot-windows
Normal file
37
scripts/reboot-windows
Normal file
@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# reboot-windows
|
||||
# Finds and flags a Windows menuentry in GRUB, and then reboots the system
|
||||
#
|
||||
################################################################################
|
||||
|
||||
########################################
|
||||
# Reboot command
|
||||
########################################
|
||||
|
||||
REBOOT_CMD=$(cat <<EOF
|
||||
|
||||
# Find the exact name of the first Windows menuentry in grub.cfg
|
||||
WINDOWS_ENTRY=\$(sudo grep menuentry /boot/grub2/grub.cfg | grep -Po "'.*Windows.*?'" | grep -o "[^'].*[^']")
|
||||
|
||||
# Set next_entry in grubenv to the Windows menuentry
|
||||
sudo grub2-reboot "\$WINDOWS_ENTRY";
|
||||
|
||||
# Copy grubenv to the OpenSUSE grub EFI folder (/boot/grub2/ is not visible on UEFI installs)
|
||||
sudo cp /boot/grub2/grubenv /boot/efi/EFI/opensuse/grubenv
|
||||
|
||||
# Reboot!
|
||||
sudo reboot;
|
||||
EOF
|
||||
)
|
||||
|
||||
########################################
|
||||
# Prompt user and execute reboot seq.
|
||||
########################################
|
||||
|
||||
if zenity --question --icon distributor-logo-windows --text="Reboot to Microsoft Windows?" --title "Windows" --default-cancel --no-wrap --timeout=10
|
||||
then
|
||||
pkexec --disable-internal-agent bash -c "$REBOOT_CMD"
|
||||
fi
|
20
scripts/spotify-launcher
Normal file
20
scripts/spotify-launcher
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# spotify-launcher
|
||||
# Launches spotify and forces it to use the correct (dark) GTK theme variant
|
||||
#
|
||||
################################################################################
|
||||
|
||||
export GTK_THEME=:dark
|
||||
export GTK_THEME_VARIANT="dark"
|
||||
|
||||
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=spotify --file-forwarding com.spotify.Client @@u %U @@ &
|
||||
|
||||
# This is dumb, but it works...
|
||||
for i in {1..11}
|
||||
do
|
||||
xprop -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT dark -id $(wmctrl -lp | grep Spotify | cut -d ' ' -f1)
|
||||
sleep 1
|
||||
done
|
59
scripts/themer
Executable file
59
scripts/themer
Executable file
@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# themer
|
||||
# Installs/updates unofficial libadwaita themes for various programs
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# TODO: Tidy this up
|
||||
|
||||
########################################
|
||||
# Install adw-gtk3 for legacy GTK3 applications
|
||||
|
||||
echo "Installing adw-gtk3 theme for GTK3 applications..."
|
||||
|
||||
# Download and install adw-gtk3
|
||||
cd /tmp/
|
||||
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/lassekongo83/adw-gtk3/releases/latest | grep browser_download_url | cut -d '"' -f 4)
|
||||
wget "${DOWNLOAD_URL}"
|
||||
tar xf *.tar* -C ${HOME}/.local/share/themes/
|
||||
|
||||
# Install adw-gtk3 for Flatpak applications
|
||||
sudo flatpak install --noninteractive org.gtk.Gtk3theme.adw-gtk3 org.gtk.Gtk3theme.adw-gtk3-dark
|
||||
|
||||
# Apply adw-gtk3 theme to legacy applications
|
||||
gsettings set org.gnome.desktop.interface gtk-theme "adw-gtk3"
|
||||
|
||||
# Ensure GTK2 applications still use regular Adwaita
|
||||
echo 'include "/usr/share/themes/Adwaita/gtk-2.0/gtkrc"' > ${HOME}/.gtkrc-2.0
|
||||
|
||||
########################################
|
||||
# Install Adwaita theme for Firefox
|
||||
|
||||
echo "Installing Adwaita theme for Firefox..."
|
||||
curl -s -o- https://raw.githubusercontent.com/rafaelmardojai/firefox-gnome-theme/master/scripts/install-by-curl.sh | bash
|
||||
|
||||
# Set user flags for theme
|
||||
echo "Configuring Adwaita theme for Firefox..."
|
||||
function set_ff_flag ()
|
||||
{
|
||||
USER_JS_FILE=${HOME}/.mozilla/firefox/*.default-release/user.js
|
||||
sed -i 's/user_pref("'${1}'",.*);/user_pref("'${1}'",'${2}');/' $USER_JS_FILE
|
||||
grep -q ${1} $USER_JS_FILE || echo "user_pref(\"$1\",$2);" >> $USER_JS_FILE
|
||||
}
|
||||
set_ff_flag gnomeTheme.dragWindowHeaderbarButtons true
|
||||
set_ff_flag gnomeTheme.bookmarksToolbarUnderTabs true
|
||||
set_ff_flag gnomeTheme.hideSingleTab true
|
||||
set_ff_flag gnomeTheme.hideUnifiedExtensions true
|
||||
|
||||
########################################
|
||||
# Install Adwaita theme for Steam
|
||||
|
||||
echo "Installing Adwaita theme for Steam..."
|
||||
cd /tmp/
|
||||
git clone https://github.com/tkashkin/Adwaita-for-Steam
|
||||
cd Adwaita-for-Steam
|
||||
./install.py
|
||||
cd /tmp/
|
Loading…
Reference in New Issue
Block a user