1 Commits

Author SHA1 Message Date
c9810fa835 add docker compose 2026-04-13 23:16:21 +02:00
14 changed files with 91 additions and 1665 deletions

View File

@@ -1,96 +0,0 @@
[env]
TERM = "xterm-256color"
[window]
padding = { x = 10, y = 10 }
opacity = 1.0
[font]
size = 11.0
[font.normal]
family = "SauceCodePro Nerd Font"
style = "Regular"
[font.bold]
family = "SauceCodePro Nerd Font"
style = "Bold"
[font.italic]
family = "SauceCodePro Nerd Font"
style = "Italic"
[cursor]
style = { shape = "Beam", blinking = "Off" }
unfocused_hollow = true
[selection]
save_to_clipboard = true
[colors.primary]
background = "#2E3440"
foreground = "#D8DEE9"
dim_foreground = "#A5ABB6"
bright_foreground = "#ECEFF4"
[colors.cursor]
text = "#2E3440"
cursor = "#D8DEE9"
[colors.vi_mode_cursor]
text = "#2E3440"
cursor = "#88C0D0"
[colors.search.matches]
foreground = "#2E3440"
background = "#EBCB8B"
[colors.search.focused_match]
foreground = "#2E3440"
background = "#A3BE8C"
[colors.footer_bar]
foreground = "#D8DEE9"
background = "#3B4252"
[colors.hints.start]
foreground = "#2E3440"
background = "#EBCB8B"
[colors.hints.end]
foreground = "#2E3440"
background = "#4C566A"
[colors.line_indicator]
foreground = "None"
background = "None"
[colors.normal]
black = "#3B4252"
red = "#BF616A"
green = "#A3BE8C"
yellow = "#EBCB8B"
blue = "#81A1C1"
magenta = "#B48EAD"
cyan = "#88C0D0"
white = "#E5E9F0"
[colors.bright]
black = "#4C566A"
red = "#BF616A"
green = "#A3BE8C"
yellow = "#EBCB8B"
blue = "#81A1C1"
magenta = "#B48EAD"
cyan = "#8FBCBB"
white = "#ECEFF4"
[colors.dim]
black = "#373E4D"
red = "#94545D"
green = "#809575"
yellow = "#B29E75"
blue = "#68809A"
magenta = "#8C738C"
cyan = "#6D96A5"
white = "#AEB3BB"

View File

