Compare commits

...

11 Commits

Author SHA1 Message Date
b0a45417ea Add Obsidian to waybar, comment out nvidia-specific env vars
Add Obsidian as a waybar app launcher button alongside existing
launchers. Comment out nvidia-specific environment variables in
hypr/base.conf (LIBVA_DRIVER_NAME, GBM_BACKEND, etc.) so the
config works on all systems by default. Also includes prior
uncommitted changes: .gitignore updates, hyprpaper config,
package list updates, and various hypr config refinements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 22:53:53 +01:00
3ba75c032a Remove non-existant config options 2026-04-07 23:59:56 +01:00
23521892d3 Move base to base.conf, add lots of hypr tech 2026-04-07 23:59:15 +01:00
e35e3f6249 Merge branch 'main' of ssh://adam-french.co.uk:2222/adamf/scripts 2026-03-24 12:55:58 +00:00
2dffefbf6f Use dex instead of manual autostart 2026-03-24 12:55:51 +00:00
0b540e1ac3 Merge branch 'main' of ssh://adam-french.co.uk:2222/adamf/scripts 2026-03-20 21:17:38 +00:00
fa5d034a83 Change dpi 2026-03-20 21:17:34 +00:00
e42d9ba749 Fix install/uninstall bugs and document both scripts in README
Fix glob matching in install.sh shell detection (use [[ ]] instead of [ ]),
add missing argument check for uninstall.sh --backup flag, and update README
with install/uninstall usage section.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 00:52:39 +00:00
c0ea9ecf0f Change fadelevel 2026-03-19 00:37:32 +00:00
4d408701e5 Update nvim config: switch to tab indentation, update claudecode and vimade settings
Remove stylua.toml (was enforcing 2-space indent), add tab settings in options.lua,
update claudecode.nvim terminal/diff config, lower vimade fadelevel to 0.6, remove
claudecode LazyExtra in favor of custom plugin spec, and add .luarc.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 00:35:23 +00:00
3ee3bb092d adding git pull for subdirectories 2026-03-13 15:32:41 +00:00
24 changed files with 548 additions and 161 deletions

4
.gitignore vendored
View File

@@ -1,3 +1,7 @@
*/colors.css
*/colors.conf
backups/
i3/config
sway/config
waybar/style.css
wofi/style.css

View File

@@ -26,11 +26,42 @@ Install all packages:
yay -S $(grep -v '^\s*$' ~/scripts/packages.txt | tr '\n' ' ')
```
## Linking Configs
## Install / Uninstall
Pick a window manager section below, then add the shared configs.
`install.sh` symlinks configs, sources shell files, and backs up any existing files it would overwrite. `uninstall.sh` reverses the process, removing symlinks and restoring backups.
### Hyprland
```bash
# Install everything (uses Hyprland as the WM)
~/scripts/install.sh all
# Install specific targets
~/scripts/install.sh hyprland shell nvim tmux
# Uninstall specific targets (restores from most recent backup)
~/scripts/uninstall.sh nvim shell
# Uninstall using a specific backup
~/scripts/uninstall.sh --backup ~/scripts/backups/20260319_120000 all
```
Available targets: `hyprland`, `sway`, `i3`, `cursor`, `shell`, `alacritty`, `tmux`, `nvim`, `vim`, `all`.
### tmux prerequisite
Install the plugin manager before running `install.sh tmux`:
```bash
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
```
### Manual linking
If you prefer to link configs manually instead of using `install.sh`:
<details>
<summary>Manual symlink commands</summary>
#### Hyprland
```bash
ln -sf ~/scripts/hypr ~/.config/hypr
@@ -38,7 +69,7 @@ ln -sf ~/scripts/waybar ~/.config/waybar
ln -sf ~/scripts/wofi ~/.config/wofi
```
### Sway
#### Sway
```bash
ln -sf ~/scripts/sway ~/.config/sway
@@ -53,7 +84,7 @@ mv ~/scripts/waybar/config ~/scripts/waybar/config.hypr.json
mv ~/scripts/waybar/waybar_sway_config.json ~/scripts/waybar/config
```
### i3
#### i3
```bash
ln -sf ~/scripts/i3 ~/.config/i3
@@ -61,13 +92,13 @@ ln -sf ~/scripts/i3blocks ~/.config/i3blocks
ln -sf ~/scripts/i3status ~/.config/i3status
```
### Cursor
#### Cursor
```bash
ln -sf ~/scripts/hatsune-miku-windows-linux-cursors/miku-cursor-linux ~/.local/share/icons/"Miku Cursor"
```
### Shell
#### Shell
Add to `~/.bashrc` or `~/.zshrc`:
@@ -76,7 +107,7 @@ source ~/scripts/bashrc # or zshrc
export PATH="~/scripts/sh:$PATH"
```
### Terminals
#### Terminals
**Alacritty** - add to `~/.config/alacritty/alacritty.toml`:
@@ -86,13 +117,7 @@ import = ["~/scripts/alacritty.toml"]
**Kitty** - kitty.conf is used directly by the WM configs.
### tmux
Install the plugin manager first:
```bash
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
```
#### tmux
Add to `~/.tmux.conf`:
@@ -100,7 +125,7 @@ Add to `~/.tmux.conf`:
source ~/scripts/tmux.conf
```
### Vim
#### Vim
Add to `~/.vimrc`:
@@ -108,6 +133,8 @@ Add to `~/.vimrc`:
source ~/scripts/vimrc
```
</details>
## Keybindings
All window managers and tmux use vim-style <kbd>h</kbd><kbd>j</kbd><kbd>k</kbd><kbd>l</kbd> navigation. `$mod` is the Super key.

