Compare commits

...
14 Commits
26 changed files with 376 additions and 264 deletions
+1 -9
View File
@@ -95,9 +95,6 @@ python3 -m py_compile ./home/bin/homeassistant.py
- Check command exit status: `if <command>; then ... fi`
- Redirect stderr appropriately: `2>/dev/null` or `2>&1`
### Configuration Files
- Before generating a commit, always consult `.agent/COMMITS.md` for the required style.
#### chezmoi Templates
- Dotfiles use chezmoi's templating system
- Template syntax: `{{ }}` for variables (Chezmoi specific)
@@ -111,12 +108,7 @@ python3 -m py_compile ./home/bin/homeassistant.py
## Repository Patterns
### Commit Message Format
Follow conventional commits style (all lowercase).
- `feat(scope): description` - New feature
- `fix(scope): description` - Bug fix
- `refactor(scope): description` - Code refactoring
- `docs(scope): description` - Documentation changes
- Example: `feat(zsh): update dotfiles` or `fix(scripts): use correct pass entry`
- Before generating a commit, always consult @.agents/COMMITS.md for the required style.
#### Pushing Remotes
- **Do not push git repositories to remote unless explicitly instructed.**
@@ -0,0 +1 @@
openai/gpt-5.6-luna-fast
@@ -22,15 +22,6 @@ function fixPulse() {
fi
}
# Start up programs that use audio.
function launchi3() {
if [ -z "$skipi3" ]; then
echo Opening i3wm sound workspaces
sleep .1 && i3-msg 'workspace 5; exec brave-browser'
#sleep 5.1 && python ~/bin/start-firefox.py
fi
}
# Set up sinks.
function setupSinks() {
pactl set-default-sink speakers
@@ -66,23 +57,12 @@ function restartWireplumber() {
systemctl --user restart wireplumber
}
# arg parser
for arg in "$@"
do
# Skip commands for i3wm
if [[ $arg == *"-s"* ]]; then
skipi3=true
fi
done
# Wire sinks
setupSinks
# Eurorack audio interface
sh ~/bin/audio/es9start.sh
launchi3
systemctl --user restart polybar
sleep 5
restartWireplumber
+50
View File
@@ -0,0 +1,50 @@
#!/bin/bash
# Restore Brave and place its windows after they finish opening.
preferences="$HOME/.config/BraveSoftware/Brave-Browser/Default/Preferences"
function enable_session_restore {
if [ ! -f "$preferences" ] || ! command -v jq &> /dev/null; then
return
fi
temp_file="$(mktemp "${preferences}.XXXXXX")"
if jq '.session.restore_on_startup = 1 | .profile.exit_type = "Normal"' \
"$preferences" > "$temp_file"; then
mv "$temp_file" "$preferences"
else
rm -f "$temp_file"
fi
}
enable_session_restore
if [ -n "$HYPRLAND_INSTANCE_SIGNATURE" ]; then
brave-browser --restore-last-session &
# Signal starts after Brave and can steal focus while its window is mapping.
# Wait for both startup windows, then make Brave the final focused window.
for _ in {1..80}; do
sleep 0.25
if hyprctl clients -j | jq -e '
any(.[]; .class == "brave-browser") and
any(.[]; .class == "org.signal.Signal")
' > /dev/null; then
sleep 0.5
break
fi
done
hyprctl eval \
'hl.dispatch(hl.dsp.focus({ workspace = "1" }))' > /dev/null
exit 0
fi
i3-msg 'workspace 9; append_layout ~/.config/i3/brave-workspace-9.json; workspace 5'
brave-browser --restore-last-session &
# Brave creates restored windows asynchronously and after startup focus has moved.
for _ in {1..20}; do
sleep 0.5
i3-msg '[class="^Brave-browser$" workspace="^(?!9$).*"] move to workspace 5' \
> /dev/null
done
-50
View File
@@ -1,50 +0,0 @@
$mainMod = SUPER
# Keybindings
bind = $mainMod, return, exec, $terminal
bind = $mainMod, Q, killactive,
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, V, togglefloating,
bind = $mainMod, D, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, L, exec, hyprlock
bind = $mainMod, F, fullscreen
# Move focus window
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Switch workspaces
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
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
# 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
+29
View File
@@ -0,0 +1,29 @@
local programs = require("env")
local main_mod = "SUPER"
hl.bind(main_mod .. " + return", hl.dsp.exec_cmd(programs.terminal))
hl.bind(main_mod .. " + Q", hl.dsp.window.close())
hl.bind(main_mod .. " + E", hl.dsp.exec_cmd(programs.file_manager))
hl.bind(main_mod .. " + V", hl.dsp.window.float({ action = "toggle" }))
hl.bind(main_mod .. " + D", hl.dsp.exec_cmd(programs.menu))
hl.bind(main_mod .. " + P", hl.dsp.window.pseudo())
hl.bind(main_mod .. " + J", hl.dsp.layout("togglesplit"))
hl.bind(main_mod .. " + L", hl.dsp.exec_cmd("hyprlock"))
hl.bind(main_mod .. " + F", hl.dsp.window.fullscreen())
hl.bind(main_mod .. " + left", hl.dsp.focus({ direction = "left" }))
hl.bind(main_mod .. " + right", hl.dsp.focus({ direction = "right" }))
hl.bind(main_mod .. " + up", hl.dsp.focus({ direction = "up" }))
hl.bind(main_mod .. " + down", hl.dsp.focus({ direction = "down" }))
for workspace = 1, 10 do
local key = workspace % 10
hl.bind(main_mod .. " + " .. key, hl.dsp.focus({ workspace = workspace }))
hl.bind(main_mod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = workspace }))
end
hl.bind(main_mod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
hl.bind(main_mod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
hl.bind(main_mod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
hl.bind(main_mod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
-17
View File
@@ -1,17 +0,0 @@
# Screen brightness controls
exec-once = light -N 1
bind = ,XF86MonBrightnessUp, exec, ~/bin/system/backlight-ctl.sh -i
bind = ,XF86MonBrightnessDown, exec, ~/bin/system/backlight-ctl.sh -d
# Pulse Audio controls
bind = ,XF86AudioRaiseVolume, exec, amixer set Master 3%+ #increase sound volume
bind = ,XF86AudioLowerVolume, exec, amixer set Master 3%- #decrease sound volume
bind = ,XF86AudioMute, exec, amixer set Master toggle # toggle sound
# Media controls
bind = ,XF86AudioPrev, exec, playerctl previous
bind = ,XF86AudioPlay, exec, playerctl play-pause
bind = ,XF86AudioNext, exec, playerctl next
# Lockscreen
bind = $mainMod, escape, exec, swaylock
+18
View File
@@ -0,0 +1,18 @@
local main_mod = "SUPER"
hl.on("hyprland.start", function()
hl.exec_cmd("light -N 1")
end)
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("~/bin/system/backlight-ctl.sh -i"))
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("~/bin/system/backlight-ctl.sh -d"))
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("amixer set Master 3%+"))
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("amixer set Master 3%-"))
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("amixer set Master toggle"))
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"))
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"))
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"))
hl.bind(main_mod .. " + escape", hl.dsp.exec_cmd("swaylock"))
-5
View File
@@ -1,5 +0,0 @@
# Programs
$terminal = alacritty
$fileManager = dolphin
$menu = rofi -show combi
$browser = brave-browser
+9
View File
@@ -0,0 +1,9 @@
hl.env("XCURSOR_SIZE", "24")
hl.env("QT_QPA_PLATFORMTHEME", "qt5ct")
return {
terminal = "alacritty",
file_manager = "dolphin",
menu = "rofi -show combi",
browser = "brave-browser",
}
-43
View File
@@ -1,43 +0,0 @@
general {
gaps_in = 5
gaps_out = 5
border_size = 2
col.active_border = rgba(e91e63ee) rgba(ffcdd2ee) 45deg
col.inactive_border = rgba(0288d1aa)
layout = dwindle
allow_tearing = false
}
decoration {
rounding = 5
blur {
enabled = true
size = 3
passes = 1
}
}
animations {
enabled = yes
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 3, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 2, default
}
dwindle {
pseudotile = yes
preserve_split = yes
force_split = 2
}
master {
orientation = right
}
gesture = 3, horizontal, workspace
+56
View File
@@ -0,0 +1,56 @@
hl.config({
general = {
gaps_in = 5,
gaps_out = 5,
border_size = 2,
col = {
active_border = {
colors = { "rgba(e91e63ee)", "rgba(ffcdd2ee)" },
angle = 45,
},
inactive_border = "rgba(0288d1aa)",
},
layout = "dwindle",
allow_tearing = false,
},
decoration = {
rounding = 5,
blur = {
enabled = true,
size = 3,
passes = 1,
},
},
animations = {
enabled = true,
},
dwindle = {
preserve_split = true,
force_split = 2,
},
master = {
orientation = "right",
},
})
hl.curve("myBezier", {
type = "bezier",
points = { { 0.05, 0.9 }, { 0.1, 1.05 } },
})
hl.animation({ leaf = "windows", enabled = true, speed = 3, bezier = "myBezier" })
hl.animation({ leaf = "windowsOut", enabled = true, speed = 7, bezier = "default", style = "popin 80%" })
hl.animation({ leaf = "border", enabled = true, speed = 10, bezier = "default" })
hl.animation({ leaf = "borderangle", enabled = true, speed = 8, bezier = "default" })
hl.animation({ leaf = "fade", enabled = true, speed = 7, bezier = "default" })
hl.animation({ leaf = "workspaces", enabled = true, speed = 2, bezier = "default" })
hl.gesture({
fingers = 3,
direction = "horizontal",
action = "workspace",
})
+21
View File
@@ -0,0 +1,21 @@
general {
lock_cmd = pidof hyprlock || hyprlock
before_sleep_cmd = loginctl lock-session
after_sleep_cmd = hyprctl dispatch dpms on
}
listener {
timeout = 300
on-timeout = loginctl lock-session
}
listener {
timeout = 600
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on
}
listener {
timeout = 1200
on-timeout = sh -c 'test "$(cat /sys/class/power_supply/ACAD/online)" = 0 && systemctl suspend'
}
-40
View File
@@ -1,40 +0,0 @@
monitor=eDP-1,2256x1504@60,auto,1.175
# Enviroment
source = ~/.config/hypr/env.conf
# Startup programs
source = ~/.config/hypr/startup-all.conf
source = ~/.config/hypr/startup-framework.conf
# Default env vars
env = XCURSOR_SIZE,24
env = QT_QPA_PLATFORMTHEME,qt5ct
source = ~/.config/hypr/general.conf
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = yes
}
sensitivity = 0
}
xwayland {
force_zero_scaling = true
}
misc {
force_default_wallpaper = 0
}
windowrulev2 = suppressevent maximize, class:.*
source = ~/.config/hypr/bind-all.conf
source = ~/.config/hypr/bind-framework.conf
+51
View File
@@ -0,0 +1,51 @@
hl.monitor({
output = "eDP-1",
mode = "2256x1504@60",
position = "auto",
scale = 1.175,
})
require("env")
require("startup-all")
require("startup-framework")
require("general")
hl.config({
input = {
kb_layout = "us",
kb_variant = "",
kb_model = "",
kb_options = "",
kb_rules = "",
follow_mouse = 1,
touchpad = {
natural_scroll = true,
},
sensitivity = 0,
},
xwayland = {
force_zero_scaling = true,
},
misc = {
force_default_wallpaper = 0,
},
})
hl.window_rule({
name = "suppress-maximize-events",
match = { class = ".*" },
suppress_event = "maximize",
})
hl.window_rule({
name = "signal-workspace",
match = { class = "^org\\.signal\\.Signal$" },
workspace = "10",
})
require("bind-all")
require("bind-framework")
+82 -59
View File
@@ -1,76 +1,99 @@
auth {
pam {
module = password-auth
}
fingerprint {
enabled = true
}
}
background {
monitor =
path = $HOME/.cache/blurred_wallpaper.png
path = $HOME/Pictures/wallpaper/0000.jpg
blur_size = 2
blur_passes = 1
noise = 0.01
contrast = 1.08
brightness = 0.68
vibrancy = 0.22
vibrancy_darkness = 0.15
}
label {
monitor =
text = cmd[update:1000] date +"%H:%M"
color = rgb(9DEBFF)
font_size = 104
font_family = Noto Sans Mono
position = 0, 230
halign = center
valign = center
shadow_passes = 3
shadow_size = 10
shadow_color = rgba(00D9FF55)
}
shape {
monitor =
size = 460, 2
color = rgb(00D9FF)
position = 0, 152
halign = center
valign = center
}
shape {
monitor =
size = 110, 2
color = rgb(FF2A9D)
position = 285, 152
halign = center
valign = center
}
label {
monitor =
text = // $USER
color = rgb(FF5CB8)
font_size = 18
font_family = Noto Sans Mono
position = 0, 112
halign = center
valign = center
shadow_passes = 2
shadow_size = 7
shadow_color = rgba(FF2A9D66)
}
input-field {
monitor =
size = 200, 50
outline_thickness = 3
dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
size = 340, 54
outline_thickness = 2
dots_size = 0.22
dots_spacing = 0.3
dots_center = true
dots_rounding = -1 # -1 default circle, -2 follow input-field rounding
outer_color = rgb(151515)
inner_color = rgb(FFFFFF)
font_color = rgb(10, 10, 10)
dots_rounding = -1
outer_color = rgb(00D9FF)
inner_color = rgba(3, 7, 18, 0.82)
font_color = rgb(FF5CB8)
fade_on_empty = true
fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered.
placeholder_text = <i>Input Password...</i> # Text rendered in the input box when it's empty.
fade_timeout = 1000
placeholder_text =
hide_input = false
rounding = -1 # -1 means complete rounding (circle/oval)
check_color = rgb(204, 136, 34)
fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty
fail_transition = 300 # transition time in ms between normal outer_color and fail_color
rounding = 4
check_color = rgb(FF2A9D)
fail_color = rgb(FF2A9D)
fail_text =
capslock_color = -1
numlock_color = -1
bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above)
bothlock_color = -1
invert_numlock = false # change color if numlock is off
swap_font_color = false # see below
position = 0, -20
position = 0, -35
halign = center
valign = center
}
label {
monitor =
#clock
text = cmd[update:1000] echo "$TIME"
color = rgba(200, 200, 200, 1.0)
font_size = 55
font_family = Fira Semibold
position = -100, 70
halign = right
valign = bottom
shadow_passes = 5
shadow_passes = 3
shadow_size = 10
}
label {
monitor =
text = $USER
color = rgba(200, 200, 200, 1.0)
font_size = 20
font_family = Fira Semibold
position = -100, 160
halign = right
valign = bottom
shadow_passes = 5
shadow_size = 10
}
image {
monitor =
path = $HOME/.cache/square_wallpaper.png
size = 280 # lesser side if not 1:1 ratio
rounding = -1 # negative values mean circle
border_size = 4
border_color = rgb(221, 221, 221)
rotate = 0 # degrees, counter-clockwise
reload_time = -1 # seconds between reloading, 0 to reload with SIGUSR2
# reload_cmd = # command to get new path. if empty, old path will be used. don't run "follow" commands like tail -F
position = 0, 200
halign = center
valign = center
shadow_color = rgba(00D9FF55)
}
-6
View File
@@ -1,6 +0,0 @@
# Password manager update
exec-once = pass git pull
# Start up script
exec-once = ~/bin/system/system-start.sh
+6
View File
@@ -0,0 +1,6 @@
hl.on("hyprland.start", function()
hl.exec_cmd("swaybg --image ~/Pictures/wallpaper/0000.jpg --mode fill")
hl.exec_cmd("pass git pull")
hl.exec_cmd("~/bin/system/system-start.sh")
hl.exec_cmd("hypridle")
end)
@@ -1,3 +0,0 @@
exec-once = [workspace 1 silent] $browser
exec-once = [workspace 2 silent] $terminal
exec-once = [workspace 10 silent] flatpak run org.signal.Signal
@@ -0,0 +1,7 @@
local programs = require("env")
hl.on("hyprland.start", function()
hl.exec_cmd("~/bin/start-brave.sh", { workspace = "1 silent" })
hl.exec_cmd(programs.terminal, { workspace = "2 silent" })
hl.exec_cmd("flatpak run org.signal.Signal", { workspace = "10 silent" })
end)
+32
View File
@@ -0,0 +1,32 @@
{
"border": "normal",
"floating": "auto_off",
"layout": "splitv",
"type": "con",
"nodes": [
{
"border": "pixel",
"floating": "auto_off",
"percent": 0.5,
"swallows": [
{
"class": "^Brave-browser$",
"title": ".*Music Assistant.*"
}
],
"type": "con"
},
{
"border": "pixel",
"floating": "auto_off",
"percent": 0.5,
"swallows": [
{
"class": "^Brave-browser$",
"title": ".*YouTube.*"
}
],
"type": "con"
}
]
}
+7 -6
View File
@@ -224,7 +224,8 @@ for_window [class="^Bitwig Studio$" title="^Bitwig Studio"] exec sh ~/bin/audio/
for_window [class="^Bitwig Studio$" title="^Bitwig Studio"] exec systemctl --user restart i3wm-close-window.service
#Other
for_window [class="Signal"] move to workspace $wsSignal
for_window [class="Signal"] move to workspace $wsSignal; urgent disable
for_window [class="^Brick$"] move to workspace $ws2
#bindsym $mod+F5 gaps inner current set 0; gaps outer current set 0
#bindsym $mod+F6 gaps inner current set $inner; gaps outer current set $outer
@@ -247,7 +248,7 @@ workspace $wsSignal output DP-2
workspace $ws9 output HDMI-0
workspace $ws10 output HDMI-0
exec --no-startup-id compton &
exec --no-startup-id picom --backend glx --daemon
exec --no-startup-id feh --bg-scale ~/Pictures/desktop/0001.jpg &
mode "$g13" {
@@ -263,8 +264,8 @@ bindsym $mod+F1 mode "$g13"
exec_always --no-startup-id g13d --config ~/.config/g13/resolve.bind --logo ~/.config/g13/resolve.lpbm &
# Startup programs
exec --no-startup-id i3-msg "workspace $wsSignal; exec flatpak run org.signal.Signal;"
exec --no-startup-id i3-msg "workspace $ws5"
exec --no-startup-id flatpak run org.signal.Signal
exec --no-startup-id ~/bin/start-brave.sh
exec --no-startup-id i3-msg "workspace $ws1; exec alacritty"
# Starts Jack for audio
@@ -338,8 +339,8 @@ for_window [class="Minecraft*" title="Minecraft*"] move to workspace $wsGames
for_window [class="Minecraft*" title="Minecraft*"] exec --no-startup-id cat ~/.config/g13/minecraft.bind > /tmp/g13-0 && sleep .1 && cat ~/.config/g13/minecraft.lpbm > /tmp/g13-0
# Arkham Knight
for_window [class="steam_app_208650" title="*"] move to workspace $wsGames
for_window [class="steam_app_208650" title="*"] exec --no-startup-id cat ~/.config/g13/arkham-knight.bind > /tmp/g13-0 && sleep .1 && cat ~/.config/g13/arkham-knight.lpbm > /tmp/g13-0
for_window [class="steam_app_208650" title=".*"] move to workspace $wsGames
for_window [class="steam_app_208650" title=".*"] exec --no-startup-id cat ~/.config/g13/arkham-knight.bind > /tmp/g13-0 && sleep .1 && cat ~/.config/g13/arkham-knight.lpbm > /tmp/g13-0
# Factorio
for_window [class="factorio" title="Factorio*"] move to workspace $wsGames
@@ -1,7 +1,7 @@
---
description: Commit currently staged code in git
mode: all
model: "{{ template "models/small-brain" }}"
model: {{ template "models/small-brain" }}
temperature: 0.1
tools:
write: false
+2 -1
View File
@@ -51,7 +51,8 @@ window#waybar.chromium {
box-shadow: inset 0 -3px #B3E5FC;
}
#workspaces button.focused {
#workspaces button.focused,
#workspaces button.active {
background-color: #0288D1;
box-shadow: inset 0 -3px #B3E5FC;
}
+3 -4
View File
@@ -7,7 +7,6 @@ Requires=pipewire.service
WantedBy=default.target
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=%h/git/audio/snapcast/bin/snapclient
ExecStop=killall -q snapclient
Type=simple
ExecStart=%h/git/audio/snapcast/bin/snapclient --player pipewire
Restart=on-failure