Recovery from the sinking ship

This commit is contained in:
Ezri Brimhall 2025-08-06 09:43:18 -06:00
parent 7217d016ea
commit 2343a00f2b
Signed by: ezri
GPG Key ID: 058A78E5680C6F24
13 changed files with 105 additions and 89 deletions

View File

@ -1,4 +1,5 @@
[bell]
animation = "EaseOutSine"
color = "0x9a7c9d"
@ -63,3 +64,6 @@ dynamic_padding = true
dynamic_title = true
opacity = 0.8
title = "Terminal"
[terminal]
shell = { program = "/usr/bin/systemd-run", args = [ "--user", "--scope", "--slice=shells.slice", "--property=PartOf=alacritty.service", "--property=After=alacritty.service", "--slice-inherit", "-S", "-q"]}

View File

@ -1,14 +1,14 @@
{
"BACKGROUND_COLOR": "#202225",
"IS_MAXIMIZED": true,
"BACKGROUND_COLOR": "#121214",
"IS_MAXIMIZED": false,
"IS_MINIMIZED": false,
"MINIMIZE_TO_TRAY": false,
"OPEN_ON_STARTUP": false,
"WINDOW_BOUNDS": {
"x": 0,
"y": 0,
"width": 1688,
"height": 1022
"width": 2328,
"height": 1382
},
"DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": true,
"SKIP_HOST_UPDATE": true,

View File

@ -1,6 +1,6 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
htop_version=3.3.0
htop_version=3.4.1-3.4.1
config_reader_min_version=3
fields=0 48 17 18 38 39 40 2 46 47 49 1
hide_kernel_threads=1
@ -21,12 +21,13 @@ strip_exe_from_cmdline=1
show_merged_command=0
header_margin=1
screen_tabs=1
detailed_cpu_time=0
detailed_cpu_time=1
cpu_count_from_one=0
show_cpu_usage=1
show_cpu_frequency=0
show_cpu_temperature=1
degree_fahrenheit=0
show_cached_memory=1
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
@ -38,18 +39,18 @@ column_meters_0=Hostname Blank Tasks LoadAverage Uptime Clock
column_meter_modes_0=2 2 2 2 2 2
column_meters_1=AllCPUs2 Blank MemorySwap
column_meter_modes_1=1 2 1
tree_view=1
sort_key=47
tree_sort_key=47
tree_view=0
sort_key=46
tree_sort_key=46
sort_direction=-1
tree_sort_direction=-1
tree_view_always_by_pid=0
all_branches_collapsed=0
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
.sort_key=PERCENT_MEM
.tree_sort_key=PERCENT_MEM
.sort_key=PERCENT_CPU
.tree_sort_key=PERCENT_CPU
.tree_view_always_by_pid=0
.tree_view=1
.tree_view=0
.sort_direction=-1
.tree_sort_direction=-1
.all_branches_collapsed=0

View File

@ -1,7 +1,7 @@
# -*-conf-*-
timeout 10 'pgrep swaylock &> /dev/null && swaymsg output "*" power off' resume 'pgrep swaylock &> /dev/null && swaymsg output "*" power on'
lock ~/.local/bin/screenlock
lock 'systemctl --user start swaylock.service'
before-sleep 'loginctl lock-session'
unlock 'pkill -SIGUSR1 swaylock'
idlehint 600

View File

@ -84,7 +84,9 @@
{
"index": 13,
"name": "comms",
"exec": "zoom",
"exec": "firefoxpwa",
"args": ["site", "launch", "01K1BG1J945NG7HEKV95M5WM0E", "--protocol"],
"forking": true,
"program_name": "zoom"
},
{

View File

@ -1,9 +1,13 @@
[Unit]
Description=Terminal emulator
PartOf=sway-session.target
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=alacritty
Slice=gui.slice
ExecStart=alacritty --daemon --socket=%t/alacritty
ExecStopPost=rm %t/alacritty
Slice=app.slice
[Install]
WantedBy=graphical-session.target

View File

@ -4,6 +4,10 @@ Description=KDE Connect Daemon
[Service]
Type=simple
ExecStart=/usr/bin/kdeconnectd
Restart=on-failed
RestartSec=5s
RestartMaxDelaySec=1min
RestartSteps=5
[Install]
WantedBy=sway-session.target

View File

@ -1,9 +0,0 @@
[Unit]
Description = Forwarding bluetooth audio controls to MPRIS players
[Service]
Type = simple
ExecStart = /usr/bin/mpris-proxy
[Install]
WantedBy = graphical@i3.target

View File

@ -0,0 +1 @@
/dev/null

View File

@ -30,6 +30,8 @@ alias sudo='sudo '
alias sign='gpg --sign-with ezri@ezri.dev --detach-sign'
alias verify='gpg --verify'
alias dnslookup="resolvectl query"
alias bw-personal='BITWARDENCLI_APPDATA_DIR=~/.config/bw-cli-personal bw'
function didifuckingstutter {

View File

@ -82,26 +82,8 @@ if [[ -z ${hostname} ]]; then # No personal hostname set
fi
fi
show_os_icon=1
# use nerd fonts for icons
case $OS_ID in
"arch")
os_icon=""
show_os_icon=0 # Arch is my default, no need to show icon
;;
"debian")
os_icon=""
;;
"ubuntu")
os_icon=""
;;
*)
os_icon="?"
show_os_icon=0
;;
esac
prompt_char="%(?..%F{red}%f)"
host="%F{cyan}[ %F{green}${hostname}%(!.%F{red} as root.) %F{cyan}]%f"
ssh_host="%F{cyan}[ %F{blue}%BRemote Console%b%f @ %F{magenta}%B${hostname}%(!.%F{red} as root.)%b%F{cyan} ]%f"
localhost="%F{cyan}[ %F{magenta}%B${hostname}%(!.%F{red} as root.)%b %F{cyan}]%f"
serial_host="%F{cyan}[ %F{magenta}${hostname}%(!.%F{red} as root.) %F{cyan}] %F{red}%y%f"
container_host="%F{cyan}[ %F{blue}%B${hostname}%(!.%F{red} as root.)%b %F{cyan}]%f"
@ -118,18 +100,13 @@ elif [[ ${MACHINE_CHASSIS} == "container" ]] || [[ ${MACHINE_CHASSIS} == "vm" ]]
prompt_line2='${container_host}$pyenv_info_msg_0_ ${pwd}'
history_line="${container_host}"
elif [[ -v SSH_CLIENT ]]; then
prompt_line2='${host}$pyenv_info_msg_0_ ${pwd}'
history_line="${host}"
prompt_line2='${ssh_host}$pyenv_info_msg_0_ ${pwd}'
history_line="${ssh_host}"
else
prompt_line2='${localhost}$pyenv_info_msg_0_ ${pwd}'
history_line="${localhost}"
fi
# Inject icon if available, with ANSI color code stored in $OS_ANSI_COLOR
if [[ ${show_os_icon} -eq 1 ]]; then
prompt_line2=$'%{\x1b[${OS_ANSI_COLOR}m${os_icon}\x1b[0m%}'" ${prompt_line2}"
fi
set-prompt() {
if [[ ${TERM} == "dumb" ]]; then
# Dumb terminal needs a dumb prompt, otherwise things like

View File

@ -2,8 +2,7 @@
#+AUTHOR: Ezri & Simponic
#+STARTUP: fold
Shamelessly stole this from Simponic, made some limited modifications myself.
Namely to indent style, theme, and line numbers. Also added Github Copilot.
Shamelessly stole this from Simponic, made some modifications myself.
* Packages
@ -29,8 +28,8 @@ Indent using tabs, render with tab-width of 2.
#+BEGIN_SRC emacs-lisp
(use-package smart-tabs-mode
:ensure t
:init
(smart-tabs-insinuate 'c 'c++ 'java 'javascript 'python)
;; :init
;; (smart-tabs-insinuate 'c 'c++ 'java 'javascript 'python)
)
(setq default-tab-width 2)
(setq-default tab-width 2)
@ -136,11 +135,23 @@ Indent using tabs, render with tab-width of 2.
*** Default Configuration
#+BEGIN_SRC emacs-lisp
(setopt rcirc-default-nick "netsorc")
(setopt rcirc-default-full-name "Networking Sorceress")
(defvar irc-configured nil)
(setopt rcirc-authinfo
`(("irc.libera.chat" nickserv "netsorc" ,(secrets-get-secret "Default keyring" "libera.chat"))))
(defun do-irc-setup ()
(setopt rcirc-default-nick "netsorc")
(setopt rcirc-default-full-name "Networking Sorceress")
(condition-case nil
(lambda () ((setopt rcirc-authinfo
`(("irc.libera.chat" nickserv "netsorc" ,(secrets-get-secret "Default keyring" "libera.chat"))))
(setq irc-configured t)))
(error (message "Unable to configure IRC, keyring not unlocked.")))
(message "IRC configured."))
(defun irc-setup ()
(if irc-configured (message "IRC configured.") (do-irc-setup)))
(add-hook 'after-make-frame-functions 'irc-setup)
(irc-setup)
#+END_SRC
** Terminal
@ -150,6 +161,12 @@ Indent using tabs, render with tab-width of 2.
:ensure t)
#+END_SRC
** TRAMP Config
#+BEGIN_SRC emacs-lisp
(with-eval-after-load 'tramp (tramp-enable-method "run0"))
#+END_SRC
* Theming
** Highlight current line
#+BEGIN_SRC emacs-lisp
@ -608,22 +625,23 @@ Indent using tabs, render with tab-width of 2.
#+END_SRC
** Tree-Sitter
#+BEGIN_SRC emacs-lisp
(setq treesit-language-source-alist
'((bash "https://github.com/tree-sitter/tree-sitter-bash")
(cmake "https://github.com/uyha/tree-sitter-cmake")
(css "https://github.com/tree-sitter/tree-sitter-css")
(elisp "https://github.com/Wilfred/tree-sitter-elisp")
(go "https://github.com/tree-sitter/tree-sitter-go")
(html "https://github.com/tree-sitter/tree-sitter-html")
(javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src")
(json "https://github.com/tree-sitter/tree-sitter-json")
(make "https://github.com/alemuller/tree-sitter-make")
(markdown "https://github.com/ikatyang/tree-sitter-markdown")
(python "https://github.com/tree-sitter/tree-sitter-python")
(toml "https://github.com/tree-sitter/tree-sitter-toml")
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")
(yaml "https://github.com/ikatyang/tree-sitter-yaml")))
(setq treesit-language-source-alist
'((bash "https://github.com/tree-sitter/tree-sitter-bash")
(cmake "https://github.com/uyha/tree-sitter-cmake")
(css "https://github.com/tree-sitter/tree-sitter-css")
(elisp "https://github.com/Wilfred/tree-sitter-elisp")
(go "https://github.com/tree-sitter/tree-sitter-go")
(html "https://github.com/tree-sitter/tree-sitter-html")
(javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src")
(json "https://github.com/tree-sitter/tree-sitter-json")
(make "https://github.com/alemuller/tree-sitter-make")
(markdown "https://github.com/ikatyang/tree-sitter-markdown")
(python "https://github.com/tree-sitter/tree-sitter-python")
(toml "https://github.com/tree-sitter/tree-sitter-toml")
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")
(yaml "https://github.com/ikatyang/tree-sitter-yaml")
(cython "https://github.com/b0o/tree-sitter-cython")))
#+END_SRC
** Autocomplete
#+BEGIN_SRC emacs-lisp
@ -664,10 +682,10 @@ Indent using tabs, render with tab-width of 2.
("C-c C-e" . eglot-rename)
("C-." . eglot-code-actions)
("<f2>" . eglot-find-implementation))
:hook ((python-base-mode . eglot-ensure)
(python-base-mode . flyspell-prog-mode)
(python-base-mode . superword-mode)
(python-base-mode . hs-minor-mode)
:hook ((python-ts-mode . eglot-ensure)
(python-ts-mode . flyspell-prog-mode)
(python-ts-mode . superword-mode)
(python-ts-mode . hs-minor-mode)
(typescript-ts-mode . eglot-ensure)
(typescript-ts-mode . flyspell-prog-mode)
(typescript-ts-mode . superword-mode)
@ -723,8 +741,13 @@ Indent using tabs, render with tab-width of 2.
#+BEGIN_SRC emacs-lisp
(use-package pet
:config
(add-hook 'python-base-mode-hook 'pet-mode -10)
(add-hook 'python-ts-mode-hook 'pet-mode -10)
)
#+END_SRC
*** Cython
#+BEGIN_SRC emacs-lisp
#+END_SRC
*** Elixir
#+BEGIN_SRC emacs-lisp

View File

@ -1,10 +1,12 @@
#!/usr/bin/env zsh
exec </dev/null
exec > >(systemd-cat -t i3-sensible-launcher -p info)
exec 2> >(systemd-cat -t i3-sensible-launcher -p err)
exec > >(systemd-cat -t default-application-launcher -p info)
exec 2> >(systemd-cat -t default-application-launcher -p err)
export PATH=$HOME/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
export PATH=$HOME/.pyenv/shims:$HOME/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
export PYENV_HOME=$HOME/.pyenv
export PYENV_VERSION=personal
ws_data=$(sway_get_focused_workspace)
current_workspace=$(echo $ws_data | jq -r '.index')
@ -13,6 +15,7 @@ program=$(echo $ws_data | jq -r '.exec')
program_name=$(echo $ws_data | jq -r '.program_name')
memory_profile=$(echo $ws_data | jq '.memory_profile' -c)
run_with_systemd=$(echo $ws_data | jq '.systemd' -r)
is_forking=$(echo $ws_data | jq '.forking' -r)
void_output=$(echo $ws_data | jq '.void_output' -r)
IFS=$'\n' environ=($(echo $ws_data | jq '.environ | to_entries | map("\(.key)=\(.value|tostring)") | .[]' -r 2>/dev/null))
IFS=$'\n' args=($(echo $ws_data | jq '.args | .[]' -r 2>/dev/null))
@ -46,10 +49,14 @@ if [[ $environ != "" ]]; then
done
fi
if [[ $is_forking == "true" ]]; then
systemd_run_args+=("--service-type=forking")
fi
if [[ $program == "console" ]] && [[ $pty == "alacritty" ]]; then
# Create a new window if an instance is already running, otherwise start the service
echo "Creating new alacritty window"
$pty msg create-window || /usr/bin/systemctl --user start alacritty.service
alacritty msg --socket=$XDG_RUNTIME_DIR/alacritty create-window
exit 0
elif [[ $program == "console" ]]; then
program=$pty
@ -62,7 +69,7 @@ if [[ $void_output == "true" ]]; then
# difficult to use.
exec >/dev/null
exec 2>/dev/null
exec systemd-run --user $=systemd_run_args --scope --unit="$program_name-$$" --description="$program_name" --slice=gui.slice -- $=program
exec systemd-run --user $=systemd_run_args --scope --unit="app-sway-$program_name-$RANDOM" --description="$program_name" --slice=app-sway.slice -- $=program
fi
if [[ $run_with_systemd == "false" ]]; then
@ -74,6 +81,6 @@ fi
# Run programs using systemd-run to allow for resource control and capture of stdout/stderr
# We're using a service instead of a scope because scopes don't capture output, and wrapping
# the call in systemd-cat is more complicated than just using a service.
echo exec systemd-run --user $=systemd_run_args --unit="$program_name-$$" --description="$program_name" --slice=gui.slice -- $program $args
echo exec systemd-run --user $=systemd_run_args --unit="app-sway-$program_name@$RANDOM" --description="$program_name" --slice=app-sway.slice -- $program $args
exec systemd-run --user $=systemd_run_args --unit="$program_name-$$" --description="$program_name" --slice=gui.slice -- $program $args
exec systemd-run --user $=systemd_run_args --unit="app-sway-$program_name@$RANDOM" --description="$program_name" --slice=app-sway.slice -- $program $args

View File

@ -10,7 +10,7 @@ yellow="#f9ee98"
red="#cf6a4c"
purple="#815986"
swaylock --font 'Source Sans Pro' --font-size 15 \
exec swaylock --font 'Source Sans Pro' --font-size 15 \
--indicator-radius 80 --indicator-thickness 10 \
--inside-color $inside --inside-clear-color $inside --inside-caps-lock-color $inside \
--inside-ver-color $inside --inside-wrong-color $inside \