Echo Workshop

AboutEchoes

openSUSE Tumbleweed

My distro of choice is openSUSE Tumbleweed.
If you're curious about why I picked this distro, you can read about it on the Linux page.

While I enjoy using openSUSE, it's far from perfect!
But with a few minor tweaks, I think it's a solid choice.

This script does most of the tweaks for me and may not be very useful to others.
(it will overwrite your settings!)
However, feel free to take parts of it if you'd like!

#!/bin/bash
# -*- Mode: sh; coding: utf-8; indent-tabs-mode: t; tab-width: 4 -*-

## Hezkore's openSUSE tweak script

## NVIDIA drivers
# "Back in the day" this was a bit tricky
# But I think this works now...
sudo zypper install openSUSE-repos-Tumbleweed-NVIDIA
sudo zypper install-new-recommends --repo repo-non-free

# NVIDIA Settings
# Even tough it's not very good... protip: never use it to adjust the resolution
sudo zypper install nvidia-utils*

# sudo reboot now
# After the reboot, check the NVIDIA Settings to make sure it detected your card

## Media Codecs
# These just magically worked for me... I'll have to investigate this at some point
# Here's a test video:
# https://avtshare01.rz.tu-ilmenau.de/avt-vqdb-uhd-1/test_1/segments/bigbuck_bunny_8bit_200kbps_360p_60.0fps_h264.mp4

## Language, Time & Date
# Sets system to English, currency, dates etc. to Swedish
su -c 'echo -ne "LANG=en_US.UTF-8\nLANGUAGE=en_US:en\nLC_CTYPE=\"en_US.UTF-8\"\nLC_NUMERIC=sv_SE.UTF-8\nLC_TIME=sv_SE.UTF-8\nLC_COLLATE=\"en_US.UTF-8\"\nLC_MONETARY=sv_SE.UTF-8\nLC_MESSAGES=en_US.UTF-8\nLC_PAPER=sv_SE.UTF-8\nLC_NAME=sv_SE.UTF-8\nLC_ADDRESS=sv_SE.UTF-8\nLC_TELEPHONE=sv_SE.UTF-8\nLC_MEASUREMENT=sv_SE.UTF-8\nLC_IDENTIFICATION=sv_SE.UTF-8\nLC_ALL=" > /etc/locale.conf'

# sudo reboot now

## Set hostname
# I don't understand why this isn't asked during the installation, but oh well
echo -n "Enter the hostname: "; read PICKED_HOSTNAME
sudo hostnamectl set-hostname $PICKED_HOSTNAME

# Surprisingly, this change will mess up a bunch of things until you reboot
# sudo reboot now

## Theming
I'm not a huge fan of [Dracula](https://draculatheme.com/), but I do like that it's pretty consistent

# Desktop
# This theme covers most desktops
sudo git clone https://github.com/dracula/gtk.git /usr/share/themes/Dracula

# Force dark mode in GNOME
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'

# Icons
git clone https://github.com/vinceliuice/vimix-icon-theme.git ~/vimix && cd ~/vimix && sudo ./install.sh -a && rm -rf ~/vimix`

# Fonts
sudo zypper install font-manager && sudo zypper remove gnome-font-viewer

# Nerd fonts