@@ -1,368 +0,0 @@
# #######################################################################################
# AUTOGENERATED HYPRLAND CONFIG.
# EDIT THIS CONFIG ACCORDING TO THE WIKI INSTRUCTIONS.
# #######################################################################################
# This is an example Hyprland config file.
# Refer to the wiki for more information.
# https://wiki.hypr.land/Configuring/
# Please note not all available settings / options are set here.
# For a full list, see the wiki
# You can split this configuration into multiple files
# Create your files separately and then link them to this file like this:
# source = ~/.config/hypr/myColors.conf
################
### MONITORS ###
################
# See https://wiki.hypr.land/Configuring/Monitors/
source = ~/.config/hypr/monitors.conf
###################
### MY PROGRAMS ###
###################
# See https://wiki.hypr.land/Configuring/Keywords/
# Set programs that you use
$terminal = alacritty
$fileManager = thunar
$menu = wofi --show drun
#################
### AUTOSTART ###
#################
# Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this:
# exec-once = $terminal
# exec-once = nm-applet &
exec-once = waybar & hyprpaper
exec-once = /usr/lib/kdeconnectd
exec-once = kdeconnect-indicator
#############################
### ENVIRONMENT VARIABLES ###
#############################
# See https://wiki.hypr.land/Configuring/Environment-variables/
env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24
###################
### PERMISSIONS ###
###################
# See https://wiki.hypr.land/Configuring/Permissions/
# Please note permission changes here require a Hyprland restart and are not applied on-the-fly
# for security reasons
# ecosystem {
# enforce_permissions = 1
# }
# permission = /usr/(bin|local/bin)/grim, screencopy, allow
# permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow
# permission = /usr/(bin|local/bin)/hyprpm, plugin, allow
#####################
### LOOK AND FEEL ###
#####################
# Refer to https://wiki.hypr.land/Configuring/Variables/
# https://wiki.hypr.land/Configuring/Variables/#general
general {
gaps_in = 1
gaps_out = 1
border_size = 2
# Nord palette accents for borders:
# active gradient: frost blue -> deep frost
# inactive: muted polar night
col.active_border = rgba(88c0d0ee) rgba(5e81acee) 45deg
col.inactive_border = rgba(3b4252aa)
# Set to true enable resizing windows by clicking and dragging on borders and gaps
resize_on_border = true
# Please see https://wiki.hypr.land/Configuring/Tearing/ before you turn this on
allow_tearing = false
layout = dwindle
}
# https://wiki.hypr.land/Configuring/Variables/#decoration
decoration {
rounding = 0
rounding_power = 2
# Change transparency of focused and unfocused windows
active_opacity = 1.0
inactive_opacity = 1.0
shadow {
enabled = true
range = 4
render_power = 3
color = rgba(2e3440dd)
}
# https://wiki.hypr.land/Configuring/Variables/#blur
blur {
enabled = true
size = 3
passes = 1
vibrancy = 0.1696
}
}
# https://wiki.hypr.land/Configuring/Variables/#animations
animations {
enabled = yes, please :)
# Default curves, see https://wiki.hypr.land/Configuring/Animations/#curves
# NAME, X0, Y0, X1, Y1
bezier = easeOutQuint, 0.23, 1, 0.32, 1
bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1
bezier = linear, 0, 0, 1, 1
bezier = almostLinear, 0.5, 0.5, 0.75, 1
bezier = quick, 0.15, 0, 0.1, 1
# Default animations, see https://wiki.hypr.land/Configuring/Animations/
# NAME, ONOFF, SPEED, CURVE, [STYLE]
animation = global, 1, 10, default
animation = border, 1, 5.39, easeOutQuint
animation = windows, 1, 4.79, easeOutQuint
animation = windowsIn, 1, 4.1, easeOutQuint, popin 87%
animation = windowsOut, 1, 1.49, linear, popin 87%
animation = fadeIn, 1, 1.73, almostLinear
animation = fadeOut, 1, 1.46, almostLinear
animation = fade, 1, 3.03, quick
animation = layers, 1, 3.81, easeOutQuint
animation = layersIn, 1, 4, easeOutQuint, fade
animation = layersOut, 1, 1.5, linear, fade
animation = fadeLayersIn, 1, 1.79, almostLinear
animation = fadeLayersOut, 1, 1.39, almostLinear
animation = workspaces, 1, 1.94, almostLinear, fade
animation = workspacesIn, 1, 1.21, almostLinear, fade
animation = workspacesOut, 1, 1.94, almostLinear, fade
animation = zoomFactor, 1, 7, quick
}
# Ref https://wiki.hypr.land/Configuring/Workspace-Rules/
# "Smart gaps" / "No gaps when only"
# uncomment all if you wish to use that.
# workspace = w[tv1], gapsout:0, gapsin:0
# workspace = f[1], gapsout:0, gapsin:0
# windowrule {
# name = no-gaps-wtv1
# match:float = false
# match:workspace = w[tv1]
#
# border_size = 0
# rounding = 0
# }
#
# windowrule {
# name = no-gaps-f1
# match:float = false
# match:workspace = f[1]
#
# border_size = 0
# rounding = 0
# }
# See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more
dwindle {
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # You probably want this
}
# See https://wiki.hypr.land/Configuring/Master-Layout/ for more
master {
new_status = master
}
# https://wiki.hypr.land/Configuring/Variables/#misc
misc {
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :(
}
#############
### INPUT ###
#############
# https://wiki.hypr.land/Configuring/Variables/#input
input {
kb_layout = se
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
touchpad {
natural_scroll = false
}
}
# See https://wiki.hypr.land/Configuring/Gestures
gesture = 3, horizontal, workspace
# Example per-device config
# See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more
device {
name = epic-mouse-v1
sensitivity = -0.5
}
###################
### KEYBINDINGS ###
###################
# See https://wiki.hypr.land/Configuring/Keywords/
$mainMod = SUPER # Sets "Windows" key as main modifier
# Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more
bind = $mainMod, return, exec, $terminal
bind = $mainMod, C, killactive,
bind = $mainMod, M, exec, command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch exit
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, layoutmsg, togglesplit # dwindle
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Laptop multimedia keys for volume and LCD brightness
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
# Requires playerctl
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
##############################
### WINDOWS AND WORKSPACES ###
##############################
# See https://wiki.hypr.land/Configuring/Window-Rules/ for more
# See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules
# Example windowrules that are useful
windowrule {
# Ignore maximize requests from all apps. You'll probably like this.
name = suppress-maximize-events
match:class = .*
suppress_event = maximize
}
windowrule {
# Fix some dragging issues with XWayland
name = fix-xwayland-drags
match:class = ^$
match:title = ^$
match:xwayland = true
match:float = true
match:fullscreen = false
match:pin = false
no_focus = true
}
# Hyprland-run windowrule
windowrule {
name = move-hyprland-run
match:class = hyprland-run
move = 20 monitor_h-120
float = yes
}
windowrule {
name = float-nm-connection-editor
match:class = nm-connection-editor
float = yes
}
windowrule {
name = float-steam
match:class = ^([Ss]team)$
float = yes
}

View File

@@ -1,18 +0,0 @@
splash = false
wallpaper {
monitor = HDMI-A-1
path = /usr/share/backgrounds/nordic-wallpapers/archlinux.png
fit_mode = cover
}
wallpaper {
monitor = DP-2
path = /usr/share/backgrounds/nordic-wallpapers/archlinux.png
fit_mode = cover
}
wallpaper {
monitor = HDMI-A-2
path = /usr/share/backgrounds/nordic-wallpapers/archlinux.png
fit_mode = cover
}

View File

@@ -1,10 +0,0 @@
# Hyprland Monitor Configuration
# Generated by hyprmon
# Contains ALL configured monitors from all workspaces
monitor=desc:Dell Inc. DELL P2422H CY98FQ3,1920x1080@60.00,5360x0,1
monitor=desc:Dell Inc. DELL P2422HE HFKK5L3,1920x1080@60.00,0x0,1
monitor=desc:Microstep MEG 342C OLED,3440x1440@175.00,1920x0,1
# Fallback for unknown monitors
monitor=,preferred,auto,1

View File

@@ -1,85 +0,0 @@
{
"workspaces": [
{
"name": "Defaultmon-not-found",
"monitors": {
"desc:Dell Inc. DELL P2422H CY98FQ3": {
"resolution": "1920x1080",
"refresh_rate": 60.0,
"scale": 1.0,
"rotation": 0,
"position_x": 5360,
"position_y": 0,
"is_primary": false
},
"desc:Dell Inc. DELL P2422HE HFKK5L3": {
"resolution": "1920x1080",
"refresh_rate": 60.0,
"scale": 1.0,
"rotation": 0,
"position_x": 0,
"position_y": 0,
"is_primary": false
},
"desc:Microstep MEG 342C OLED": {
"resolution": "3440x1440",
"refresh_rate": 175.0,
"scale": 1.0,
"rotation": 0,
"position_x": 1920,
"position_y": 0,
"is_primary": true
}
}
},
{
"name": "l -ba /home/zphinx/.",
"monitors": {}
},
{
"name": "d /home/zphinx/code/",
"monitors": {}
},
{
"name": " echo \"$p :: syml",
"monitors": {}
},
{
"name": " echo \"$p :: file",
"monitors": {}
},
{
"name": "g\" 2>/dev/null || tr",
"monitors": {}
},
{
"name": "x/.config/waybar/scr",
"monitors": {}
},
{
"name": "x/code/mine status -",
"monitors": {}
},
{
"name": "ohup waybar -c /home",
"monitors": {}
},
{
"name": "eline -- dotfiles/.c",
"monitors": {}
},
{
"name": "s-serif' && fc-match",
"monitors": {}
},
{
"name": "eeded ttf-fira-code ",
"monitors": {}
},
{
"name": " /home/zphinx/.confi",
"monitors": {}
}
],
"active_workspace": 12
}

View File

@@ -1,121 +0,0 @@
// -*- mode: jsonc -*-
{
"height": 30,
"spacing": 4,
"modules-left": [
"hyprland/workspaces",
"hyprland/window"
],
"modules-center": [
"clock"
],
"modules-right": [
"custom/spotify",
"custom/weather",
"custom/screenshot",
"idle_inhibitor",
"pulseaudio",
"network",
"custom/mount-data",
"custom/mount-usb1",
"cpu",
"tray"
],
"hyprland/workspaces": {
"format": "{id}"
},
"custom/screenshot": {
"exec": "printf '{\"text\": \"<span foreground=\\\"#E5E9F0\\\">Shot</span> <span font_desc=\\\"SauceCodePro Nerd Font 17\\\" foreground=\\\"#FFFFFF\\\">󰄀</span>\", \"tooltip\": \"Area screenshot: edit in Swappy, then choose save path and filename; Esc on filename uses screenshot\"}'",
"return-type": "json",
"escape": false,
"interval": "once",
"on-click": "$HOME/.config/waybar/scripts/capture-share-shot.sh"
},
"idle_inhibitor": {
"escape": false,
"format": "{icon}",
"format-icons": {
"activated": "<span foreground=\"#A3BE8C\">Awake</span> <span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#A3BE8C\"></span>",
"deactivated": "<span foreground=\"#D8DEE9\">Idle</span> <span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#81A1C1\"></span>"
}
},
"tray": {
"spacing": 10
},
"clock": {
"escape": false,
"format": "<span foreground=\"#D8DEE9\">{:%H:%M}</span> <span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#88C0D0\"></span>",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "<span foreground=\"#D8DEE9\">{:%Y-%m-%d}</span> <span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#81A1C1\"></span>"
},
"custom/spotify": {
"exec": "bash $HOME/.config/waybar/scripts/spotify-waybar.sh",
"return-type": "json",
"interval": 2,
"escape": false,
"on-click": "bash $HOME/.config/waybar/scripts/spotify-waybar.sh --toggle",
"on-click-right": "bash $HOME/.config/waybar/scripts/spotify-waybar.sh --stop",
"on-scroll-up": "bash $HOME/.config/waybar/scripts/spotify-waybar.sh --next",
"on-scroll-down": "bash $HOME/.config/waybar/scripts/spotify-waybar.sh --prev",
"tooltip": false
},
"custom/weather": {
"exec": "bash $HOME/.config/waybar/scripts/weather-norrkoping.sh",
"return-type": "json",
"interval": 600,
"escape": false,
"tooltip": true
},
"cpu": {
"escape": false,
"format": "<span foreground=\"#D8DEE9\">{usage}%</span> <span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#81A1C1\"></span>",
"tooltip": false,
"on-click": "alacritty -e btop"
},
"custom/mount-data": {
"exec": "$HOME/.config/waybar/scripts/check-mount.sh /mnt/data data",
"return-type": "json",
"escape": false,
"interval": 10,
"tooltip": true,
"on-click": "thunar /mnt/data"
},
"custom/mount-usb1": {
"exec": "$HOME/.config/waybar/scripts/check-mount.sh /mnt/usb1 usb1",
"return-type": "json",
"escape": false,
"interval": 10,
"tooltip": true,
"on-click": "thunar /mnt/usb1"
},
"network": {
"escape": false,
"format-wifi": "<span foreground=\"#D8DEE9\">{essid} ({signalStrength}%)</span> <span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#88C0D0\"></span>",
"format-ethernet": "<span foreground=\"#D8DEE9\">{ipaddr}/{cidr}</span> <span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#88C0D0\">󰈀</span>",
"tooltip-format": "<span foreground=\"#D8DEE9\">{ifname} via {gwaddr}</span> <span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#88C0D0\">󰈀</span>",
"format-linked": "<span foreground=\"#D8DEE9\">{ifname} (No IP)</span> <span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#81A1C1\">󰈀</span>",
"format-disconnected": "<span foreground=\"#EBCB8B\">Disconnected</span> <span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#BF616A\">󰖪</span>",
"format-alt": "<span foreground=\"#D8DEE9\">{ifname}: {ipaddr}/{cidr}</span> <span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#88C0D0\">󰈀</span>",
"on-click-right": "nm-connection-editor"
},
"pulseaudio": {
"escape": false,
"format": "<span foreground=\"#D8DEE9\">{volume}%</span> {format_source} {icon}",
"format-bluetooth": "<span foreground=\"#D8DEE9\">{volume}%</span> <span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#81A1C1\"></span> {format_source} {icon}",
"format-bluetooth-muted": "{format_source} <span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#81A1C1\"></span> {icon} <span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#D08770\"></span>",
"format-muted": "{format_source} <span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#D08770\"></span>",
"format-source": "<span foreground=\"#D8DEE9\">{volume}%</span> <span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#B48EAD\"></span>",
"format-source-muted": "<span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#D08770\"></span>",
"format-icons": {
"headphone": "<span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#B48EAD\"></span>",
"hands-free": "<span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#B48EAD\"></span>",
"headset": "<span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#B48EAD\"></span>",
"phone": "<span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#B48EAD\"></span>",
"portable": "<span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#B48EAD\"></span>",
"car": "<span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#B48EAD\"></span>",
"default": ["<span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#B48EAD\"></span>", "<span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#B48EAD\"></span>", "<span font_desc=\"SauceCodePro Nerd Font 15\" foreground=\"#B48EAD\"></span>"]
},
"on-click": "pavucontrol"
}
}

View File

@@ -1,103 +0,0 @@
#!/usr/bin/bash
set -euo pipefail
base_dir="/mnt/data/media/share/pictures"
tmp_file="$(mktemp --suffix=.png)"
selection_file="$(mktemp)"
cleanup() {
rm -f "$tmp_file" "$selection_file"
}
trap cleanup EXIT
trim_whitespace() {
local value="$1"
value="${value#"${value%%[![:space:]]*}"}"
value="${value%"${value##*[![:space:]]}"}"
printf '%s\n' "$value"
}
choose_destination_dir() {
if [[ ! -d "$base_dir" ]] || ! mountpoint -q /mnt/data; then
return 1
fi
{
printf '/\n'
find "$base_dir" -mindepth 1 -type d -printf '%P\n' | sort
} > "$selection_file"
if selected=$(wofi --dmenu --prompt 'Save screenshot path' < "$selection_file"); then
if [[ -z "$selected" || "$selected" == "/" ]]; then
printf '%s\n' "$base_dir"
else
printf '%s/%s\n' "$base_dir" "$selected"
fi
return 0
fi
printf '%s\n' "$base_dir"
}
choose_filename() {
local default_name="screenshot"
local selected=""
if selected=$(printf '%s\n' "$default_name" | wofi --dmenu --prompt 'Save screenshot filename'); then
selected=$(trim_whitespace "$selected")
else
selected="$default_name"
fi
if [[ -z "$selected" ]]; then
selected="$default_name"
fi
selected="${selected%.png}"
if [[ -z "$selected" ]]; then
selected="$default_name"
fi
printf '%s\n' "$selected"
}
build_unique_path() {
local destination_dir="$1"
local file_stem="$2"
local candidate="$destination_dir/$file_stem.png"
local counter=1
if [[ ! -e "$candidate" ]]; then
printf '%s\n' "$candidate"
return
fi
while [[ -e "$destination_dir/$file_stem-$counter.png" ]]; do
counter=$((counter + 1))
done
printf '%s\n' "$destination_dir/$file_stem-$counter.png"
}
if ! region="$(slurp)"; then
exit 0
fi
if ! grim -g "$region" - | swappy -f - -o "$tmp_file"; then
exit 1
fi
wl-copy --type image/png < "$tmp_file"
if destination_dir="$(choose_destination_dir)"; then
mkdir -p "$destination_dir"
file_stem="$(choose_filename)"
destination_path="$(build_unique_path "$destination_dir" "$file_stem")"
cp "$tmp_file" "$destination_path"
notify-send 'Screenshot saved' "$destination_path
Copied to clipboard"
else
notify-send 'Screenshot copied' 'NAS picture share is not available; image copied to clipboard only'
fi

View File

@@ -1,43 +0,0 @@
#!/usr/bin/bash
# Usage: check-mount.sh <mountpoint> <label>
# Outputs Waybar custom module JSON
MOUNT="$1"
LABEL="$2"
ICON_MOUNT="󰋊"
ICON_DOWN=""
json_escape() {
local s="$1"
s=${s//\\/\\\\}
s=${s//\"/\\\"}
s=${s//$'\n'/\\n}
printf '%s' "$s"
}
markup_escape() {
local s="$1"
s=${s//&/&amp;}
s=${s//</&lt;}
s=${s//>/&gt;}
printf '%s' "$s"
}
icon_markup() {
local icon="$1"
local color="$2"
printf '<span font_desc="SauceCodePro Nerd Font 15" foreground="%s">%s</span>' "$color" "$icon"
}
if mountpoint -q "$MOUNT"; then
read -r used avail pcent <<< "$(df -h --output=used,avail,pcent "$MOUNT" | tail -1)"
text="<span foreground=\"#D8DEE9\">$(markup_escape "$LABEL $used/$avail ($pcent)")</span> $(icon_markup "$ICON_MOUNT" "#A3BE8C")"
tooltip="$(markup_escape "$MOUNT mounted - used: $used, free: $avail ($pcent)")"
printf '{"text":"%s","tooltip":"%s","class":"mounted"}\n' \
"$(json_escape "$text")" "$(json_escape "$tooltip")"
else
text="<span foreground=\"#EBCB8B\">$(markup_escape "$LABEL N/A")</span> $(icon_markup "$ICON_DOWN" "#BF616A")"
tooltip="$(markup_escape "$MOUNT is NOT mounted")"
printf '{"text":"%s","tooltip":"%s","class":"unmounted"}\n' \
"$(json_escape "$text")" "$(json_escape "$tooltip")"
fi

View File

@@ -1,53 +0,0 @@
#!/usr/bin/bash
set -euo pipefail
mode="${1:-status}"
read -r mem_total mem_used swap_total swap_used <<EOF
$(free -b | awk '
/^Mem:/ { mem_total=$2; mem_used=$3 }
/^Swap:/ { swap_total=$2; swap_used=$3 }
END { printf "%s %s %s %s\n", mem_total, mem_used, swap_total, swap_used }
')
EOF
format_bytes() {
numfmt --to=iec-i --suffix=B --format='%.1f' "$1"
}
mem_used_h="$(format_bytes "$mem_used")"
mem_total_h="$(format_bytes "$mem_total")"
mem_pct="$(awk -v used="$mem_used" -v total="$mem_total" 'BEGIN { if (total > 0) printf "%.1f", (used/total)*100; else print "0.0" }')"
if [[ "$swap_total" -gt 0 ]]; then
swap_used_h="$(format_bytes "$swap_used")"
swap_total_h="$(format_bytes "$swap_total")"
swap_pct="$(awk -v used="$swap_used" -v total="$swap_total" 'BEGIN { if (total > 0) printf "%.1f", (used/total)*100; else print "0.0" }')"
else
swap_used_h="0.0B"
swap_total_h="0.0B"
swap_pct="0.0"
fi
case "$mode" in
ram)
notify-send "RAM usage" "${mem_used_h} / ${mem_total_h} (${mem_pct}%)"
;;
swap)
if [[ "$swap_total" -gt 0 ]]; then
notify-send "Swap usage" "${swap_used_h} / ${swap_total_h} (${swap_pct}%)"
else
notify-send "Swap usage" "Swap is disabled"
fi
;;
status)
if [[ "$swap_total" -gt 0 ]]; then
tooltip="Left click: RAM (${mem_used_h}/${mem_total_h}, ${mem_pct}%)\nRight click: Swap (${swap_used_h}/${swap_total_h}, ${swap_pct}%)"
else
tooltip="Left click: RAM (${mem_used_h}/${mem_total_h}, ${mem_pct}%)\nRight click: Swap (disabled)"
fi
printf '{"text":"","tooltip":"%s"}\n' "$tooltip"
;;
esac

View File

@@ -1,218 +0,0 @@
#!/usr/bin/env bash
set -u
CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/waybar-spotify"
ART_URL_FILE="$CACHE_DIR/art_url"
ART_FILE="$CACHE_DIR/cover.jpg"
PLAYER=""
mkdir -p "$CACHE_DIR"
json_escape() {
local s="$1"
s=${s//\\/\\\\}
s=${s//\"/\\\"}
s=${s//$'\n'/\\n}
printf '%s' "$s"
}
markup_escape() {
local s="$1"
s=${s//&/&amp;}
s=${s//</&lt;}
s=${s//>/&gt;}
printf '%s' "$s"
}
icon_markup() {
local icon="$1"
local color="$2"
printf '<span font_desc="SauceCodePro Nerd Font 15" foreground="%s">%s</span>' "$color" "$icon"
}
truncate_text() {
local text="$1"
local max_len="$2"
if (( ${#text} <= max_len )); then
printf '%s' "$text"
return
fi
printf '%s...' "${text:0:max_len-3}"
}
pick_player() {
local candidates
local p
local c
mapfile -t candidates < <(playerctl -l 2>/dev/null)
if (( ${#candidates[@]} == 0 )); then
return 1
fi
for c in spotify spotifyd ncspot nspot; do
for p in "${candidates[@]}"; do
if [[ "$p" == "$c" || "$p" == "$c."* ]]; then
PLAYER="$p"
return 0
fi
done
done
PLAYER="${candidates[0]}"
return 0
}
download_cover_if_needed() {
local art_url="$1"
if [[ -z "$art_url" ]]; then
return
fi
local old_url=""
if [[ -f "$ART_URL_FILE" ]]; then
old_url=$(cat "$ART_URL_FILE" 2>/dev/null)
fi
if [[ "$art_url" == "$old_url" ]]; then
return
fi
printf '%s' "$art_url" > "$ART_URL_FILE"
if [[ "$art_url" == file://* ]]; then
local local_path="${art_url#file://}"
if [[ -f "$local_path" ]]; then
cp -f "$local_path" "$ART_FILE" 2>/dev/null || true
fi
return
fi
if command -v curl >/dev/null 2>&1; then
curl -LfsS --max-time 4 "$art_url" -o "$ART_FILE" 2>/dev/null || true
fi
}
open_cover() {
if [[ -f "$ART_FILE" ]]; then
xdg-open "$ART_FILE" >/dev/null 2>&1 &
fi
}
control_player() {
local action="$1"
case "$action" in
--toggle)
playerctl -p "$PLAYER" play-pause >/dev/null 2>&1 || true
;;
--next)
playerctl -p "$PLAYER" next >/dev/null 2>&1 || true
;;
--prev)
playerctl -p "$PLAYER" previous >/dev/null 2>&1 || true
;;
--stop)
playerctl -p "$PLAYER" stop >/dev/null 2>&1 || true
;;
--open-art)
open_cover
;;
esac
}
if [[ $# -gt 0 ]]; then
control_player "$1"
exit 0
fi
if ! command -v playerctl >/dev/null 2>&1; then
printf '{"text":"%s","tooltip":"playerctl missing: install playerctl for media controls","class":"idle","alt":"idle"}\n' "$(json_escape "$(icon_markup "" "#A3BE8C")")"
exit 0
fi
if ! pick_player; then
printf '{"text":"%s","tooltip":"No active player","class":"idle","alt":"idle"}\n' "$(json_escape "$(icon_markup "" "#A3BE8C")")"
exit 0
fi
status=$(playerctl -p "$PLAYER" status 2>/dev/null || true)
if [[ -z "$status" ]]; then
printf '{"text":"%s","tooltip":"No active player status","class":"idle","alt":"idle"}\n' "$(json_escape "$(icon_markup "" "#A3BE8C")")"
exit 0
fi
title=$(playerctl -p "$PLAYER" metadata xesam:title 2>/dev/null || true)
artist=$(playerctl -p "$PLAYER" metadata xesam:artist 2>/dev/null || true)
album=$(playerctl -p "$PLAYER" metadata xesam:album 2>/dev/null || true)
art_url=$(playerctl -p "$PLAYER" metadata mpris:artUrl 2>/dev/null || true)
state_class=$(printf '%s' "$status" | tr '[:upper:]' '[:lower:]')
if [[ "$state_class" == "stopped" ]]; then
text_markup="<span foreground=\"#D8DEE9\">Stopped</span> $(icon_markup "" "#D08770") $(icon_markup "" "#A3BE8C")"
printf '{"text":"%s","class":"stopped","alt":"stopped"}\n' "$(json_escape "$text_markup")"
exit 0
fi
if [[ -z "$artist" && -z "$title" ]]; then
printf '{"text":"%s","class":"idle","alt":"idle"}\n' "$(json_escape "$(icon_markup "" "#A3BE8C")")"
exit 0
fi
if [[ -z "$title" ]]; then
title="Unknown title"
fi
if [[ -z "$artist" ]]; then
artist="Unknown artist"
fi
if [[ -z "$album" ]]; then
album="Unknown album"
fi
download_cover_if_needed "$art_url"
display_track="$(truncate_text "$artist - $title" 52)"
state_icon=""
if [[ "$state_class" == "paused" ]]; then
state_icon=""
fi
app_icon=""
if [[ "$PLAYER" == spotify* || "$PLAYER" == spotifyd* || "$PLAYER" == *ncspot* || "$PLAYER" == *nspot* ]]; then
app_icon=""
fi
track_color="#ECEFF4"
state_color="#88C0D0"
app_color="#A3BE8C"
if [[ "$state_class" == "paused" ]]; then
track_color="#E5E9F0"
state_color="#EBCB8B"
fi
cover_line="Cover art: unavailable"
if [[ -f "$ART_FILE" ]]; then
cover_line="Cover art: cached (right-click opens image)"
fi
tooltip=$(cat <<EOF
$artist
$title
$album
$status
Player: $PLAYER
$cover_line
Left click: play/pause | Scroll: next/prev
EOF
)
text_markup="<span foreground=\"$track_color\">$(markup_escape "$display_track")</span> $(icon_markup "$state_icon" "$state_color") $(icon_markup "$app_icon" "$app_color")"
printf '{"text":"%s","tooltip":"%s","class":"%s","alt":"%s"}\n' \
"$(json_escape "$text_markup")" \
"$(json_escape "$tooltip")" \
"$(json_escape "$state_class")" \
"$(json_escape "$state_class")"

View File

@@ -1,88 +0,0 @@
#!/usr/bin/env bash
set -u
LOCATION="Norrkoping"
URL="https://wttr.in/${LOCATION}?format=%t|%C"
json_escape() {
local s="$1"
s=${s//\\/\\\\}
s=${s//\"/\\\"}
s=${s//$'\n'/\\n}
printf '%s' "$s"
}
markup_escape() {
local s="$1"
s=${s//&/&amp;}
s=${s//</&lt;}
s=${s//>/&gt;}
printf '%s' "$s"
}
icon_markup() {
local icon="$1"
local color="$2"
printf '<span font_desc="SauceCodePro Nerd Font 15" foreground="%s">%s</span>' "$color" "$icon"
}
icon_for_condition() {
local c
c=$(printf '%s' "$1" | tr '[:upper:]' '[:lower:]')
case "$c" in
*thunder*|*storm*)
printf '󰖓'
;;
*snow*|*sleet*|*blizzard*|*ice*)
printf '󰼶'
;;
*rain*|*drizzle*|*shower*)
printf '󰖗'
;;
*fog*|*mist*|*haze*|*smoke*)
printf '󰖑'
;;
*partly*)
printf '󰖕'
;;
*clear*|*sunny*)
printf '󰖙'
;;
*cloud*|*overcast*)
printf '󰖐'
;;
*)
printf '󰖐'
;;
esac
}
if ! command -v curl >/dev/null 2>&1; then
text="<span foreground=\"#EBCB8B\">--°C Unavailable</span> $(icon_markup "󰖐" "#D08770")"
printf '{"text":"%s","tooltip":"curl is required for weather","class":"weather-unavailable"}\n' "$(json_escape "$text")"
exit 0
fi
raw=$(curl -fsS --max-time 6 "$URL" 2>/dev/null || true)
if [[ -z "$raw" || "$raw" != *"|"* ]]; then
text="<span foreground=\"#EBCB8B\">--°C Unavailable</span> $(icon_markup "󰖐" "#D08770")"
printf '{"text":"%s","tooltip":"Weather unavailable for Norrkoping","class":"weather-unavailable"}\n' "$(json_escape "$text")"
exit 0
fi
temp=${raw%%|*}
condition=${raw#*|}
icon=$(icon_for_condition "$condition")
updated=$(date '+%H:%M')
text="<span foreground=\"#D8DEE9\">$(markup_escape "$temp $condition")</span> $(icon_markup "$icon" "#88C0D0")"
tooltip=$(cat <<EOF
Norrkoping, Sweden
$temp - $condition
Updated: $updated
EOF
)
printf '{"text":"%s","tooltip":"%s","class":"weather"}\n' \
"$(json_escape "$text")" \
"$(json_escape "$tooltip")"

View File

@@ -1,169 +0,0 @@
* {
border: none;
border-radius: 10px;
font-family: "Ubuntu", "SauceCodePro Nerd Font", "SauceCodePro Nerd Font Mono", "Symbols Nerd Font Mono", "Symbols Nerd Font", "Font Awesome 7 Free", sans-serif;
font-size: 14px;
min-height: 0;
}
window#waybar {
background: #2e3440;
color: #eceff4;
border-bottom: 2px solid #5e81ac;
}
tooltip {
background: #3b4252;
color: #eceff4;
border: 1px solid #4c566a;
}
#workspaces {
background: #3b4252;
padding: 2px 6px;
margin: 4px 3px;
border: 1px solid #4c566a;
}
#workspaces button {
color: #d8dee9;
background: transparent;
padding: 2px 10px;
margin: 0 2px;
}
#workspaces button:hover {
background: #434c5e;
}
#workspaces button.active {
color: #2e3440;
background: #88c0d0;
}
#workspaces button.urgent {
color: #eceff4;
background: #bf616a;
}
#window,
#custom-spotify,
#custom-weather,
#clock,
#custom-screenshot,
#idle_inhibitor,
#pulseaudio,
#network,
#cpu,
#memory,
#tray,
#custom-mount-data,
#custom-mount-usb1 {
background: #3b4252;
color: #e5e9f0;
padding: 0 10px;
margin: 4px 3px;
border: 1px solid #4c566a;
}
#clock {
background: #34425a;
color: #eceff4;
border-color: #81a1c1;
}
#custom-spotify {
background: #3a4a3f;
color: #eceff4;
font-weight: 600;
border-color: #a3be8c;
}
#custom-spotify.paused {
background: #5b4f3b;
color: #eceff4;
border-color: #d08770;
}
#custom-spotify.stopped,
#custom-spotify.idle {
background: #4c566a;
color: #d8dee9;
border-color: #616e88;
}
#custom-weather {
background: #34504f;
color: #eceff4;
font-weight: 600;
border-color: #88c0d0;
}
#custom-screenshot {
background: #34425a;
color: #eceff4;
font-weight: 700;
border-color: #88c0d0;
}
#cpu,
#memory {
background: #384b5e;
color: #eceff4;
border-color: #5e81ac;
}
#network {
background: #2f4f5a;
color: #eceff4;
border-color: #81a1c1;
}
#network.disconnected {
color: #eceff4;
background: #5a3942;
border-color: #d08770;
}
#pulseaudio {
background: #4b4256;
color: #eceff4;
border-color: #b48ead;
}
#pulseaudio.muted {
color: #eceff4;
background: #5a433f;
border-color: #d08770;
}
#idle_inhibitor.activated {
color: #eceff4;
background: #3a4a3f;
border-color: #a3be8c;
}
#idle_inhibitor.deactivated {
color: #eceff4;
background: #34425a;
border-color: #81a1c1;
}
#custom-mount-data,
#custom-mount-usb1 {
font-weight: 600;
}
#custom-mount-data.mounted,
#custom-mount-usb1.mounted {
color: #eceff4;
background: #3a4a3f;
border-color: #a3be8c;
}
#custom-mount-data.unmounted,
#custom-mount-usb1.unmounted {
color: #eceff4;
background: #5a3942;
border-color: #d08770;
}

