From a1b46218f59ce6a84a8fbb66a01ab745b29c62a1 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Tue, 9 Sep 2025 17:44:30 +0200 Subject: [PATCH] various changes * Stop ignoring pdflatex, I rarely use it anyways * Add gk and gj to iamb, and put invites first * Search with searx also in tempbrowsers * teddit is down, don't redirect to it * scale backgrounds better * put slight delay in pipewire to avoid races? * better unsubscribing from gitlab --- config/git/ignore | 9 --------- config/iamb/config.toml | 9 +++++---- config/qutebrowser/config.py | 5 +++-- config/river/init | 4 ++-- local/bin/clirail | 2 +- local/bin/delegator | 4 ++++ local/bin/munsubscribe | 16 ++++++++++++++-- local/bin/tempbrowser | 6 +++++- profile | 2 +- 9 files changed, 35 insertions(+), 22 deletions(-) diff --git a/config/git/ignore b/config/git/ignore index d9c9d19..ce40d58 100644 --- a/config/git/ignore +++ b/config/git/ignore @@ -24,14 +24,5 @@ stack.yaml.lock Cargo.lock target/ -# LaTeX -*.log -*.aux -*.toc -*.pdf -*.bbl -*.blg -*.out - # Python __pycache__ diff --git a/config/iamb/config.toml b/config/iamb/config.toml index 105d4de..3fc2d73 100644 --- a/config/iamb/config.toml +++ b/config/iamb/config.toml @@ -20,7 +20,7 @@ user_gutter_width = 15 username_display = "displayname" [settings.sort] -chats = ["recent"] +chats = ["invite", "recent"] rooms = ["favorite", "lowpriority", "unread", "name"] members = ["power", "id"] @@ -30,12 +30,13 @@ style = "config" [[layout.tabs]] window = "iamb://chats" -[macros.insert] -"jj" = "" - [macros."normal|visual"] "V" = "m" [dirs] logs = "/home/ninewise/.local/share/iamb/logs/" downloads = "/tmp/" + +[macros.normal] +"gk" = "k" +"gj" = "j" diff --git a/config/qutebrowser/config.py b/config/qutebrowser/config.py index 90c0535..7f18abc 100644 --- a/config/qutebrowser/config.py +++ b/config/qutebrowser/config.py @@ -22,6 +22,7 @@ c.new_instance_open_target = "tab-silent" c.session.default_name = "default" c.tabs.background = True c.tabs.last_close = "close" +c.tabs.new_position.stacking = False c.tabs.show = "multiple" c.tabs.favicons.show = "pinned" c.url.default_page = "qute://bookmarks" @@ -46,6 +47,7 @@ c.url.searchengines = { "startpage": "https://startpage.com/do/search?query={}" , "trantor": "http://kx5thpx2olielkihfyo4jgjqfb7zx7wxr3sd4xzt26ochei4m6f7tayd.onion/search/?q={}" , "duckduckgonion": "https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/html?q={}" , "mellowchan": "https://srx.mellowchan.xyz/?q={}" + , "searx": "https://searx.be/?q={}" , "DEFAULT": "https://srx.mellowchan.xyz/?q={}" } @@ -216,8 +218,7 @@ for pattern in allowed: config.set('content.cookies.accept', "no-3rdparty", pattern) # Some redirects -redirects = { 'www.reddit.com': 'www.teddit.net' - , 'www.youtube.com': 'c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion' +redirects = { 'www.youtube.com': 'c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion' , 'www.youtube.be': 'c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion' , 'youtu.be': 'c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion' , 'twitter.com': '3nzoldnxplag42gqjs23xvghtzf6t6yzssrtytnntc6ppc7xxuoneoad.onion' diff --git a/config/river/init b/config/river/init index a077943..9aa96bb 100755 --- a/config/river/init +++ b/config/river/init @@ -39,9 +39,9 @@ riverctl default-layout rivertile riverctl rule-add -title skmenu float riverctl rule-add ssd -riverctl spawn 'dbus-run-session pipewire' +riverctl spawn 'sleep 3 && dbus-run-session pipewire' riverctl spawn 'swayidle timeout 300 waylock timeout 300 "wlopm --off \*" resume "wlopm --on \*"' -riverctl spawn "wbg '$(find -L /data/pictures/background-source/ -type f | sort -R | head -1)'" +riverctl spawn "wbg -s '$(find -L /data/pictures/background-source/ -type f | sort -R | head -1)'" riverctl spawn 'wlsunset -l 50.85 -L 4.35' rivertile -view-padding 0 -outer-padding 0 -main-ratio 0.7 & diff --git a/local/bin/clirail b/local/bin/clirail index bfdf153..2b60d8c 120000 --- a/local/bin/clirail +++ b/local/bin/clirail @@ -1 +1 @@ -/home/ninewise/.local/share/pipx/venvs/clirail/bin/clirail \ No newline at end of file +/home/ninewise/.local/pipx/venvs/clirail/bin/clirail \ No newline at end of file diff --git a/local/bin/delegator b/local/bin/delegator index d1a5945..9d6a02d 100755 --- a/local/bin/delegator +++ b/local/bin/delegator @@ -52,6 +52,7 @@ emoji spotify-title youtube-dl audio-dl +dictionary HERE )" @@ -100,4 +101,7 @@ case "$choice" in 'spotify-title') inject "$(curl -L "$(clip)" | sed -n 's@.*\(.*\) - song \(and lyrics \)\?by \(.*\) | Spotify.*@\1 _van_ \3@p')" ;; +'dictionary') + inject "$(pick < /usr/share/dict/british-english)" + ;; esac diff --git a/local/bin/munsubscribe b/local/bin/munsubscribe index 4552687..dde6843 100755 --- a/local/bin/munsubscribe +++ b/local/bin/munsubscribe @@ -2,7 +2,19 @@ if [ -z "$*" ]; then exec munsubscribe . else - for url in $(mshow -qh list-unsubscribe "$@" | xurls -m http); do - curl -L -w '%{http_code}' -s -o /dev/null "$url" + for mail in $(mseq "$@"); do + if [ -n "$(mshow -qh X-GitLab-Issue-IID)" ]; then + # if it's a gitlab mail, unsubscribe using glab + glab issue unsubscribe "$(mshow "$mail" | sed -n 's/View it on GitLab: \(.*\)/\1/p')" + elif [ -n "$(mshow -qh X-GitLab-MergeRequest-IID)" ]; then + # if it's a gitlab mail, unsubscribe using glab + glab mr unsubscribe "$(mshow "$mail" | sed -n 's/View it on GitLab: \(.*\)/\1/p')" + else + # assume it's a list email + for url in $(mshow -qh list-unsubscribe "$@" | xurls -m http); do + curl -L -w '%{http_code}' -s -o /dev/null "$url" + done + fi done + fi diff --git a/local/bin/tempbrowser b/local/bin/tempbrowser index aedbfae..9864d2f 100755 --- a/local/bin/tempbrowser +++ b/local/bin/tempbrowser @@ -1,2 +1,6 @@ #!/bin/sh -qutebrowser --temp-basedir "$@" +/usr/bin/qutebrowser --temp-basedir "$@" \ + --set url.searchengines '{"DEFAULT": "https://srx.mellowchan.xyz?q={}"}' \ + --set url.default_page 'https://srx.mellowchan.xyz' \ + --set url.start_pages 'https://srx.mellowchan.xyz' \ + --set downloads.location.directory '/tmp' diff --git a/profile b/profile index 90c96c4..2d04b8f 100755 --- a/profile +++ b/profile @@ -15,7 +15,7 @@ export CABAL_HOME="/data/homes/cabal" export STACK_ROOT="/data/homes/stack" export CARGO_HOME="/data/homes/cargo" export RUSTUP_HOME="/data/homes/rustup" -export JAVA_HOME="/usr/lib/jvm/openjdk17/" +export JAVA_HOME="/usr/lib/jvm/openjdk21/" export TEX_BIN="/opt/texlive/2019/bin/x86_64-linux/" export PATH="$HOME/.local/bin:$CABAL_HOME/bin:$CARGO_HOME/bin:$JAVA_HOME/bin:$TEX_BIN:$PATH"