Add README and finalize setup
This commit is contained in:
@@ -33,10 +33,15 @@ OFFICIAL_PACKAGES=(
|
||||
lm_sensors
|
||||
pciutils
|
||||
hwdata
|
||||
variety
|
||||
python-pywal
|
||||
tela-circle-icon-theme-all
|
||||
zsh
|
||||
)
|
||||
|
||||
AUR_PACKAGES=(
|
||||
opencode-bin
|
||||
ulauncher
|
||||
wireguard-gui-bin
|
||||
vesktop-bin
|
||||
sone
|
||||
@@ -44,6 +49,7 @@ AUR_PACKAGES=(
|
||||
|
||||
FLATPAK_PACKAGES=(
|
||||
io.gitlab.adhami3310.Impression
|
||||
com.mattjakeman.ExtensionManager
|
||||
)
|
||||
|
||||
NAS_HOST="192.168.178.3"
|
||||
@@ -863,6 +869,164 @@ configure_git_identity() {
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
configure_ulauncher_launcher() {
|
||||
log "Configuring Ulauncher on Super+Space..."
|
||||
|
||||
if ! command -v ulauncher >/dev/null 2>&1; then
|
||||
warn "ulauncher is not installed. Skipping launcher configuration."
|
||||
return
|
||||
fi
|
||||
|
||||
# Free Super+Space from GNOME input-source switching so Ulauncher can use it.
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Control><Super>space']" || true
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "['<Shift><Control><Super>space']" || true
|
||||
|
||||
custom_path="/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom-ulauncher/"
|
||||
existing_bindings="$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings 2>/dev/null || echo "@as []")"
|
||||
|
||||
if ! echo "$existing_bindings" | grep -q "$custom_path"; then
|
||||
if [[ "$existing_bindings" == "@as []" ]]; then
|
||||
new_bindings="['$custom_path']"
|
||||
else
|
||||
new_bindings="$(echo "$existing_bindings" | sed "s|]$|, '$custom_path']|")"
|
||||
fi
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$new_bindings"
|
||||
fi
|
||||
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:"$custom_path" name "Ulauncher App Launcher"
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:"$custom_path" command "ulauncher-toggle"
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:"$custom_path" binding "<Super>space"
|
||||
|
||||
mkdir -p "$HOME/.config/autostart"
|
||||
|
||||
if [[ -f /usr/share/applications/ulauncher.desktop ]]; then
|
||||
cp /usr/share/applications/ulauncher.desktop "$HOME/.config/autostart/ulauncher.desktop"
|
||||
else
|
||||
cat > "$HOME/.config/autostart/ulauncher.desktop" <<'ULAUNCHERDESKTOP'
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Ulauncher
|
||||
Exec=ulauncher --hide-window
|
||||
X-GNOME-Autostart-enabled=true
|
||||
ULAUNCHERDESKTOP
|
||||
fi
|
||||
|
||||
if ! pgrep -x ulauncher >/dev/null 2>&1; then
|
||||
nohup ulauncher --hide-window >/dev/null 2>&1 &
|
||||
fi
|
||||
|
||||
log "Ulauncher configured on Super+Space."
|
||||
warn "If Super+Space still changes keyboard input source, change GNOME's input-source shortcut in Settings > Keyboard > Typing."
|
||||
}
|
||||
|
||||
|
||||
configure_wallpaper_palette_tools() {
|
||||
log "Configuring wallpaper and palette tools..."
|
||||
|
||||
mkdir -p "$HOME/Pictures/Wallpapers"
|
||||
|
||||
if command -v variety >/dev/null 2>&1; then
|
||||
log "Variety installed. Use it to find and rotate high-quality wallpapers."
|
||||
else
|
||||
warn "Variety is not available."
|
||||
fi
|
||||
|
||||
if command -v wal >/dev/null 2>&1; then
|
||||
log "Pywal installed. Generate a palette with: wal -i ~/Pictures/Wallpapers/example.jpg"
|
||||
else
|
||||
warn "Pywal/wal is not available."
|
||||
fi
|
||||
|
||||
log "Wallpaper folder prepared: $HOME/Pictures/Wallpapers"
|
||||
}
|
||||
|
||||
|
||||
configure_gnome_keyboard_shortcuts() {
|
||||
log "Configuring GNOME keyboard shortcuts..."
|
||||
|
||||
if ! command -v gsettings >/dev/null 2>&1; then
|
||||
warn "gsettings is not available. Skipping GNOME shortcuts."
|
||||
return
|
||||
fi
|
||||
|
||||
# Keep Super+Space free for Search Light.
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Control><Super>space']" || true
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "['<Shift><Control><Super>space']" || true
|
||||
|
||||
# Hyprland-like close shortcut while preserving Alt+F4.
|
||||
gsettings set org.gnome.desktop.wm.keybindings close "['<Super>q', '<Alt>F4']" || true
|
||||
|
||||
python - <<'PYSHORTCUTS'
|
||||
import ast
|
||||
import subprocess
|
||||
|
||||
SCHEMA = "org.gnome.settings-daemon.plugins.media-keys"
|
||||
BASE = "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/"
|
||||
|
||||
shortcuts = [
|
||||
("custom-ghostty", "Open Ghostty", "ghostty", "<Super>Return"),
|
||||
("custom-brave", "Open Brave", "brave-browser", "<Super>b"),
|
||||
("custom-vscode", "Open VS Code", "code", "<Super>e"),
|
||||
("custom-files", "Open Files", "nautilus", "<Super>f"),
|
||||
("custom-mail", "Open Thunderbird", "thunderbird", "<Super>m"),
|
||||
("custom-telegram", "Open Telegram", "telegram-desktop", "<Super>t"),
|
||||
("custom-signal", "Open Signal", "signal-desktop", "<Super>s"),
|
||||
("custom-wireguard", "Open WireGuard GUI", "wireguard-gui-fixed", "<Super>w"),
|
||||
("custom-impression", "Open Impression", "flatpak run io.gitlab.adhami3310.Impression", "<Super>i"),
|
||||
]
|
||||
|
||||
def get(cmd):
|
||||
return subprocess.check_output(cmd, text=True).strip()
|
||||
|
||||
def set_value(schema, key, value):
|
||||
subprocess.run(["gsettings", "set", schema, key, value], check=True)
|
||||
|
||||
raw = get(["gsettings", "get", SCHEMA, "custom-keybindings"])
|
||||
existing = [] if raw == "@as []" else ast.literal_eval(raw)
|
||||
|
||||
for shortcut_id, name, command, binding in shortcuts:
|
||||
path = f"{BASE}{shortcut_id}/"
|
||||
if path not in existing:
|
||||
existing.append(path)
|
||||
|
||||
shortcut_schema = f"{SCHEMA}.custom-keybinding:{path}"
|
||||
set_value(shortcut_schema, "name", name)
|
||||
set_value(shortcut_schema, "command", command)
|
||||
set_value(shortcut_schema, "binding", binding)
|
||||
|
||||
formatted = "[" + ", ".join(repr(item) for item in existing) + "]"
|
||||
set_value(SCHEMA, "custom-keybindings", formatted)
|
||||
PYSHORTCUTS
|
||||
|
||||
log "GNOME keyboard shortcuts configured."
|
||||
warn "Search Light should own Super+Space. Clipboard history should own Super+V."
|
||||
}
|
||||
|
||||
|
||||
configure_tela_circle_icons() {
|
||||
log "Configuring Tela Circle icon theme..."
|
||||
|
||||
if [[ -d /usr/share/icons/Tela-circle ]] || [[ -d /usr/share/icons/Tela-circle-dark ]]; then
|
||||
if gsettings writable org.gnome.desktop.interface icon-theme >/dev/null 2>&1; then
|
||||
if [[ -d /usr/share/icons/Tela-circle-dark ]]; then
|
||||
gsettings set org.gnome.desktop.interface icon-theme "Tela-circle-dark" || true
|
||||
log "GNOME icon theme set to Tela-circle-dark."
|
||||
else
|
||||
gsettings set org.gnome.desktop.interface icon-theme "Tela-circle" || true
|
||||
log "GNOME icon theme set to Tela-circle."
|
||||
fi
|
||||
else
|
||||
warn "GNOME icon-theme setting is not writable."
|
||||
fi
|
||||
else
|
||||
warn "Tela Circle icon theme was not found under /usr/share/icons."
|
||||
fi
|
||||
}
|
||||
|
||||
post_checks() {
|
||||
log "Quick checks..."
|
||||
|
||||
@@ -884,6 +1048,15 @@ post_checks() {
|
||||
echo "Sone:" | tee -a "$LOG_FILE"
|
||||
command -v sone | tee -a "$LOG_FILE" || true
|
||||
|
||||
echo "OpenCode:" | tee -a "$LOG_FILE"
|
||||
command -v opencode | tee -a "$LOG_FILE" || true
|
||||
|
||||
echo "Extension Manager:" | tee -a "$LOG_FILE"
|
||||
flatpak info com.mattjakeman.ExtensionManager >/dev/null 2>&1 && echo "com.mattjakeman.ExtensionManager" | tee -a "$LOG_FILE" || true
|
||||
|
||||
echo "Tela Circle icons:" | tee -a "$LOG_FILE"
|
||||
ls -d /usr/share/icons/Tela-circle* 2>/dev/null | head -n 10 | tee -a "$LOG_FILE" || true
|
||||
|
||||
log "Done. Log saved at: $LOG_FILE"
|
||||
}
|
||||
|
||||
@@ -898,7 +1071,11 @@ main() {
|
||||
configure_ghostty
|
||||
configure_zsh_ohmyzsh_powerlevel10k
|
||||
configure_fastfetch_terminal_summary
|
||||
configure_gnome_keyboard_shortcuts
|
||||
configure_tela_circle_icons
|
||||
configure_wallpaper_palette_tools
|
||||
install_aur_packages
|
||||
configure_ulauncher_launcher
|
||||
configure_wireguard_gui_webkit_workaround
|
||||
install_flatpak_packages
|
||||
setup_docker
|
||||
|
||||
Reference in New Issue
Block a user