# Hack
curl -fLo font.tar.xz \
https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Hack.tar.xz && \
sudo mkdir -p /usr/share/fonts/Hack && sudo tar -xf font.tar.xz -C /usr/share/fonts/Hack && \
rm -f font.tar.xz`

# Segoe UI
curl -fLo font.zip \
https://aka.ms/SegoeUIVariable && \
sudo mkdir -p /usr/share/fonts/SegoeUI && sudo unzip -o font.zip -d /usr/share/fonts/SegoeUI && \
rm -f font.zip

# FiraCode
curl -fLo font.tar.xz \
https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FiraCode.tar.xz && \
sudo mkdir -p /usr/share/fonts/FiraCode && sudo tar -xf font.tar.xz -C /usr/share/fonts/FiraCode && \
rm -f font.tar.xz

# Cascadia Cove/Code
curl -fLo font.tar.xz \
https://github.com/ryanoasis/nerd-fonts/releases/latest/download/CascadiaCode.tar.xz && \
sudo mkdir -p /usr/share/fonts/CascadiaCove && sudo tar -xf font.tar.xz -C /usr/share/fonts/CascadiaCove && \
rm -f font.tar.xz

# JetBrainsMono
curl -fLo font.tar.xz \
https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz && \
sudo mkdir -p /usr/share/fonts/JetBrainsMono && sudo tar -xf font.tar.xz -C /usr/share/fonts/JetBrainsMono && \
rm -f font.tar.xz

## GNOME Related Tools

# GNOME Accessibility
# This can fix some apps that keep waiting for the accessibility bus
sudo zypper install at-spi2-core

## Wine
sudo zypper --non-interactive install -l wine wine-gecko wine-mono dosbox winetricks
wine start cmd /c exit

# Wine associations
echo -e "\n\n[Default Applications]\napplication/x-ms-dos-executable=wine.desktop;\napplication/vnd.microsoft.portable-executable=wine.desktop;\napplication/x-msdownload=wine.desktop;" >> "$HOME/.config/mimeapps.list"

## Thunderbild
sudo zypper install thunderbird

## Git
sudo zypper install git

# Git settings
echo -n "Enter your GIT name: "; read GIT_NAME
echo -n "Enter your GIT email: "; read GIT_EMAIL
git config --global user.name "$GIT_NAME"
git config --global user.email "$GIT_EMAIL"

## Vim
sudo zypper install vim
mkdir -p ~/.vim
touch ~/.vim/vimrc

# VIMOD
git clone https://github.com/hezkore/vimod.git ~/.vim/vimod
echo "runtime vimod/vimod.vim" >> ~/.vim/vimrc
echo "VIModKeys" >> ~/.vim/vimrc

## Albert
sudo zypper addrepo --refresh https://download.opensuse.org/repositories/home:manuelschneid3r/openSUSE_Tumbleweed/home:manuelschneid3r.repo
sudo zypper install alber

## Albert settings
mkdir -p ~/.config/albert
killall albert
cat <<EOF > ~/.config/albert/config
# Hezkore's Albert settings
[General]
hotkey=Alt+Space
memoryDecay=0.5
prioritizePerfectMatch=true
show_enabled_plugins_first=true
telemetry=false

[albert]
global_handler_enabled=false

[applications]
enabled=true
terminal=Alacritty

[caffeine]
enabled=false

[calculator_qalculate]
angle_unit=2
enabled=true

[chromium]
enabled=false

[clipboard]
enabled=false

[datetime]
enabled=true
show_date_on_empty_query=false

[docs]
enabled=false

[files]
enabled=true
global_handler_enabled=false
index_file_path=false
paths=$HOME
trigger="find "

[hash]
enabled=false

[mpris]
enabled=false

[path]
enabled=false

[python]
enabled=false

[python.aur]
enabled=false

[snippets]
enabled=false

[ssh]
enabled=true

[system]
enabled=true

[timer]
enabled=true

[timezones]
enabled=true

[urlhandler]
enabled=true

[websearch]
enabled=true

[widgetsboxmodel]
alwaysOnTop=true
clearOnHide=true
clientShadow=true
darkTheme=Default System Palette
displayScrollbar=true
followCursor=true
hideOnFocusLoss=true
historySearch=true
itemCount=10
quitOnClose=false
showCentered=true
systemShadow=true
EOF

# Albert autostart
mkdir -p ~/.config/autostart
cat <<EOF > ~/.config/autostart/albert.desktop
[Desktop Entry]
Type=Application
Name=Albert
Exec=albert
EOF

## Alacritty
sudo zypper install alacritty

# Alacritty settings
mkdir -p ~/.config/alacritty
cat <<EOF > ~/.config/alacritty/alacritty.toml
# Hezkore's Alacritty settings
[window]
dimensions = { columns = 127, lines = 33 }
opacity = 0.99
resize_increments = true

[bell]
animation = "Linear"
duration = 250
color = "#505050"

[scrolling]
multiplier = 1

[font]
normal = { family = "Hack", style = "Regular" }
size = 12

[colors]
transparent_background_colors = true

[colors.primary]
background = "#1e1f29"

[mouse]
hide_when_typing = true
EOF

## XFCE
# And some GNOME settings too!

# Install screensavers
sudo zypper install xscreensaver-data xscreensaver-data-extra rss-glx

# Enable the screensaver and set to 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
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
xfconf-query -c xfce4-screensaver -p /lock/saver-activation/delay --create --type int -s 1

# Dracula theme
xfconf-query -c xfwm4 -p /general/theme -s "Dracula"
xfconf-query -c xsettings -p /Net/ThemeName -s "Dracula"

# Icon theme
xfconf-query -c xsettings -p /Net/IconThemeName -s "Vimix-dark"

# 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?
xfconf-query -c xsettings -p /Xft/RGBA -s "none"

# 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
xfconf-query -c xsettings -p /Gtk/CursorThemeName -s "Adwaita"
xfconf-query -c xsettings -p /Gtk/CursorThemeSize -s 16

# Reclaim the Super key
xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/Super_L" --reset

# Easy dragging/resize windows with Super key
xfconf-query -c xfwm4 -p /general/easy_click -s "Super"

# Remove Alt Space menu
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom/<Alt>space" --reset

# Set Ctrl Alt Delte 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
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
xfconf-query -c xfwm4 -p /general/mousewheel_rollup -s false

# Center most windows
xfconf-query -c xfwm4 -p /general/placement_ratio -s 90

# Transparency on popups
xfconf-query -c xfwm4 -p /general/popup_opacity -s 98

# Only raise windows when clicking on them
xfconf-query -c xfwm4 -p /general/raise_with_any_button -s false

# Disable workspaces
# (think this one over)
xfconf-query -c xfwm4 -p /general/workspace_count -s 1

# Disable button & menu icons
xfconf-query -c xsettings -p /Gtk/ButtonImages -s false
xfconf-query -c xsettings -p /Gtk/ButtonImages -s false

# Thunar location buttons
xfconf-query -c thunar -p /last-location-bar -s "ThunarLocationButtons"

# Launch file explorer on Super E
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
xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/<Super>l" --create --type string -s "xflock4"

# Disable Middle Click Pasting
gsettings set org.gnome.desktop.interface gtk-enable-primary-paste false

# Clipboard history on Super V
xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/<Super>v" --create --type string -s "xfce4-popup-clipman"

# 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
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

# All done!
echo "All done! You'll want to reboot now."

I'm also working on this (don't use yet!), which I place in /home/hezkore/.config/gtk-3.0/gtk.css to tweak the theme a bit:

#sn-button:not(:hover), 
#sn-button-box:not(:hover), 
#xfce4-notification-plugin:not(:hover), 
#xfce4-clipman-plugin:not(:hover), 
#clock-button:not(:hover), 
#whiskermenu-button:not(:hover), 
#pulseaudio-button:not(:hover), 
#xfce-panel-button:not(:hover), 
#xfce-panel-toggle-button:not(:hover), 
#xfce4-power-manager-plugin:not(:hover), 
#actions-button:not(:hover), 
#applicationmenu-button:not(:hover), 
#directorymenu-button:not(:hover), 
#launcher-button:not(:hover), 
#launcher-arrow:not(:hover), 
#showdesktop-button:not(:hover), 
#panel-tasklist-arrow:not(:hover), 
#docklike-plugin:not(:hover), 
#windowmenu-button:not(:hover) {
    background-color: transparent;
    margin: 0.15rem 0px 0.25rem 0px;
    border: 0px;
}

#sn-button, 
#sn-button-box, 
#xfce4-notification-plugin, 
#xfce4-clipman-plugin, 
#clock-button, 
#whiskermenu-button, 
#pulseaudio-button, 
#xfce-panel-button, 
#xfce-panel-toggle-button, 
#xfce4-power-manager-plugin, 
#actions-button, 
#applicationmenu-button, 
#directorymenu-button, 
#launcher-button, 
#launcher-arrow, 
#showdesktop-button, 
#panel-tasklist-arrow, 
#docklike-plugin, 
#windowmenu-button {
    margin: 0.15rem 0px 0.25rem 0px;
    border: 0px;
}

#docklike-plugin image { -gtk-icon-transform: scale(1); }

#docklike-plugin .flat {
    background-color: transparent;
    border: none;
    border-radius: 3px;
    border-width: 0px;
    margin: 0.15rem 0px 0rem 0px;
    padding: 0px 0.4rem 0.25rem 0.4rem;
}

#docklike-plugin .hover_group {
    background-color: @theme_base_color;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.2);
    border-radius: 3px;
    border-width: 1px;
    margin: 0.15rem 0px 0rem 0px;
    padding: 0px 0.4rem 0.25rem 0.4rem;
}

#docklike-plugin .active_group {
    background-color: @theme_base_color;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.2);
    border-radius: 3px;
    border-width: 1px;
    margin: 0.15rem 0px 0rem 0px;
    padding: 0px 0.4rem 0.25rem 0.4rem;
}

.xfce4-panel button:active, 
.xfce4-panel button:hover, 
.xfce4-panel button:active:hover
{
    transition: 150ms linear;
    background-color: @theme_base_color;
    border-radius: 3px;
}