BIN
background.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

View File

@@ -15,7 +15,7 @@ monitor=,preferred,auto,1
$terminal = kitty
$fileManager = kitty -e ranger
$menu = wofi --show run
$menu = wofi --show drun
###################
### CURSOR ###
@@ -29,18 +29,15 @@ env = HYPRCURSOR_SIZE,48
### AUTOSTART ###
#################
exec-once = fcitx5
exec-once = dex -a
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = nm-applet
exec-once = wl-paste --watch cliphist store
exec-once = dunst
exec-once = hypridle # replaces xautolock; configure lock in hypridle.conf
exec-once = hypridle
exec-once = hyprpaper
exec-once = hyprsunset
exec-once = waterfox
exec-once = steam
exec-once = surfshark
exec-once = waybar
# exec-once = volctl # may need a Wayland-compatible tray volume tool
# exec-once = pamac-tray # check for Wayland support
# NOTE: ff-theme-util and fix_xcursor are X11-specific; drop or find Wayland equivalents
# Caps<->Escape swap is handled below via input config
@@ -49,6 +46,12 @@ exec-once = waybar
### ENVIRONMENT VARIABLES ###
#############################
env = XDG_SESSION_TYPE,wayland
# NVIDIA-specific env vars — uncomment if running on nvidia:
# env = LIBVA_DRIVER_NAME,nvidia
# env = GBM_BACKEND,nvidia-drm
# env = __GLX_VENDOR_LIBRARY_NAME,nvidia
# env = WLR_NO_HARDWARE_CURSORS,1
#####################
### LOOK AND FEEL ###
@@ -64,7 +67,11 @@ general {
resize_on_border = true
allow_tearing = false
layout = master # closest to i3's stacking default; use dwindle for split
layout = dwindle
}
xwayland {
force_zero_scaling = true
}
decoration {
@@ -114,7 +121,7 @@ misc {
input {
kb_layout = gb
kb_options = caps:swapescape
kb_options = caps:swapescape,grp:alt_shift_toggle
follow_mouse = 1
sensitivity = 0
}
@@ -132,11 +139,10 @@ bind = $mod, Return, exec, $terminal
bind = $mod SHIFT, Q, killactive
# Launcher (wofi replaces dmenu)
bind = $mod, D, exec, wofi --show run --style ~/scripts/wofi/style.css
# To approximate your dmenu colors, configure wofi's style.css
bind = $mod, D, exec, $menu
# Pavucontrol
bind = $mod CTRL, M, exec, pavucontrol
bind = $mod CTRL, M, exec, hyprpwcenter
# Applications
bind = $mod, F2, exec, waterfox
@@ -144,9 +150,8 @@ bind = $mod, F3, exec, $fileManager
bind = $mod SHIFT, F3, exec, pcmanfm
bind = $mod, F5, exec, kitty -e mocp
# Compositor toggle (picom → hyprland manages its own compositor; these are no-ops)
# bind = $mod, T, exec, pkill picom
# bind = $mod CTRL, T, exec, picom -b
# Toggle window layout between master and dwindle
bind = $mod, T, exec, hyprctl keyword general:layout "$([ "$(hyprctl getoption general:layout -j | grep -o '"str": "[^"]*"' | cut -d'"' -f4)" = "master" ] && echo dwindle || echo master)"
# Restart dunst
bind = $mod SHIFT, D, exec, killall dunst && notify-send 'restart dunst'
@@ -169,10 +174,11 @@ bind = $mod, M, exec, pkill -SIGUSR1 waybar
bind = $mod SHIFT, C, exec, hyprctl reload
# Exit Hyprland
bind = $mod SHIFT, E, exec, hyprctl dispatch exit
bind = $mod SHIFT, E, exec, hyprshutdown
# System mode (replaces i3's $mode_system)
# Simple submap equivalent:
bind = $mod, 0, exec, notify-send -t 5000 "System Mode" "(l)ock (s)uspend (h)ibernate\n(r)eboot (Shift+s) shutdown (e)xit\n\nReturn/Escape to cancel"
bind = $mod, 0, submap, system
submap = system
bind = , L, exec, hyprlock
@@ -185,9 +191,11 @@ bind = , R, exec, systemctl reboot
bind = , R, submap, reset
bind = SHIFT, S, exec, systemctl poweroff
bind = SHIFT, S, submap, reset
bind = , E, exec, hyprctl dispatch exit
bind = , E, exec, hyprshutdown
bind = , E, submap, reset
bind = , Return, exec, dunstctl close
bind = , Return, submap, reset
bind = , Escape, exec, dunstctl close
bind = , Escape, submap, reset
submap = reset
@@ -310,8 +318,8 @@ windowrule {
}
windowrule {
name = pavucontrol
match:class = ^(pavucontrol)$
name = hyprpwcenter
match:class = ^(hyprpwcenter)$
float = on
}

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
cat colors.conf base > hyprland.conf
cat colors.conf base.conf >hyprland.conf

View File

@@ -25,7 +25,7 @@ monitor=,preferred,auto,1
$terminal = kitty
$fileManager = kitty -e ranger
$menu = wofi --show run
$menu = wofi --show drun
###################
### CURSOR ###
@@ -39,18 +39,15 @@ env = HYPRCURSOR_SIZE,48
### AUTOSTART ###
#################
exec-once = fcitx5
exec-once = dex -a
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = nm-applet
exec-once = wl-paste --watch cliphist store
exec-once = dunst
exec-once = hypridle # replaces xautolock; configure lock in hypridle.conf
exec-once = hypridle
exec-once = hyprpaper
exec-once = hyprsunset
exec-once = waterfox
exec-once = steam
exec-once = surfshark
exec-once = waybar
# exec-once = volctl # may need a Wayland-compatible tray volume tool
# exec-once = pamac-tray # check for Wayland support
# NOTE: ff-theme-util and fix_xcursor are X11-specific; drop or find Wayland equivalents
# Caps<->Escape swap is handled below via input config
@@ -59,6 +56,12 @@ exec-once = waybar
### ENVIRONMENT VARIABLES ###
#############################
env = XDG_SESSION_TYPE,wayland
# NVIDIA-specific env vars — uncomment if running on nvidia:
# env = LIBVA_DRIVER_NAME,nvidia
# env = GBM_BACKEND,nvidia-drm
# env = __GLX_VENDOR_LIBRARY_NAME,nvidia
# env = WLR_NO_HARDWARE_CURSORS,1
#####################
### LOOK AND FEEL ###
@@ -74,7 +77,11 @@ general {
resize_on_border = true
allow_tearing = false
layout = master # closest to i3's stacking default; use dwindle for split
layout = dwindle
}
xwayland {
force_zero_scaling = true
}
decoration {
@@ -124,7 +131,7 @@ misc {
input {
kb_layout = gb
kb_options = caps:swapescape
kb_options = caps:swapescape,grp:alt_shift_toggle
follow_mouse = 1
sensitivity = 0
}
@@ -142,11 +149,10 @@ bind = $mod, Return, exec, $terminal
bind = $mod SHIFT, Q, killactive
# Launcher (wofi replaces dmenu)
bind = $mod, D, exec, wofi --show run --style ~/scripts/wofi/style.css
# To approximate your dmenu colors, configure wofi's style.css
bind = $mod, D, exec, $menu
# Pavucontrol
bind = $mod CTRL, M, exec, pavucontrol
bind = $mod CTRL, M, exec, hyprpwcenter
# Applications
bind = $mod, F2, exec, waterfox
@@ -154,9 +160,8 @@ bind = $mod, F3, exec, $fileManager
bind = $mod SHIFT, F3, exec, pcmanfm
bind = $mod, F5, exec, kitty -e mocp
# Compositor toggle (picom → hyprland manages its own compositor; these are no-ops)
# bind = $mod, T, exec, pkill picom
# bind = $mod CTRL, T, exec, picom -b
# Toggle window layout between master and dwindle
bind = $mod, T, exec, hyprctl keyword general:layout "$([ "$(hyprctl getoption general:layout -j | grep -o '"str": "[^"]*"' | cut -d'"' -f4)" = "master" ] && echo dwindle || echo master)"
# Restart dunst
bind = $mod SHIFT, D, exec, killall dunst && notify-send 'restart dunst'
@@ -179,10 +184,11 @@ bind = $mod, M, exec, pkill -SIGUSR1 waybar
bind = $mod SHIFT, C, exec, hyprctl reload
# Exit Hyprland
bind = $mod SHIFT, E, exec, hyprctl dispatch exit
bind = $mod SHIFT, E, exec, hyprshutdown
# System mode (replaces i3's $mode_system)
# Simple submap equivalent:
bind = $mod, 0, exec, notify-send -t 5000 "System Mode" "(l)ock (s)uspend (h)ibernate\n(r)eboot (Shift+s) shutdown (e)xit\n\nReturn/Escape to cancel"
bind = $mod, 0, submap, system
submap = system
bind = , L, exec, hyprlock
@@ -195,9 +201,11 @@ bind = , R, exec, systemctl reboot
bind = , R, submap, reset
bind = SHIFT, S, exec, systemctl poweroff
bind = SHIFT, S, submap, reset
bind = , E, exec, hyprctl dispatch exit
bind = , E, exec, hyprshutdown
bind = , E, submap, reset
bind = , Return, exec, dunstctl close
bind = , Return, submap, reset
bind = , Escape, exec, dunstctl close
bind = , Escape, submap, reset
submap = reset
@@ -320,8 +328,8 @@ windowrule {
}
windowrule {
name = pavucontrol
match:class = ^(pavucontrol)$
name = hyprpwcenter
match:class = ^(hyprpwcenter)$
float = on
}

3
hypr/hyprpaper.conf Normal file
View File

@@ -0,0 +1,3 @@
preload = ~/scripts/background.png
wallpaper = DP-1,~/scripts/background.png
wallpaper = DP-2,~/scripts/background.png

View File

@@ -21,7 +21,7 @@ exec --no-startup-id nm-applet
exec --no-startup-id pamac-tray
exec --no-startup-id clipit
exec --no-startup-id dunst
exec --no-startup-id xautolock -time 30 -locker blurlock
exec --no-startup-id xautolock -time 90 -locker blurlock
# exec --no-startup-id nitrogen ~/scripts/background.jpg
# exec --no-startup-id blueman-applet
# exec_always --no-startup-id sbxkb

View File

@@ -31,7 +31,7 @@ exec --no-startup-id nm-applet
exec --no-startup-id pamac-tray
exec --no-startup-id clipit
exec --no-startup-id dunst
exec --no-startup-id xautolock -time 30 -locker blurlock
exec --no-startup-id xautolock -time 90 -locker blurlock
# exec --no-startup-id nitrogen ~/scripts/background.jpg
# exec --no-startup-id blueman-applet
# exec_always --no-startup-id sbxkb

View File

@@ -100,11 +100,11 @@ install_cursor() {
install_shell() {
echo "Installing shell configs..."
if [ -f "$HOME/.zshrc" ] || [ "$SHELL" = *zsh* ]; then
if [ -f "$HOME/.zshrc" ] || [[ "$SHELL" == *zsh* ]]; then
append_if_missing "$HOME/.zshrc" "source ~/scripts/zshrc"
append_if_missing "$HOME/.zshrc" 'export PATH="$HOME/scripts/sh:$PATH"'
fi
if [ -f "$HOME/.bashrc" ] || [ "$SHELL" = *bash* ]; then
if [ -f "$HOME/.bashrc" ] || [[ "$SHELL" == *bash* ]]; then
append_if_missing "$HOME/.bashrc" "source ~/scripts/bashrc"
append_if_missing "$HOME/.bashrc" 'export PATH="$HOME/scripts/sh:$PATH"'
fi

12
nvim/.luarc.json Normal file
View File

@@ -0,0 +1,12 @@
{
"runtime": {
"version": "LuaJIT"
},
"diagnostics": {
"globals": ["vim", "LazyVim", "Snacks"]
},
"workspace": {
"library": ["${3rd}/luv/library"],
"checkThirdParty": false
}
}

View File

@@ -1,6 +1,5 @@
{
"extras": [
"lazyvim.plugins.extras.ai.claudecode",
"lazyvim.plugins.extras.coding.mini-surround",
"lazyvim.plugins.extras.dap.core",
"lazyvim.plugins.extras.dap.nlua",

View File

@@ -1,3 +1,6 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.softtabstop = 4

View File

@@ -4,32 +4,61 @@ return {
dependencies = { "folke/snacks.nvim" },
opts = {
terminal = {
split_width_percentage = 0.99,
provider = "snacks",
snacks_win_opts = {
relative = "win",
position = "bottom",
height = 0.30,
height = 0.3,
split_width_percentage = 0.99,
},
},
diff_opts = {
layout = "vertical",
open_in_new_tab = true,
keep_terminal_focus = true,
},
},
keys = {
{ "<leader>a", nil, desc = "AI/Claude Code" },
{ "<leader>a", "", desc = "+ai", mode = { "n", "v" } },
{ "<leader>ac", "<cmd>ClaudeCode<cr>", desc = "Toggle Claude" },
{ "<leader>af", "<cmd>ClaudeCodeFocus<cr>", desc = "Focus Claude" },
{ "<leader>ar", "<cmd>ClaudeCode --resume<cr>", desc = "Resume Claude" },
{ "<leader>aC", "<cmd>ClaudeCode --continue<cr>", desc = "Continue Claude" },
{ "<leader>am", "<cmd>ClaudeCodeSelectModel<cr>", desc = "Select Claude model" },
{ "<leader>ab", "<cmd>ClaudeCodeAdd %<cr>", desc = "Add current buffer" },
{ "<leader>as", "<cmd>ClaudeCodeSend<cr>", mode = "v", desc = "Send to Claude" },
{
"<leader>as",
"<cmd>ClaudeCodeTreeAdd<cr>",
desc = "Add file",
ft = { "NvimTree", "neo-tree", "oil", "minifiles", "netrw" },
ft = { "NvimTree", "neo-tree", "oil" },
},
-- Diff management
{ "<leader>aa", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept diff" },
{ "<leader>ad", "<cmd>ClaudeCodeDiffDeny<cr>", desc = "Deny diff" },
},
},
-- Disabled: unmaintained
{
"greggh/claude-code.nvim",
enabled = false,
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
position = "float",
float_opts = {
relative = "win",
width = "80%",
height = "80%",
row = "center",
col = "center",
border = "rounded",
},
},
keys = {
{ "<leader>a", nil, desc = "AI/Claude Code" },
{ "<leader>ac", "<cmd>ClaudeCode<cr>", desc = "Toggle Claude" },
{ "<leader>ar", "<cmd>ClaudeCodeResume<cr>", desc = "Resume Claude" },
{ "<leader>aC", "<cmd>ClaudeCodeContinue<cr>", desc = "Continue Claude" },
},
},
}

View File

@@ -16,7 +16,6 @@ return {
╚══════╝ ╚═╝ ╚═╝
]],
-- stylua: ignore
---@type snacks.dashboard.Item[]
keys = {
{ icon = "", key = "f", desc = "Find File", action = ":lua Snacks.dashboard.pick('files')" },
{ icon = "", key = "n", desc = "New File", action = ":ene | startinsert" },

View File

@@ -1,3 +0,0 @@
indent_type = "Spaces"
indent_width = 2
column_width = 120

View File

@@ -16,9 +16,15 @@ hyprland
hyprpaper
hypridle
hyprlock
hyprsunset
hyprshutdown
hyprpwcenter
hyprlauncher
dex
polkit-gnome
waybar
wofi
grim
slurp
@@ -56,7 +62,11 @@ dunst
cliphist
inotify-tools
pavucontrol
fcitx5
fcitx5-chinese-addons
fcitx5-gtk
fcitx5-qt
fcitx5-configtool
pipewire
pipewire-alsa
pipewire-audio
@@ -72,6 +82,8 @@ zed
vim
neovim
activitywatch-bin
ranger
thunar
rar

10
sh/pull_all Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
for dir in */; do
if [ -d "$dir/.git" ]; then
echo "Pulling in $dir..."
git -C "$dir" pull
echo ""
fi
done

216
uninstall.sh Executable file
View File

@@ -0,0 +1,216 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPTS_DIR="$HOME/scripts"
CONFIG_DIR="$HOME/.config"
BACKUP_DIR=""
usage() {
echo "Usage: $(basename "$0") [OPTIONS] <target>..."
echo
echo "Targets:"
echo " hyprland Hyprland + waybar + wofi"
echo " sway Sway + waybar + wofi"
echo " i3 i3 + i3blocks + i3status"
echo " cursor Miku cursor theme"
echo " shell Remove sourced bashrc/zshrc and sh/ from PATH"
echo " alacritty Remove import from alacritty.toml"
echo " tmux Remove sourced tmux.conf"
echo " nvim Neovim (LazyVim) config"
echo " vim Remove sourced vimrc"
echo " all Everything (uses hyprland as WM)"
echo
echo "Options:"
echo " -h, --help Show this help"
echo " --backup <dir> Use specific backup directory for restoring"
echo " (default: most recent in $SCRIPTS_DIR/backups/)"
}
# Find the backup directory to restore from
find_backup() {
if [ -n "$BACKUP_DIR" ]; then
if [ ! -d "$BACKUP_DIR" ]; then
echo "Error: backup directory not found: $BACKUP_DIR"
exit 1
fi
return
fi
local backups_root="$SCRIPTS_DIR/backups"
if [ -d "$backups_root" ]; then
local latest
latest=$(ls -1d "$backups_root"/*/ 2>/dev/null | sort | tail -n1 || true)
if [ -n "$latest" ]; then
BACKUP_DIR="${latest%/}"
echo "Using backup: $BACKUP_DIR"
fi
fi
if [ -z "$BACKUP_DIR" ]; then
echo "No backups found, will only remove without restoring"
fi
}
# Remove a symlink if it points into $SCRIPTS_DIR, then restore from backup if available
restore() {
local dest="$1"
local name
name=$(basename "$dest")
if [ -L "$dest" ]; then
local target
target=$(readlink "$dest")
if [[ "$target" == "$SCRIPTS_DIR"* ]]; then
rm "$dest"
echo " Removed symlink $dest"
else
echo " Skipping $dest (symlink does not point into $SCRIPTS_DIR)"
return
fi
elif [ -e "$dest" ]; then
echo " Skipping $dest (not a symlink, won't remove)"
return
else
echo " $dest does not exist, nothing to remove"
fi
# Restore from backup if available
if [ -n "$BACKUP_DIR" ] && [ -e "$BACKUP_DIR/$name" ]; then
cp -a "$BACKUP_DIR/$name" "$dest"
echo " Restored $dest from backup"
fi
}
# Remove exact matching lines from a file
remove_line() {
local file="$1" line="$2"
if [ ! -f "$file" ]; then
echo " $file does not exist, nothing to remove"
return
fi
if grep -qF "$line" "$file"; then
local tmp
tmp=$(mktemp)
grep -vF "$line" "$file" > "$tmp" || true
mv "$tmp" "$file"
echo " Removed from $file: $line"
# Delete file if only whitespace remains
if [ ! -s "$file" ] || ! grep -q '[^[:space:]]' "$file"; then
rm "$file"
echo " Deleted empty $file"
fi
else
echo " Line not found in $file: $line"
fi
}
uninstall_hyprland() {
echo "Uninstalling Hyprland configs..."
restore "$CONFIG_DIR/hypr"
restore "$CONFIG_DIR/waybar"
restore "$CONFIG_DIR/wofi"
}
uninstall_sway() {
echo "Uninstalling Sway configs..."
restore "$CONFIG_DIR/sway"
restore "$CONFIG_DIR/waybar"
restore "$CONFIG_DIR/wofi"
}
uninstall_i3() {
echo "Uninstalling i3 configs..."
restore "$CONFIG_DIR/i3"
restore "$CONFIG_DIR/i3blocks"
restore "$CONFIG_DIR/i3status"
}
uninstall_cursor() {
echo "Uninstalling cursor theme..."
restore "$HOME/.local/share/icons/Miku Cursor"
}
uninstall_shell() {
echo "Uninstalling shell configs..."
if [ -f "$HOME/.zshrc" ]; then
remove_line "$HOME/.zshrc" "source ~/scripts/zshrc"
remove_line "$HOME/.zshrc" 'export PATH="$HOME/scripts/sh:$PATH"'
fi
if [ -f "$HOME/.bashrc" ]; then
remove_line "$HOME/.bashrc" "source ~/scripts/bashrc"
remove_line "$HOME/.bashrc" 'export PATH="$HOME/scripts/sh:$PATH"'
fi
}
uninstall_alacritty() {
echo "Uninstalling Alacritty config..."
local conf="$CONFIG_DIR/alacritty/alacritty.toml"
remove_line "$conf" 'import = ["~/scripts/alacritty.toml"]'
}
uninstall_tmux() {
echo "Uninstalling tmux config..."
remove_line "$HOME/.tmux.conf" "source ~/scripts/tmux.conf"
}
uninstall_nvim() {
echo "Uninstalling Neovim config..."
restore "$CONFIG_DIR/nvim"
}
uninstall_vim() {
echo "Uninstalling vim config..."
remove_line "$HOME/.vimrc" "source ~/scripts/vimrc"
}
if [ $# -eq 0 ]; then
usage
exit 1
fi
targets=()
while [ $# -gt 0 ]; do
case "$1" in
-h | --help)
usage
exit 0
;;
--backup)
if [ $# -lt 2 ]; then
echo "Error: --backup requires a directory argument"
exit 1
fi
BACKUP_DIR="$2"
shift 2
;;
all)
targets+=(hyprland cursor shell alacritty tmux nvim vim)
shift
;;
*)
targets+=("$1")
shift
;;
esac
done
find_backup
for target in "${targets[@]}"; do
case "$target" in
hyprland) uninstall_hyprland ;;
sway) uninstall_sway ;;
i3) uninstall_i3 ;;
cursor) uninstall_cursor ;;
shell) uninstall_shell ;;
alacritty) uninstall_alacritty ;;
tmux) uninstall_tmux ;;
nvim) uninstall_nvim ;;
vim) uninstall_vim ;;
*)
echo "Unknown target: $target"
usage
exit 1
;;
esac
done
echo "Done!"

View File

@@ -108,6 +108,21 @@ window#waybar {
color: @color_tertiary;
}
/* App launcher buttons */
#custom-steam,
#custom-waterfox,
#custom-discord,
#custom-spotify,
#custom-obsidian {
padding: 0 10px;
color: @color_primary;
}
#custom-steam {
margin-left: 8px;
border-left: 1px solid @color_tertiary;
}
#tray {
padding: 0 8px;
border-left: 1px solid @color_tertiary;

View File

@@ -4,7 +4,7 @@
"height": 30,
"spacing": 0,
"modules-left": ["hyprland/workspaces", "hyprland/submap"],
"modules-left": ["hyprland/workspaces", "hyprland/submap", "custom/steam", "custom/waterfox", "custom/discord", "custom/spotify", "custom/obsidian"],
"modules-right": [
"custom/greetings",
"custom/history",
@@ -111,5 +111,35 @@
"tray": {
"spacing": 10
},
"custom/steam": {
"format": "Steam",
"on-click": "steam",
"tooltip-format": "Steam"
},
"custom/waterfox": {
"format": "Waterfox",
"on-click": "waterfox",
"tooltip-format": "Waterfox"
},
"custom/discord": {
"format": "Discord",
"on-click": "snap run discord",
"tooltip-format": "Discord"
},
"custom/spotify": {
"format": "Spotify",
"on-click": "snap run spotify",
"tooltip-format": "Spotify"
},
"custom/obsidian": {
"format": "Obsidian",
"on-click": "obsidian",
"tooltip-format": "Obsidian"
}
}

View File

@@ -118,6 +118,21 @@ window#waybar {
color: @color_tertiary;
}
/* App launcher buttons */
#custom-steam,
#custom-waterfox,
#custom-discord,
#custom-spotify,
#custom-obsidian {
padding: 0 10px;
color: @color_primary;
}
#custom-steam {
margin-left: 8px;
border-left: 1px solid @color_tertiary;
}
#tray {
padding: 0 8px;
border-left: 1px solid @color_tertiary;