91
docker-compose.yml Normal file
View File

@@ -0,0 +1,91 @@
services:
sonarr:
image: linuxserver/sonarr:latest
container_name: sonarr
environment:
- PUID=1028
- PGID=65536
- TZ=Europe/Stockholm
- UMASK=022
volumes:
- /volume1/docker/sonarr:/config
- /volume1/data:/data
ports:
- 8989:8989/tcp
network_mode: synobridge
security_opt:
- no-new-privileges:true
restart: always
lidarr:
image: linuxserver/lidarr:latest
container_name: lidarr
environment:
- PUID=1028
- PGID=65536
- TZ=Europe/Stockholm
- UMASK=022
volumes:
- /volume1/docker/lidarr:/config
- /volume1/data:/data
ports:
- 8686:8686/tcp
network_mode: synobridge
security_opt:
- no-new-privileges:true
restart: always
radarr:
image: linuxserver/radarr:latest
container_name: radarr
environment:
- PUID=1028
- PGID=65536
- TZ=Europe/Stockholm
- UMASK=022
volumes:
- /volume1/docker/radarr:/config
- /volume1/data:/data
ports:
- 7878:7878/tcp
network_mode: synobridge
security_opt:
- no-new-privileges:true
restart: always
bazarr:
image: linuxserver/bazarr:latest
container_name: bazarr
environment:
- PUID=1028
- PGID=65536
- TZ=Europe/Stockholm
- UMASK=022
volumes:
- /volume1/docker/bazarr:/config
- /volume1/data/:/data
ports:
- 6767:6767/tcp
network_mode: synobridge
security_opt:
- no-new-privileges:true
restart: always
profilarr:
image: santiagosayshey/profilarr:latest
container_name: profilarr
ports:
- 6868:6868
volumes:
- /volume1/docker/profilarr:/config
environment:
- PUID=1028
- PGID=65536
- TZ=Europe/Stockholm
- UMASK=022
network_mode: synobridge
security_opt:
- no-new-privileges:true
restart: unless-stopped

