From f252c628ec0ab6577ce5b1f9d3e5328b4e78e1ff Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 25 Feb 2025 23:27:57 +0100 Subject: [PATCH 01/11] powermenu: Remove hybrid-suspend Hybrid suspending is not working for my system currently (definitely TODO). For the time being, we simply suspend only instead. --- desktop/.config/river/init | 2 +- scripts/.local/bin/powermenu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/.config/river/init b/desktop/.config/river/init index 7ad623e..7890dbb 100755 --- a/desktop/.config/river/init +++ b/desktop/.config/river/init @@ -115,7 +115,7 @@ riverctl map normal $mod+Shift L spawn "papis -s picktool dmenu open" # shellcheck disable=SC2016 riverctl map normal $mod+Shift S spawn 'flavourchoose' -# Password dropdown frontend +# Password frontend riverctl map normal $mod+Shift P spawn "pass-pick" # File upload diff --git a/scripts/.local/bin/powermenu b/scripts/.local/bin/powermenu index b186399..64f3cdf 100755 --- a/scripts/.local/bin/powermenu +++ b/scripts/.local/bin/powermenu @@ -92,7 +92,7 @@ case "$result" in if [ -x /usr/bin/systemctl ]; then systemctl suspend-then-hibernate else - sudo zzz -H + sudo zzz fi fi ;; From e604e3432939844cb70ad1a2998ab3bd4aaf0ca9 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 25 Feb 2025 23:27:57 +0100 Subject: [PATCH 02/11] sh: Fix touch error on startup The xdg-compliance function would check on shell startup if we have a file mentioned by 'PYTHONSTARTUP' and create it if not. However, if there is no env var in the shell calling for this at all it would still try to create a file at an 'empty' path, so this obviously won't work. Added a check that we even have the variable to do work. --- sh/.config/sh/xdg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/.config/sh/xdg b/sh/.config/sh/xdg index 0b62166..024e330 100644 --- a/sh/.config/sh/xdg +++ b/sh/.config/sh/xdg @@ -54,7 +54,7 @@ export LESSHISTFILE="XDG_STATE_HOME/lesshst" export MPLAYER_HOME="$XDG_CONFIG_HOME/mplayer" export NODE_REPL_HISTORY="$XDG_STATE_HOME/node_repl_history" export NVM_DIR="$XDG_DATA_HOME/nvm" -if [ ! -e "$PYTHONSTARTUP" ]; then +if [ -n "$PYTHONSTARTUP" ] && [ ! -e "$PYTHONSTARTUP" ]; then mkdir -p "$XDG_CONFIG_HOME/python" touch "$PYTHONSTARTUP" fi From 19577a7c837b280e132f723dc044c3a494e2b000 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 26 Feb 2025 08:59:08 +0100 Subject: [PATCH 03/11] zsh: Show help when hitting K from vi mode We load the 'run-help' function to quickly show us documentation for the command under cursor when we enter vi mode and then hit 'K'. This mimics the actual vim setup where K will generally show documentation/hover info/help as well. The command invocation requires an 'even amount of arguments' which I don't fully understand but have no time to read into and fix currently, so it just gets another superfluous 'run-help' tacked on at the end. --- terminal/.config/zsh/.zshrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/terminal/.config/zsh/.zshrc b/terminal/.config/zsh/.zshrc index 9adfdf9..e2b9c87 100644 --- a/terminal/.config/zsh/.zshrc +++ b/terminal/.config/zsh/.zshrc @@ -4,7 +4,7 @@ CONFDIR="${XDG_CONFIG_HOME:-$HOME/.config}" ZSHCONFDIR="$CONFDIR/zsh" # load completion, extended zsh moving syntax, zle edit in vim (or other $EDITOR) possibility -autoload -Uz compinit zmv edit-command-line +autoload -Uz compinit zmv edit-command-line run-help run-help-git run-help-ip run-help-sudo # Set completion style # The following lines were added by compinstall @@ -232,6 +232,9 @@ zle -N edit-command-line bindkey '^e' edit-command-line bindkey -M vicmd '^e' edit-command-line +# give manpage when hitting K from vi mode +bindkey -M vicmd 'K' run-help run-help-git run-help-ip run-help-sudo run-help + # Deduplicate PATH - remove any duplicate entries from PATH # from: https://unix.stackexchange.com/questions/40749/remove-duplicate-path-entries-with-awk-command get_var() { From 96757895dcba6964f4e22ab403d4abe23ed0d623 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 28 Feb 2025 08:27:20 +0100 Subject: [PATCH 04/11] wlsunset: Fix pass through time variables to service Passing them through as individual arguments on the commandline. Previously quoting would pass them through as a single argument, making it not work correctly. Could switch to using bash arrays for this (to make it more robust against word-splitting) but a) I prefer the portability of sh for such a simple script and b) there _should_ never be a time when we pass through anything that has weird word-splitting issues. Either the location is passed through or the times. --- services/sv/wlsunset/run | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/sv/wlsunset/run b/services/sv/wlsunset/run index a35f6b0..0863c8a 100755 --- a/services/sv/wlsunset/run +++ b/services/sv/wlsunset/run @@ -1,16 +1,16 @@ -#!/bin/sh +#!/usr/bin/env sh [ -r ./conf ] && . ./conf -TIME_OPTS='-S \"09:00\" -s \"21:00\" -d \"3600\"' +TIME_OPTS="-S 08:00 -s 21:00 -d 3600" if command -v curl >/dev/null 2>&1; then loc=$(curl -s ipinfo.io | grep -e '"loc": ' | sed -e 's/^.*"loc": "\(.*\)",$/\1/') if [ -n "$loc" ]; then lat="$(echo "$loc" | cut -d, -f1)" long="$(echo "$loc" | cut -d, -f2)" - TIME_OPTS="-l \"$lat\" -L \"$long\"" + TIME_OPTS="-l $lat -L $long" fi fi exec 2>&1 -exec chpst -e "$TURNSTILE_ENV_DIR" wlsunset $TIME_OPTS "$@" +exec chpst -e "$TURNSTILE_ENV_DIR" wlsunset ${TIME_OPTS} "$@" From 2627055e7cff4ab5ae7e692c5188a517e08a562d Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 28 Feb 2025 09:24:43 +0100 Subject: [PATCH 05/11] swaybg: Fix single screen wallpaper display --- desktop/.config/river/init | 5 +++-- services/sv/swaybg/run | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/desktop/.config/river/init b/desktop/.config/river/init index 7890dbb..4860fd7 100755 --- a/desktop/.config/river/init +++ b/desktop/.config/river/init @@ -313,8 +313,9 @@ if ! cat /etc/*-release | grep -q '^NAME=.*Void'; then if command -v swaybg >/dev/null 2>&1; then killall swaybg riverctl spawn "swaybg \ - -o 'LG Electronics W2442 0x000574E1' -i pictures/wall_l.jpg \ - -o 'LG Electronics W2442 0x000574FD' -i pictures/wall_r.jpg \ + -o 'LG Electronics W2442 0x000574E1' -i $HOME/pictures/wall_l.jpg \ + -o 'LG Electronics W2442 0x000574FD' -i $HOME/pictures/wall_r.jpg \ + -o 'Sharp Corporation 0x1449' -i $HOME/pictures/wall.jpg " elif command -v swww >/dev/null 2>&1; then riverctl spawn "swww-daemon" diff --git a/services/sv/swaybg/run b/services/sv/swaybg/run index 15d96b1..6fe9fa6 100755 --- a/services/sv/swaybg/run +++ b/services/sv/swaybg/run @@ -3,4 +3,7 @@ [ -r ./conf ] && . ./conf exec 2>&1 -exec chpst -e "$TURNSTILE_ENV_DIR" swaybg -o "LG Electronics W2442 0x000574E1" -i "$HOME/pictures/wall_l.jpg" -o "LG Electronics W2442 0x000574FD" -i "$HOME/pictures/wall_r.jpg" +exec chpst -e "$TURNSTILE_ENV_DIR" swaybg \ + -o "LG Electronics W2442 0x000574E1" -i "$HOME/pictures/wall_l.jpg" \ + -o "LG Electronics W2442 0x000574FD" -i "$HOME/pictures/wall_r.jpg" \ + -o "Sharp Corporation 0x1449" -i "$HOME/pictures/wall.jpg" From 749cedb16205c16566545436019ae2eefa056bd4 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 28 Feb 2025 14:04:41 +0100 Subject: [PATCH 06/11] jj: Change oneline and summary log template Summary logs are changed to a little nicer presentation (from --summary to 'builtin_log_compact_full_description' template). Oneline logs have a changed order. Keep the revID as first thing, but then show bookmarks/tags/head and descriptions. Only afterwards show email, timesatmp, commitID since I am less interested in them generally when viewing oneline commits (to get an overview of the last changes and my current position). --- bootstrap/system-packages/etc/pacman.conf | 100 ---------------------- vcs/jj/config/jj/config.toml | 33 +++++++ vcs/jj/config/sh/alias.d/jj.sh | 4 +- 3 files changed, 35 insertions(+), 102 deletions(-) delete mode 100644 bootstrap/system-packages/etc/pacman.conf diff --git a/bootstrap/system-packages/etc/pacman.conf b/bootstrap/system-packages/etc/pacman.conf deleted file mode 100644 index 922ac08..0000000 --- a/bootstrap/system-packages/etc/pacman.conf +++ /dev/null @@ -1,100 +0,0 @@ -# -# /etc/pacman.conf -# -# See the pacman.conf(5) manpage for option and repository directives - -# -# GENERAL OPTIONS -# -[options] -# The following paths are commented out with their default values listed. -# If you wish to use different paths, uncomment and update the paths. -#RootDir = / -#DBPath = /var/lib/pacman/ -#CacheDir = /var/cache/pacman/pkg/ -#LogFile = /var/log/pacman.log -#GPGDir = /etc/pacman.d/gnupg/ -#HookDir = /etc/pacman.d/hooks/ -HoldPkg = pacman glibc -#XferCommand = /usr/bin/curl -L -C - -f -o %o %u -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#CleanMethod = KeepInstalled -Architecture = auto - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options -UseSyslog -Color -#NoProgressBar -CheckSpace -VerbosePkgLists -ParallelDownloads = 5 - -# By default, pacman accepts packages signed by keys that its local keyring -# trusts (see pacman-key and its man page), as well as unsigned packages. -SigLevel = Required DatabaseOptional -LocalFileSigLevel = Optional -#RemoteFileSigLevel = Required - -# NOTE: You must run `pacman-key --init` before first using pacman; the local -# keyring can then be populated with the keys of all official Arch Linux -# packagers with `pacman-key --populate archlinux`. - -# -# REPOSITORIES -# - can be defined here or included from another file -# - pacman will search repositories in the order defined here -# - local/custom mirrors can be added here or in separate files -# - repositories listed first will take precedence when packages -# have identical names, regardless of version number -# - URLs will have $repo replaced by the name of the current repo -# - URLs will have $arch replaced by the name of the architecture -# -# Repository entries are of the format: -# [repo-name] -# Server = ServerName -# Include = IncludePath -# -# The header [repo-name] is crucial - it must be present and -# uncommented to enable the repo. -# - -# The testing repositories are disabled by default. To enable, uncomment the -# repo name header and Include lines. You can add preferred servers immediately -# after the header, and they will be used before the default mirrors. - -#[testing] -#Include = /etc/pacman.d/mirrorlist - -[core] -Include = /etc/pacman.d/mirrorlist - -[extra] -Include = /etc/pacman.d/mirrorlist - -#[community-testing] -#Include = /etc/pacman.d/mirrorlist - -[community] -Include = /etc/pacman.d/mirrorlist - -# If you want to run 32 bit applications on your x86_64 system, -# enable the multilib repositories as required here. - -#[multilib-testing] -#Include = /etc/pacman.d/mirrorlist - -[multilib] -Include = /etc/pacman.d/mirrorlist - -# An example of a custom package repository. See the pacman manpage for -# tips on creating your own repositories. -#[custom] -#SigLevel = Optional TrustAll -#Server = file:///home/custompkgs diff --git a/vcs/jj/config/jj/config.toml b/vcs/jj/config/jj/config.toml index 3b87200..9d5368f 100644 --- a/vcs/jj/config/jj/config.toml +++ b/vcs/jj/config/jj/config.toml @@ -20,6 +20,7 @@ pager = "delta" format = "git" # for the time being to use delta well [templates] +# Add git diffs to commit drafts draft_commit_description = ''' concat( description, @@ -32,6 +33,38 @@ concat( ) ''' +[template-aliases] +# Changed order of normal oneliner around: +# keep revID, but then first thing bookmarks/tags/head and descriptions +# only afterwards show email, timesatmp, commitID since I am less interested +builtin_log_oneline = ''' +if(root, + format_root_commit(self), + label(if(current_working_copy, "working_copy"), + concat( + separate(" ", + format_short_change_id_with_hidden_and_divergent_info(self), + if(conflict, label("conflict", "conflict")), + bookmarks, + tags, + if(git_head, label("git_head", "git_head()")), + if(description, + description.first_line(), + label(if(empty, "empty"), description_placeholder), + ), + if(author.email(), author.email().local(), email_placeholder), + format_timestamp(commit_timestamp(self)), + working_copies, + format_short_commit_id(commit_id), + if(config("ui.show-cryptographic-signatures").as_boolean(), + format_short_cryptographic_signature(signature)), + if(empty, label("empty", "(empty)")), + ) ++ "\n", + ), + ) +) +''' + [revsets] log = "ancestors(@, 5) | ancestors(trunk()..(visible_heads() & mine()), 2) | trunk()" diff --git a/vcs/jj/config/sh/alias.d/jj.sh b/vcs/jj/config/sh/alias.d/jj.sh index a7f4606..457b5cc 100644 --- a/vcs/jj/config/sh/alias.d/jj.sh +++ b/vcs/jj/config/sh/alias.d/jj.sh @@ -51,8 +51,8 @@ alias jab="jj abandon" alias J="jj log -r 'all()'" # mirror default command being log alias jl="jj log -T builtin_log_oneline" alias JL="jj log -T builtin_log_oneline -r 'all()'" -alias jlo="jj log --summary" -alias JLO="jj log --summary -r 'all()'" +alias jlo="jj log --summary -T builtin_log_compact_full_description" +alias JLO="jj log --summary -T builtin_log_compact_full_description -r 'all()'" alias jloo="jj log --patch" alias JLOO="jj log --patch -r 'all()'" alias jol="jj op log" From 4082d92ed990734c2740b821742f3d9c89206df0 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 28 Feb 2025 15:20:21 +0100 Subject: [PATCH 07/11] jj: Change log finding alias to case insensitive Since 612b92d1 we are matching private commits case insensitively, we should also match default commit search insensitively by default. This changes the alias to search without caring for the case. We do not have an equivalent alias for case sensitive search, and I will only add one if I need the specificity often enough to warrant an extra alias. --- vcs/jj/config/sh/alias.d/jj.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcs/jj/config/sh/alias.d/jj.sh b/vcs/jj/config/sh/alias.d/jj.sh index 457b5cc..6626c98 100644 --- a/vcs/jj/config/sh/alias.d/jj.sh +++ b/vcs/jj/config/sh/alias.d/jj.sh @@ -57,7 +57,7 @@ alias jloo="jj log --patch" alias JLOO="jj log --patch -r 'all()'" alias jol="jj op log" jlf() { - jj log -r "description(\"$*\")" + jj log -r "description(substring-i:\"$*\")" } jlof() { jj log --summary -r "description($*)" From 343c1f0a35e398ffacbc3bd46ac57be44381d4b2 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 28 Feb 2025 20:07:25 +0100 Subject: [PATCH 08/11] river: Use built-in option to set compose key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So far, we used the external `setxkbmap` tool to map the compose key to the 'menu' button (AltGr on my keyboard). With this I am able to type äöü€ß. Now using the built-in option in riverctl which I just discovered, so we rely on fewer external programs. Also setting the keyboard itself to 'us(altgr-intl)' which I _think_ I had enabled before. If it turns out not, well, can always change back to us layout with a single line. --- desktop/.config/river/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/.config/river/init b/desktop/.config/river/init index 4860fd7..1f142af 100755 --- a/desktop/.config/river/init +++ b/desktop/.config/river/init @@ -44,6 +44,7 @@ should_start() { # 1=program binary name fi } +riverctl keyboard-layout -options compose:menu "us(altgr-intl)" ## OPTIONS riverctl spawn "dbus-update-activation-environment SEATD_SOCK DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river" riverctl focus-follows-cursor normal @@ -301,7 +302,6 @@ for pad in $(riverctl list-inputs | grep -i touchscreen); do riverctl input "$pad" pointer-accel 0.5 done -setxkbmap -option "compose:menu" # We are not in voidlinux, so no nice turnstile user services will take care of us # have to start everything manually here. From 270a6f1e0d8491c619734bd415750a0a96c46d51 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 28 Feb 2025 20:07:25 +0100 Subject: [PATCH 09/11] waybar: Remove event module spacing Removed spacing left over when an event was occuring on the current day. --- desktop/.config/waybar/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/.config/waybar/config b/desktop/.config/waybar/config index 6f2a18e..0d72df1 100644 --- a/desktop/.config/waybar/config +++ b/desktop/.config/waybar/config @@ -63,7 +63,7 @@ "on-click": "$TERMINAL start --class float ikhal", "format": "{icon}{0}", // issue tracked here https://github.com/Alexays/Waybar/issues/3623 "format-icons": { - "event": " ", + "event": "", "no-event": "", }, }, From 710fc41b23042978c19099d30e705f5e1a226dbe Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 28 Feb 2025 20:07:25 +0100 Subject: [PATCH 10/11] mpv: Require shift Q to quit application Accidentally hitting q was just a little too common for me so now at least I will have to accidentally hit two keys at once. Regular q is completely ignored. --- multimedia/.config/mpv/input.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/multimedia/.config/mpv/input.conf b/multimedia/.config/mpv/input.conf index 888267d..0b90724 100644 --- a/multimedia/.config/mpv/input.conf +++ b/multimedia/.config/mpv/input.conf @@ -1,4 +1,5 @@ -q quit +Q quit +q ignore l seek 5 L seek 60 From e36ed17a97536cfa1bd4bed7db3ce5a663f5ecf0 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 28 Feb 2025 20:07:25 +0100 Subject: [PATCH 11/11] wezterm: Re-enable wayland mode While there are errors that pop up when inserting text (_each time_), it is still much preferable to the unbearable slowdowns that happen after a while when running it in XWayland mode. --- terminal/.config/wezterm/wezterm.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminal/.config/wezterm/wezterm.lua b/terminal/.config/wezterm/wezterm.lua index 5c0dd7a..2681191 100644 --- a/terminal/.config/wezterm/wezterm.lua +++ b/terminal/.config/wezterm/wezterm.lua @@ -24,7 +24,7 @@ if file_exists(colorsfile) == true then end local settings = { - enable_wayland = false, -- sadface :-( + enable_wayland = true, -- sadface :-( xcursor_theme = "Adwaita", enable_tab_bar = true, hide_tab_bar_if_only_one_tab = true,