View File

@@ -1,293 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
# Arch Linux bootstrap for this dotfiles setup.
# Installs the packages required by configs in this repository.
if ! command -v pacman >/dev/null 2>&1; then
echo "This installer currently supports Arch Linux (pacman) only."
exit 1
fi
PACKAGES=(
# Core desktop/session
hyprland
hyprpaper
waybar
xdg-desktop-portal
xdg-desktop-portal-hyprland
# Terminal + launcher + file manager
alacritty
wofi
thunar
# Audio/network/system controls used by config
pipewire
wireplumber
pavucontrol
playerctl
brightnessctl
networkmanager
network-manager-applet
# Wayland screenshot stack + notifications
grim
slurp
swappy
wl-clipboard
libnotify
# Utilities used by scripts/config
curl
btop
tmux
fzf
xclip
kdeconnect
)
REQUIRED_COMMANDS=(
hyprland
hyprpaper
waybar
alacritty
wofi
thunar
wpctl
playerctl
brightnessctl
grim
slurp
swappy
wl-copy
notify-send
curl
btop
)
echo "Installing packages for dotfiles setup..."
sudo pacman -S --needed --noconfirm "${PACKAGES[@]}"
missing=()
for cmd in "${REQUIRED_COMMANDS[@]}"; do
if ! command -v "$cmd" >/dev/null 2>&1; then
missing+=("$cmd")
fi
done
if (( ${#missing[@]} > 0 )); then
echo
echo "Install completed, but these commands are still missing:"
printf ' - %s\n' "${missing[@]}"
echo "Check package names/repos on your system and install them manually."
exit 2
fi
echo
echo "Install complete."
echo "Next steps:"
echo "1) Symlink/copy dotfiles into ~/.config and ~/.tmux.conf"
echo "2) Enable/start NetworkManager if needed: sudo systemctl enable --now NetworkManager"
echo "3) Start Hyprland"
#!/usr/bin/env bash
# install.sh — bootstrap dotfiles on a fresh Arch/CachyOS install
# Usage: ./install.sh [--dry-run]
set -euo pipefail
DOTFILES="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DRY_RUN=false
[[ "${1:-}" == "--dry-run" ]] && DRY_RUN=true
# -------------------------------------------------------
# Helpers
# -------------------------------------------------------
info() { echo -e "\e[34m[INFO]\e[0m $*"; }
ok() { echo -e "\e[32m[ OK ]\e[0m $*"; }
warn() { echo -e "\e[33m[WARN]\e[0m $*"; }
error() { echo -e "\e[31m[ERR ]\e[0m $*"; }
dry() { echo -e "\e[90m[DRY ]\e[0m $*"; }
run() {
if $DRY_RUN; then
dry "$*"
else
"$@"
fi
}
# -------------------------------------------------------
# 1. Check: Wayland / Hyprland environment
# -------------------------------------------------------
info "Checking display server..."
if [[ -z "${WAYLAND_DISPLAY:-}" && -z "${XDG_SESSION_TYPE:-}" ]]; then
warn "WAYLAND_DISPLAY not set — are you running a Wayland session?"
elif [[ "${XDG_SESSION_TYPE:-}" == "x11" ]]; then-
warn "Session type is X11. Hyprland and Waybar require Wayland."
else
ok "Wayland session detected (${XDG_SESSION_TYPE:-wayland})"
fi
# -------------------------------------------------------
# 2. Check: Required programs
# -------------------------------------------------------
info "Checking required programs..."
REQUIRED=(
hyprland
waybar
hyprpaper
alacritty
grim
slurp
swappy
wl-copy
wofi
thunar
btop
nm-connection-editor
kdeconnect-indicator
expac
pavucontrol
notify-send
)
MISSING=()
for cmd in "${REQUIRED[@]}"; do
if command -v "$cmd" &>/dev/null; then
ok " $cmd"
else
warn " $cmd — NOT FOUND"
MISSING+=("$cmd")
fi
done
if [[ ${#MISSING[@]} -gt 0 ]]; then
warn "Missing programs: ${MISSING[*]}"
read -rp "Install missing packages with yay now? [y/N] " ans
if [[ "${ans,,}" == "y" ]]; then
run yay -S --needed "${MISSING[@]}"
else
warn "Skipping package install — some features may not work."
fi
else
ok "All required programs found."
fi
# -------------------------------------------------------
# 3. Check: Required fonts
# -------------------------------------------------------
info "Checking fonts..."
FONTS=(
ttf-sourcecodepro-nerd
ttf-nerd-fonts-symbols
ttf-nerd-fonts-symbols-mono
otf-font-awesome
)
MISSING_FONTS=()
for pkg in "${FONTS[@]}"; do
if pacman -Q "$pkg" &>/dev/null; then
ok " $pkg"
else
warn " $pkg — NOT INSTALLED"
MISSING_FONTS+=("$pkg")
fi
done
if [[ ${#MISSING_FONTS[@]} -gt 0 ]]; then
read -rp "Install missing fonts with yay now? [y/N] " ans
if [[ "${ans,,}" == "y" ]]; then
run yay -S --needed "${MISSING_FONTS[@]}"
run fc-cache -fv
else
warn "Skipping font install — icons in Waybar may not render."
fi
else
ok "All required fonts installed."
fi
# -------------------------------------------------------
# 4. Symlinks
# -------------------------------------------------------
info "Creating symlinks..."
symlink() {
local src="$1"
local dst="$2"
local parent
parent="$(dirname "$dst")"
if [[ ! -e "$src" ]]; then
error "Source does not exist: $src — skipping"
return
fi
run mkdir -p "$parent"
if [[ -L "$dst" ]]; then
local current
current="$(readlink "$dst")"
if [[ "$current" == "$src" ]]; then
ok " $dst (already linked)"
return
else
warn " $dst points elsewhere ($current) — relinking"
run ln -sfn "$src" "$dst"
fi
elif [[ -e "$dst" ]]; then
local bak="${dst}.bak.$(date +%Y%m%d_%H%M%S)"
warn " $dst exists — backing up to $bak"
run mv "$dst" "$bak"
run ln -s "$src" "$dst"
else
run ln -s "$src" "$dst"
ok " $dst$src"
fi
}
symlink "$DOTFILES/.bashrc" "$HOME/.bashrc"
symlink "$DOTFILES/.config/hypr" "$HOME/.config/hypr"
symlink "$DOTFILES/.config/waybar" "$HOME/.config/waybar"
symlink "$DOTFILES/.config/alacritty" "$HOME/.config/alacritty"
symlink "$DOTFILES/.local/bin/waybar" "$HOME/.local/bin/waybar"
# Ensure waybar scripts are executable
if [[ -d "$DOTFILES/.config/waybar/scripts" ]]; then
run chmod +x "$DOTFILES/.config/waybar/scripts/"*.sh
ok "Waybar scripts marked executable"
fi
# -------------------------------------------------------
# 5. Check: NAS mount points
# -------------------------------------------------------
info "Checking NAS mount points..."
for mnt in /mnt/data /mnt/usb1; do
if mountpoint -q "$mnt" 2>/dev/null; then
ok " $mnt is mounted"
elif [[ -d "$mnt" ]]; then
warn " $mnt exists but is not mounted"
else
warn " $mnt does not exist — Waybar mount checks will show unmounted"
run sudo mkdir -p "$mnt"
fi
done
# -------------------------------------------------------
# Done
# -------------------------------------------------------
echo ""
ok "Dotfiles installed! Start a new shell or run: source ~/.bashrc"
if command -v hyprland &>/dev/null; then
ok "Log out and back in to start Hyprland with Waybar."
fi