diff options
Diffstat (limited to '.config')
214 files changed, 1449 insertions, 8814 deletions
diff --git a/.config/aerc/aerc.conf b/.config/aerc/aerc.conf index 0b55543..2dd82e2 100644 --- a/.config/aerc/aerc.conf +++ b/.config/aerc/aerc.conf @@ -9,21 +9,25 @@ border-char-vertical="│" border-char-horizontal="─" styleset-name=r +threading-enabled=true +mouse-enabled=true + [ui:folder~^(Drafts|Sent Items)$] index-columns = flags:4,to<20%,subject,date>= column-to = {{index (.To | names) 0}} -[viewer] -# Default: less -R -# pager=page -# pager=less -g -i -M -s -S -w -X -pager=less -c -F -i -R -s -~ --mouse -# pager=bat --style=plain --color=always --language=email --wrap=character +[ui:account=notmuch] +index-columns = flags:4,name<20%,subject,date>= +column-tags = {{.Labels | join " " }} + +[statusline] +column-left=[{{.Account}}][Q:{{exec "msmtp-queue-stat" "" | replace `\s+$` "" }}] {{.StatusInfo}} +[viewer] always-show-mime=true [compose] -address-book-cmd=sh -c 'grep -i --color=never %s $HOME/mail/addressbook' +address-book-cmd=sh -c 'grep -i -m 100 --color=never %s $HOME/mail/addressbook' file-picker-cmd=porta filechooser [filters] @@ -31,11 +35,6 @@ file-picker-cmd=porta filechooser #from,thatguywhodoesnothardwraphismessages=fmt -w 72 | colorize X-GitHub-Recipient,robertgzr=github-review-fix | colorize -# application/pdf=pdf -# image/*=vv -# text/*=bat -fP --file-name="$AERC_FILENAME" -application/x-sh=bat -fP -l sh - # keep defaults around text/html=html | colorize text/plain=wrap | colorize @@ -44,4 +43,4 @@ message/delivery-status=colorize message/rfc822=colorize [hooks] -mail-received=notify-send -i /usr/share/icons/mdi/scalable/email-fast-outline.svg -a aerc "[$AERC_ACCOUNT/$AERC_FOLDER] new mail from $AERC_FROM_NAME" "$AERC_SUBJECT" +mail-received=fyi -a aerc "[$AERC_ACCOUNT/$AERC_FOLDER] new mail from $AERC_FROM_NAME" "$AERC_SUBJECT" diff --git a/.config/aerc/binds.conf b/.config/aerc/binds.conf index 238941f..ea31df7 100644 --- a/.config/aerc/binds.conf +++ b/.config/aerc/binds.conf @@ -13,6 +13,8 @@ j = :next<cr> k = :prev<cr> <Up> = :prev<cr> <PgUp> = :prev 100%<cr> +<C-u> = :prev 33%<cr> +<C-d> = :next 33%<cr> gg = :select 0<cr> G = :select -1<cr> @@ -24,6 +26,8 @@ v = :mark -t<cr> <cr> = :view<cr> <S-cr> = :vsplit<cr> +<C-v> = :vsplit<cr> +<C-s> = :split<cr> <space> = :read -t<cr> dd = :read<cr> :mv Trash<cr> a = :read<cr> :archive year<cr> @@ -81,14 +85,15 @@ zo = :open-thread<cr> [messages:account=gnzler] ga = :cf Archive/2024<cr> -gs = :clear<cr>:filter -a @lists.sr.ht<cr> -gh = :clear<cr>:filter -H 'X-Github-Recipient: robertgzr'<cr> -gp = :clear<cr>:filter -a 'alpinelinux.org'<cr> -gt = :clear<cr>:filter -H 'X-Bugzilla-URL: https://bugs.gentoo.org'<cr> +gs = :clear<cr>:filter -H 'List-ID:lists.sr.ht'<cr> +gh = :clear<cr>:filter -H 'List-ID:github.com'<cr> +# / = :ct notmuch<cr>:cf<space> [messages:folder=Drafts] <cr> = :recall<cr> +[messages:account=notmuch] +dd = :read<cr>:mv Trash<cr> [view] <C-k> = :prev-part<cr> @@ -97,8 +102,8 @@ gt = :clear<cr>:filter -H 'X-Bugzilla-URL: https://bugs.gentoo.org'<cr> <C-h> = :prev-tab<cr> <C-l> = :next-tab<cr> -<C-p> = :prev<cr> <C-n> = :next<cr> +<C-p> = :prev<cr> q = :close<cr> | = :pipe<space> @@ -107,7 +112,7 @@ S = :save<space> A = :prompt 'Really archive?' archive year<cr> O = :open porta open-uri<space> -f = :forward<cr> +F = :forward<cr> rr = :reply -a<cr> rq = :reply -aq<cr> rQ = :reply -aQ<cr> diff --git a/.config/aerc/filters/html b/.config/aerc/filters/html deleted file mode 100755 index 6771fa7..0000000 --- a/.config/aerc/filters/html +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -exec firejail --quiet --noprofile --net=none -- \ - w3m \ - -I UTF-8 \ - -T text/html \ - -X -cols "$(tput cols)" \ - -dump \ - -o display_image=1 \ - -o display_link_number=1 \ - -o inline_img_protocol=4 diff --git a/.config/aerc/stylesets/r b/.config/aerc/stylesets/r index 9c37d55..4cf9811 100644 --- a/.config/aerc/stylesets/r +++ b/.config/aerc/stylesets/r @@ -1,37 +1,47 @@ +*.selected.fg = black +*.selected.bg = #70649a +*.selected.reverse = false + +error.fg = black +error.bg = 1 +success.fg = black +success.bg = 2 +warning.fg = black +warning.bg = 3 + msglist_unread.italic = true msglist_unread.bold = false msglist_flagged.fg = 3 msglist_flagged.bold = true -tab.reverse = false - -border.bg = black -border.fg = 5 - -statusline_default.bg = black -statusline_default.fg = white +msglist_marked.fg = 7 +msglist_marked.bg = 8 -*.selected.bg = 5 -*.selected.fg = black -*.selected.reverse = false +msglist_pill.bg = #70649a -msglist_default.List-ID,~/github\.com/.bg = #52433d -msglist_default.List-ID,~/github\.com/.fg = white +border.fg = #70649a +border.bg = default -msglist_default.List-ID,~/lists\.sr\.ht/.bg = #0f2540 -msglist_default.List-ID,~/lists\.sr\.ht/.fg = white +header.fg = #70649a -msglist_default.To,~/lists\.sr\.ht/.bg = #0f2540 -msglist_default.To,~/lists\.sr\.ht/.fg = white +title.fg = black +title.bg = #70649a -msglist_default.List-ID,~/openstreetmap\.org/.bg = #0f4c3a -msglist_default.List-ID,~/openstreetmap\.org/.fg = white +tab.bg = black +tab.fg = white -msglist_default.List-ID,~/alpinelinux\.org/.bg = #4d5139 -msglist_default.List-ID,~/alpinelinux\.org/.fg = white -msglist_default.From,~/@alpinelinux\.org/.bg = #4d5139 -msglist_default.From,~/@alpinelinux\.org/.fg = white +statusline_default.fg = white +statusline_default.bg = black -msglist_default.X-Bugzilla-URL,~/bugs\.gentoo\.org/.bg = #3c2f41 -msglist_default.X-Bugzilla-URL,~/bugs\.gentoo\.org/.fg = white +part_filename.fg = dimgray +part_mimetype.fg = default + +msglist_default.List-ID,~/github\.com/.fg = dimgray +msglist_default.List-ID,~/lists\.sr\.ht/.fg = 4 +msglist_default.To,~/lists\.sr\.ht/.fg = 4 +msglist_default.List-ID,~/openstreetmap\.org/.fg = 1 +msglist_default.List-ID,~/alpinelinux\.org/.fg = 6 +msglist_default.From,~/@alpinelinux\.org/.fg = 6 +msglist_default.X-Bugzilla-URL,~/bugs\.gentoo\.org/.fg = 5 +msglist_default.From,~/quad9.net/.fg = palevioletred diff --git a/.config/aerc/templates/new b/.config/aerc/templates/new deleted file mode 100644 index 54002bd..0000000 --- a/.config/aerc/templates/new +++ /dev/null @@ -1,7 +0,0 @@ -{{range $idx, $elm := .To -}} -{{if eq (exec `grep -q 'sr.ht$' && printf '1'` $elm.Address) "1" -}} -From: "Robert Günzler" <r@gnzler.io> -{{- end}} -{{- end}} -X-Mailer: aerc {{version}} - diff --git a/.config/aerc/templates/quoted_reply b/.config/aerc/templates/quoted_reply deleted file mode 100644 index e39e6b4..0000000 --- a/.config/aerc/templates/quoted_reply +++ /dev/null @@ -1,19 +0,0 @@ -{{- $From := (index .From 0) }}{{ $To := .To -}} -{{- range $idx, $elm := .To -}} - {{- if eq (exec `grep -q 'sr.ht$' && printf '1'` $elm.Address) "1"}}{{$From = `"Robert Günzler" <r@gnzler.io>`}}{{end -}} - - {{- if eq (exec `grep -q '@gnzler.*$' && printf '1'` $elm.Address) "1" -}} - {{- $From = (printf `%s` $elm) -}} - {{- $To = (drop $To $idx) -}} - {{- end -}} -{{- end -}} - -From: {{$From}} -To: {{range $To}}{{.}},{{end}} -X-Mailer: aerc {{version}} - -On {{dateFormat (.OriginalDate | toLocal) "Mon Jan 2, 2006 at 3:04 PM MST"}}, {{with (index .OriginalFrom 0)}}{{with .Name}}{{.}} {{end}}<{{.Address}}>{{end}} wrote: -{{if eq .OriginalMIMEType "text/html"}}{{exec `/usr/share/aerc/filters/html` .OriginalText | wrap 72 | quote}} -{{else}} -{{quote .OriginalText}} -{{end}} diff --git a/.config/aerc/templates/reply b/.config/aerc/templates/reply deleted file mode 100644 index 0736c68..0000000 --- a/.config/aerc/templates/reply +++ /dev/null @@ -1,15 +0,0 @@ -{{- $From := (index .From 0) }}{{ $To := .To -}} -{{- range $idx, $elm := .To -}} - {{- if eq (exec `grep -q 'sr.ht$' && printf '1'` $elm.Address) "1"}}{{$From = `"Robert Günzler" <r@gnzler.io>`}}{{end -}} - - {{- if eq (exec `grep -q '@gnzler.*$' && printf '1'` $elm.Address) "1" -}} - {{- $From = (printf `%s` $elm) -}} - {{- $To = (drop $To $idx) -}} - {{- end -}} -{{- end -}} - -From: {{$From}} -To: {{range $To}}{{.}},{{end}} -X-Mailer: aerc {{version}} - -Hi {{(index .OriginalFrom 0).Name}}, diff --git a/.config/bat/config b/.config/bat/config deleted file mode 100644 index 038cfb8..0000000 --- a/.config/bat/config +++ /dev/null @@ -1,25 +0,0 @@ -# This is `bat`s configuration file. Each line either contains a comment or -# a command-line option that you want to pass to `bat` by default. You can -# run `bat --help` to get a list of all possible configuration options. - -# Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes` -# for a list of all available themes ---theme="base16" - -# Enable this to use italic text on the terminal. This is not supported on all -# terminal emulators (like tmux, by default): ---italic-text=always - -# Uncomment the following line to disable automatic paging: -#--paging=never - -# Uncomment the following line if you are using less version >= 551 and want to -# enable mouse scrolling support in `bat` when running inside tmux. This might -# disable text selection, unless you press shift. -#--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse" - -# Syntax mappings: map a certain filename pattern to a language. -# Example 1: use the C++ syntax for Arduino .ino files -# Example 2: Use ".gitignore"-style highlighting for ".ignore" files -#--map-syntax "*.ino:C++" -#--map-syntax ".ignore:Git Ignore" diff --git a/.config/bemenu.conf b/.config/bemenu.conf deleted file mode 100644 index a73145c..0000000 --- a/.config/bemenu.conf +++ /dev/null @@ -1,49 +0,0 @@ -# vim: ft=bash -bemenu_opts=( ---ignorecase ---no-overlap ---monitor focused ---binding vim ---scrollbar autohide - -# popup menu ---center ---width-factor 0.5 ---border 3 ---list 12 ---fixed-height ---wrap - -# start flavours ---fn \"DejaVu Sans Mono 10\" -# normal ---nb "#0c0c0c" ---nf "#bdc0ba" -# alternate ---ab "#0c0c0c" # "#fad689" ---af "#bdc0ba" -# title ---tb "#70649a" ---tf "#bdc0ba" -# filter ---fb "#0c0c0c" ---ff "#bdc0ba" -# selection ---sb "#86c166" ---sf "#0c0c0c" -# highlighted ---hb "#70649a" ---hf "#bdc0ba" -# scrollbar ---scb "#0c0c0c" ---scf "#fad689" -# border ---bdr "#70649a" -# feedback ---fbb "#cb1b45" ---fbf "#70649a" -# end flavours -) -export BEMENU_OPTS=${bemenu_opts[*]} -export BEMENU_BACKEND=wayland -unset bemenu_opts diff --git a/.config/easyeffects/autoload/input/alsa_input.usb-Audient_Audient_iD4-00.HiFi__id4_stereo_in_iD4_0_0_1__source:[In] Mic.json b/.config/easyeffects/autoload/input/alsa_input.usb-Audient_Audient_iD4-00.HiFi__id4_stereo_in_iD4_0_0_1__source:[In] Mic.json deleted file mode 100644 index fc90dfd..0000000 --- a/.config/easyeffects/autoload/input/alsa_input.usb-Audient_Audient_iD4-00.HiFi__id4_stereo_in_iD4_0_0_1__source:[In] Mic.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "device": "alsa_input.usb-Audient_Audient_iD4-00.HiFi__id4_stereo_in_iD4_0_0_1__source", - "device-description": "Audient iD4 XLR Microphone", - "device-profile": "[In] Mic", - "preset-name": "vox chain" -} diff --git a/.config/easyeffects/autoload/input/alsa_input.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.mono-fallback:analog-input-mic.json b/.config/easyeffects/autoload/input/alsa_input.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.mono-fallback:analog-input-mic.json deleted file mode 100644 index 6bb498b..0000000 --- a/.config/easyeffects/autoload/input/alsa_input.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.mono-fallback:analog-input-mic.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "device": "alsa_input.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.mono-fallback", - "device-description": "Audio Adapter (Unitek Y-247A) Mono", - "device-profile": "analog-input-mic", - "preset-name": "vox chain" -} diff --git a/.config/easyeffects/autoload/output/alsa_output.pci-0000_00_1f.3.analog-stereo:analog-output-speaker.json b/.config/easyeffects/autoload/output/alsa_output.pci-0000_00_1f.3.analog-stereo:analog-output-speaker.json deleted file mode 100644 index b915708..0000000 --- a/.config/easyeffects/autoload/output/alsa_output.pci-0000_00_1f.3.analog-stereo:analog-output-speaker.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "device": "alsa_output.pci-0000_00_1f.3.analog-stereo", - "device-description": "Built-in Audio Analog Stereo", - "device-profile": "analog-output-speaker", - "preset-name": "minimal" -} diff --git a/.config/easyeffects/autoload/output/alsa_output.usb-Audient_Audient_iD4-00.HiFi__id4_stereo_out_iD4_0_0_1__sink:[Out] Speaker.json b/.config/easyeffects/autoload/output/alsa_output.usb-Audient_Audient_iD4-00.HiFi__id4_stereo_out_iD4_0_0_1__sink:[Out] Speaker.json deleted file mode 100644 index 0231c0b..0000000 --- a/.config/easyeffects/autoload/output/alsa_output.usb-Audient_Audient_iD4-00.HiFi__id4_stereo_out_iD4_0_0_1__sink:[Out] Speaker.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "device": "alsa_output.usb-Audient_Audient_iD4-00.HiFi__id4_stereo_out_iD4_0_0_1__sink", - "device-description": "Audient iD4 Headphones / Monitor", - "device-profile": "[Out] Speaker", - "preset-name": "akg k712 pro" -} diff --git a/.config/easyeffects/autoload/output/alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo:analog-output-speaker.json b/.config/easyeffects/autoload/output/alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo:analog-output-speaker.json deleted file mode 100644 index 6d6ee7e..0000000 --- a/.config/easyeffects/autoload/output/alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo:analog-output-speaker.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "device": "alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo", - "device-description": "Audio Adapter (Unitek Y-247A) Analog Stereo", - "device-profile": "analog-output-speaker", - "preset-name": "ath m50x" -} diff --git a/.config/easyeffects/autoload/output/bluez_output.14_3F_A6_55_AF_A7.a2dp-sink:headset-output.json b/.config/easyeffects/autoload/output/bluez_output.14_3F_A6_55_AF_A7.a2dp-sink:headset-output.json deleted file mode 100644 index 12021a0..0000000 --- a/.config/easyeffects/autoload/output/bluez_output.14_3F_A6_55_AF_A7.a2dp-sink:headset-output.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "device": "bluez_output.14_3F_A6_55_AF_A7.a2dp-sink", - "device-description": "LE_WF-1000XM3", - "device-profile": "headset-output", - "preset-name": "sony wf-1000xm3" -} diff --git a/.config/easyeffects/input/vox chain.json b/.config/easyeffects/input/vox chain.json deleted file mode 100644 index 166e394..0000000 --- a/.config/easyeffects/input/vox chain.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "input": { - "blocklist": [], - "compressor": { - "attack": 20.0, - "boost-amount": 6.0, - "boost-threshold": -72.0, - "bypass": false, - "dry": -100.0, - "hpf-frequency": 10.0, - "hpf-mode": "off", - "input-gain": 0.0, - "knee": -6.0, - "lpf-frequency": 20000.0, - "lpf-mode": "off", - "makeup": 8.0, - "mode": "Downward", - "output-gain": 0.0, - "ratio": 4.0, - "release": 100.0, - "release-threshold": -100.0, - "sidechain": { - "lookahead": 0.0, - "mode": "RMS", - "preamp": 0.0, - "reactivity": 10.0, - "source": "Middle", - "type": "Feed-forward" - }, - "threshold": -12.0, - "wet": 0.0 - }, - "deesser": { - "bypass": false, - "detection": "RMS", - "f1-freq": 6000.0, - "f1-level": 0.0, - "f2-freq": 4500.0, - "f2-level": 12.0, - "f2-q": 1.0, - "input-gain": 0.0, - "laxity": 15, - "makeup": 0.0, - "mode": "Wide", - "output-gain": 0.0, - "ratio": 4.0, - "sc-listen": false, - "threshold": -35.0 - }, - "filter": { - "bypass": false, - "frequency": 80.0, - "inertia": 10.0, - "input-gain": 0.0, - "mode": "36dB/oct Highpass", - "output-gain": 0.0, - "resonance": -3.0 - }, - "limiter": { - "alr": false, - "alr-attack": 5.0, - "alr-knee": 0.0, - "alr-release": 50.0, - "attack": 5.0, - "bypass": false, - "dithering": "None", - "external-sidechain": false, - "gain-boost": true, - "input-gain": 0.0, - "lookahead": 5.0, - "mode": "Herm Thin", - "output-gain": 0.0, - "oversampling": "None", - "release": 5.0, - "sidechain-preamp": 0.0, - "stereo-link": 100.0, - "threshold": -0.5 - }, - "plugins_order": [ - "stereo_tools", - "rnnoise", - "compressor", - "filter", - "deesser", - "limiter" - ], - "rnnoise": { - "bypass": true, - "input-gain": 0.0, - "model-path": "", - "output-gain": 0.0 - }, - "stereo_tools": { - "balance-in": 0.0, - "balance-out": 0.0, - "bypass": false, - "delay": 0.0, - "input-gain": 0.0, - "middle-level": 0.0, - "middle-panorama": 0.0, - "mode": "LR > LL (Mono Left Channel)", - "mutel": false, - "muter": false, - "output-gain": 0.0, - "phasel": false, - "phaser": false, - "sc-level": 1.0, - "side-balance": 0.0, - "side-level": 0.0, - "softclip": false, - "stereo-base": 0.0, - "stereo-phase": 0.0 - } - } -} diff --git a/.config/easyeffects/irs/AKG K712 PRO minimum phase 44100Hz.irs b/.config/easyeffects/irs/AKG K712 PRO minimum phase 44100Hz.irs deleted file mode 100644 index 623909e..0000000 --- a/.config/easyeffects/irs/AKG K712 PRO minimum phase 44100Hz.irs +++ /dev/null Binary files differdiff --git a/.config/easyeffects/irs/Audio-Technica ATH-M50x (Massdrop velours earpads) minimum phase 44100Hz.irs b/.config/easyeffects/irs/Audio-Technica ATH-M50x (Massdrop velours earpads) minimum phase 44100Hz.irs deleted file mode 100644 index 98a5231..0000000 --- a/.config/easyeffects/irs/Audio-Technica ATH-M50x (Massdrop velours earpads) minimum phase 44100Hz.irs +++ /dev/null Binary files differdiff --git a/.config/easyeffects/irs/Audio-Technica ATH-M50x minimum phase 44100Hz.irs b/.config/easyeffects/irs/Audio-Technica ATH-M50x minimum phase 44100Hz.irs deleted file mode 100644 index 68a42e0..0000000 --- a/.config/easyeffects/irs/Audio-Technica ATH-M50x minimum phase 44100Hz.irs +++ /dev/null Binary files differdiff --git a/.config/easyeffects/irs/Sony WF-1000XM3 minimum phase 44100Hz.irs b/.config/easyeffects/irs/Sony WF-1000XM3 minimum phase 44100Hz.irs deleted file mode 100644 index 79242c1..0000000 --- a/.config/easyeffects/irs/Sony WF-1000XM3 minimum phase 44100Hz.irs +++ /dev/null Binary files differdiff --git a/.config/easyeffects/output/akg k712 pro.json b/.config/easyeffects/output/akg k712 pro.json deleted file mode 100644 index d5aa2ff..0000000 --- a/.config/easyeffects/output/akg k712 pro.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "output": { - "blocklist": [], - "convolver": { - "autogain": true, - "bypass": false, - "input-gain": -4.0, - "ir-width": 100, - "kernel-path": "/home/robert/.config/easyeffects/irs/AKG K712 PRO minimum phase 44100Hz.irs", - "output-gain": 0.0 - }, - "crossfeed": { - "bypass": true, - "fcut": 650, - "feed": 9.0, - "input-gain": 0.0, - "output-gain": 0.0 - }, - "limiter": { - "alr": false, - "alr-attack": 5.0, - "alr-knee": 0.0, - "alr-release": 50.0, - "attack": 5.0, - "bypass": false, - "dithering": "None", - "external-sidechain": false, - "gain-boost": true, - "input-gain": 0.0, - "lookahead": 6.0, - "mode": "Herm Thin", - "output-gain": 0.0, - "oversampling": "Half x4(3L)", - "release": 5.0, - "sidechain-preamp": 0.0, - "stereo-link": 100.0, - "threshold": -1.0 - }, - "plugins_order": [ - "limiter", - "convolver", - "crossfeed" - ] - } -} diff --git a/.config/easyeffects/output/ath m50x.json b/.config/easyeffects/output/ath m50x.json deleted file mode 100644 index 3809b6a..0000000 --- a/.config/easyeffects/output/ath m50x.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "output": { - "blocklist": [], - "convolver": { - "autogain": true, - "bypass": false, - "input-gain": -4.0, - "ir-width": 100, - "kernel-path": "/home/robert/.config/easyeffects/irs/Audio-Technica ATH-M50x (Massdrop velours earpads) minimum phase 44100Hz.irs", - "output-gain": 0.0 - }, - "crossfeed": { - "bypass": true, - "fcut": 650, - "feed": 9.0, - "input-gain": 0.0, - "output-gain": 0.0 - }, - "limiter": { - "alr": false, - "alr-attack": 5.0, - "alr-knee": 0.0, - "alr-release": 50.0, - "attack": 5.0, - "bypass": false, - "dithering": "None", - "external-sidechain": false, - "gain-boost": true, - "input-gain": 0.0, - "lookahead": 10.0, - "mode": "Herm Thin", - "output-gain": 0.0, - "oversampling": "Half x4(3L)", - "release": 5.0, - "sidechain-preamp": 0.0, - "stereo-link": 100.0, - "threshold": -0.9999999999999999 - }, - "plugins_order": [ - "convolver", - "limiter", - "crossfeed" - ] - } -} diff --git a/.config/easyeffects/output/minimal.json b/.config/easyeffects/output/minimal.json deleted file mode 100644 index ddc4b00..0000000 --- a/.config/easyeffects/output/minimal.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "output": { - "blocklist": [], - "crossfeed": { - "bypass": true, - "fcut": 650, - "feed": 9.0, - "input-gain": 0.0, - "output-gain": 0.0 - }, - "limiter": { - "alr": false, - "alr-attack": 5.0, - "alr-knee": 0.0, - "alr-release": 50.0, - "attack": 5.0, - "bypass": false, - "dithering": "None", - "external-sidechain": false, - "gain-boost": true, - "input-gain": 0.0, - "lookahead": 10.0, - "mode": "Herm Thin", - "output-gain": 0.0, - "oversampling": "Half x4(3L)", - "release": 5.0, - "sidechain-preamp": 0.0, - "stereo-link": 100.0, - "threshold": -0.9999999999999999 - }, - "plugins_order": [ - "limiter", - "crossfeed" - ] - } -} diff --git a/.config/easyeffects/output/sony wf-1000xm3.json b/.config/easyeffects/output/sony wf-1000xm3.json deleted file mode 100644 index 528a852..0000000 --- a/.config/easyeffects/output/sony wf-1000xm3.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "output": { - "blocklist": [], - "convolver": { - "autogain": true, - "bypass": false, - "input-gain": -4.0, - "ir-width": 100, - "kernel-path": "/home/robert/.config/easyeffects/irs/Sony WF-1000XM3 minimum phase 44100Hz.irs", - "output-gain": 0.0 - }, - "limiter": { - "alr": false, - "alr-attack": 5.0, - "alr-knee": 0.0, - "alr-release": 50.0, - "attack": 5.0, - "bypass": false, - "dithering": "None", - "external-sidechain": false, - "gain-boost": true, - "input-gain": 0.0, - "lookahead": 10.0, - "mode": "Herm Thin", - "output-gain": 0.0, - "oversampling": "Half x4(3L)", - "release": 5.0, - "sidechain-preamp": 0.0, - "stereo-link": 100.0, - "threshold": -0.9999999999999999 - }, - "plugins_order": [ - "convolver", - "limiter" - ] - } -} diff --git a/.config/evdoublebind/config b/.config/evdoublebind/config deleted file mode 100644 index b5feede..0000000 --- a/.config/evdoublebind/config +++ /dev/null @@ -1,3 +0,0 @@ -unused : <ESC> -kbd: /dev/input/by-path/platform-i8042-serio-0-event-kbd -<CAPS> : void | void diff --git a/.config/firejail/calibre.local b/.config/firejail/calibre.local deleted file mode 100644 index 46b4dc2..0000000 --- a/.config/firejail/calibre.local +++ /dev/null @@ -1,9 +0,0 @@ - -include qtwlfix.inc -#include x11fy.inc - -whitelist ${HOME}/Documents/bookcloud3 -whitelist ${HOME}/Downloads/inbox -whitelist ${HOME}/.config/calibre - -ignore protocol unix,inet,inet6,netlink diff --git a/.config/firejail/default.local b/.config/firejail/default.local deleted file mode 100644 index bfade50..0000000 --- a/.config/firejail/default.local +++ /dev/null @@ -1,27 +0,0 @@ - -apparmor -machine-id -net none - -no3d -nodvd -nogroups -nosound -notv -nou2f -novideo - -shell none -tracelog - -disable-mnt -private -private-cache -private-dev - -private-etc alternatives,fonts,machine-id -private-opt none -private-tmp - -dbus-user none -dbus-system none diff --git a/.config/firejail/discord.local b/.config/firejail/discord.local deleted file mode 100644 index 15b3ef9..0000000 --- a/.config/firejail/discord.local +++ /dev/null @@ -1,40 +0,0 @@ - -include x11fy.inc - -dbus-user filter -dbus-user.talk org.freedesktop.Notifications -dbus-user.talk org.freedesktop.portal.* -dbus-system none - -#ignore nogroups - -# we want webcam -ignore novideo -# can't do anything without network -ignore net none -# TODO is this needed? -# ignore memory-deny-write-execute - -#ignore apparmor -#ignore noexec ${HOME} - -whitelist ${HOME}/.config/discord -whitelist ${HOME}/.gtkrc-2.0 -whitelist ${HOME}/.themes -#whitelist ${DOWNLOADS} - -# appindicator breaks without this -# ignore private-tmp - -# hide a bunch of stuff -# blacklist /tmp/wl-copy* -# blacklist /tmp/nvim* -# blacklist /tmp/go-build* -# blacklist /tmp/gopls* -# blacklist /tmp/lua-language-server* -# blacklist /tmp/ssh* -# blacklist /tmp/waybar* -# blacklist /tmp/sway* -# blacklist /tmp/keepass* -# blacklist /tmp/fzf-interactive* - diff --git a/.config/firejail/electron.local b/.config/firejail/electron.local deleted file mode 100644 index d13f71a..0000000 --- a/.config/firejail/electron.local +++ /dev/null @@ -1 +0,0 @@ -include chromium-common-hardened.inc.profile diff --git a/.config/firejail/firefox.local b/.config/firejail/firefox.local deleted file mode 100644 index caf5469..0000000 --- a/.config/firejail/firefox.local +++ /dev/null @@ -1,6 +0,0 @@ - -ignore dbus-user none -dbus-user filter -dbus-user.talk org.freedesktop.Notifications -dbus-user.talk org.freedesktop.portal.* -dbus-system none diff --git a/.config/firejail/gimp.local b/.config/firejail/gimp.local deleted file mode 100644 index f9b29ce..0000000 --- a/.config/firejail/gimp.local +++ /dev/null @@ -1,3 +0,0 @@ - -whitelist /usr/lib64/* -env LD_PRELOAD=/usr/lib64/libwayland-client.so:/usr/lib64/libwayland-server.so:/usr/lib64/libwayland-cursor.so:/usr/lib64/libwayland-egl.so:/usr/lib64/libgdk-3.so:/usr/lib64/libgdk_pixbuf-2.0.so diff --git a/.config/firejail/kdenlive.local b/.config/firejail/kdenlive.local deleted file mode 100644 index 1191a73..0000000 --- a/.config/firejail/kdenlive.local +++ /dev/null @@ -1,9 +0,0 @@ - -include qtwlfix.inc -blacklist /usr/share/fonts/noto-emoji - -env QT_QPA_PLATFORM=xcb -ignore net none - -#whitelist /usr/lib64/* -#env LD_PRELOAD=/usr/lib64/libwayland-client.so:/usr/lib64/libwayland-egl.so:/usr/lib64/qt5/plugins/platforms/libqwayland-egl.so:/usr/lib64/qt5/plugins/wayland-shell-integration/libfullscreen-shell-v1.so:/usr/lib64/qt5/plugins/wayland-shell-integration/libxdg-shell.so:/usr/lib64/qt5/plugins/wayland-shell-integration/libxdg-shell-v5.so:/usr/lib64/qt5/plugins/wayland-shell-integration/libxdg-shell-v6.so:/usr/lib64/libQt5WaylandClient.so diff --git a/.config/firejail/libva.inc b/.config/firejail/libva.inc deleted file mode 100644 index eb58a15..0000000 --- a/.config/firejail/libva.inc +++ /dev/null @@ -1,2 +0,0 @@ - -env LIBVA_DRIVER_NAME=iHD diff --git a/.config/firejail/lossless-cut.local b/.config/firejail/lossless-cut.local deleted file mode 100644 index 351231f..0000000 --- a/.config/firejail/lossless-cut.local +++ /dev/null @@ -1,2 +0,0 @@ -include x11fy.inc -#include whitelist-runuser-common.inc diff --git a/.config/firejail/obs.local b/.config/firejail/obs.local deleted file mode 100644 index 7a9c9c7..0000000 --- a/.config/firejail/obs.local +++ /dev/null @@ -1,6 +0,0 @@ - -include qtwlfix.inc - -ignore dbus-user none -dbus-user filter -dbus-user.talk org.freedesktop.portal.* diff --git a/.config/firejail/osu.profile b/.config/firejail/osu.profile deleted file mode 100644 index afdb7e3..0000000 --- a/.config/firejail/osu.profile +++ /dev/null @@ -1,6 +0,0 @@ - -include whitelist-common.inc -include whitelist-runuser-common.inc - -whitelist ${HOME}/.cache/thumbnails -whitelist ${HOME}/.local/share/osu diff --git a/.config/firejail/portal.inc b/.config/firejail/portal.inc deleted file mode 100644 index 324cdc2..0000000 --- a/.config/firejail/portal.inc +++ /dev/null @@ -1,10 +0,0 @@ -ignore dbus-user none -dbus-user filter -dbus-user.talk org.freedesktop.Notifications -dbus-user.talk org.freedesktop.portal.* -dbus-system none - -# allow opening links via portal -whitelist ${HOME}/bin -ignore noexec ${HOME} -#private-bin gdbus,wl-copy,notify-send diff --git a/.config/firejail/qtwlfix.inc b/.config/firejail/qtwlfix.inc deleted file mode 100644 index 45dabbf..0000000 --- a/.config/firejail/qtwlfix.inc +++ /dev/null @@ -1,9 +0,0 @@ - -rmenv QT_WAYLAND_FORCE_DPI -rmenv QT_STYLE_OVERRIDE -rmenv QT_QPA_PLATFORMTHEME -rmenv QT_IM_MODULE -rmenv QT_QPA_PLATFORM - -env QT_QPA_PLATFORM=wayland -env QT_WAYLAND_DISABLE_WINDOWDECORATION=1 diff --git a/.config/firejail/slack.local b/.config/firejail/slack.local deleted file mode 100644 index 4bc95b2..0000000 --- a/.config/firejail/slack.local +++ /dev/null @@ -1,12 +0,0 @@ -include x11fy.inc - -# ignore dbus-user none -dbus-user filter -dbus-user.talk org.freedesktop.Notifications -dbus-user.talk org.freedesktop.portal.* -#dbus-system none - -# allow opening links via portal -whitelist ${HOME}/bin -ignore noexec ${HOME} -private-bin slack,gdbus diff --git a/.config/firejail/spotify.local b/.config/firejail/spotify.local deleted file mode 100644 index b412965..0000000 --- a/.config/firejail/spotify.local +++ /dev/null @@ -1,8 +0,0 @@ -include portal.inc -dbus-user.own org.mpris.MediaPlayer2.spotify - -include libva.inc -include qtwlfix.inc - -#ignore private-etc -ignore private-tmp diff --git a/.config/firejail/telegram.local b/.config/firejail/telegram.local deleted file mode 100644 index 20468f1..0000000 --- a/.config/firejail/telegram.local +++ /dev/null @@ -1,8 +0,0 @@ - -#rmenv QT_WAYLAND_FORCE_DPI -include portal.inc -include qtwlfix.inc -env QT_QPA_PLATFORMTHEME=gtk3 - -blacklist /usr/share/fonts/noto* -#private-bin telegram-desktop diff --git a/.config/firejail/tor-browser.local b/.config/firejail/tor-browser.local deleted file mode 100644 index 9d520b2..0000000 --- a/.config/firejail/tor-browser.local +++ /dev/null @@ -1,2 +0,0 @@ - -whitelist /opt/torbrowser diff --git a/.config/firejail/x11fy.inc b/.config/firejail/x11fy.inc deleted file mode 100644 index ea4e183..0000000 --- a/.config/firejail/x11fy.inc +++ /dev/null @@ -1,10 +0,0 @@ -rmenv GDK_BACKEND -rmenv CLUTTER_BACKEND -rmenv QT_QPA_PLATFORM -rmenv SDL_VIDEODRIVER -rmenv ECORE_EVAS_ENGINE -rmenv ELM_ENGINE -rmenv _JAVA_AWT_WM_NONREPARENTING -rmenv GTK_IM_MODULE -rmenv QT_IM_MODULE -rmenv GTK_CSD diff --git a/.config/firejail/zoom.local b/.config/firejail/zoom.local deleted file mode 100644 index 8a39b93..0000000 --- a/.config/firejail/zoom.local +++ /dev/null @@ -1,11 +0,0 @@ - -#include qtwlfix.inc -include portal.inc -#private-bin gdbus,wl-copy,notify-send - -private-etc alternatives,ca-certificates,crypto-policies,fonts,group,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,machine-id,nsswitch.conf,pki,resolv.conf,ssl,os-release - -# fix screensharing -env XDG_CURRENT_DESKTOP=GNOME - -env XDG_CACHE_HOME=/tmp/ diff --git a/.config/flavours/change_font.sh b/.config/flavours/change_font.sh deleted file mode 100644 index 79f34a8..0000000 --- a/.config/flavours/change_font.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -ex - -UIFONT="Iosevka Etoile" -MONOFONT="Iosevka SS04 Extended" - -fd 'hibiki.mustache.in' \ - -x sh -c "sed -e 's,@uifont@,$UIFONT,g' -e 's,@monofont@,$MONOFONT,g' {} >{.}" diff --git a/.config/flavours/config.toml b/.config/flavours/config.toml deleted file mode 100644 index e12acc1..0000000 --- a/.config/flavours/config.toml +++ /dev/null @@ -1,54 +0,0 @@ -shell = "bash -c '{}'" - -[[items]] -template = "waybar" -subtemplate = "hibiki" -file = "~/.config/waybar/style.css" -start = "/* start flavours */" -end = "/* end flavours */" -hook = "doas -n s6-svc -r /run/s6-rc/servicedirs/waybar-srv/" - -[[items]] -template = "foot" -subtemplate = "hibiki" -file = "~/.config/foot/colors.ini" -rewrite = true -#hook = "doas -n s6-svc -r /run/s6-rc/servicedirs/footserver-srv/" - -[[items]] -template = "sway" -subtemplate = "hibiki" -file = "~/.config/sway/config.d/colors.conf" -rewrite = true -hook = "swaymsg reload" -light = false - -[[items]] -template = "vimiv" -subtemplate = "hibiki" -file = "~/.config/vimiv/styles/base16" -start = "; start flavours" -end = "; end flavours" - -[[items]] -template = "bemenu" -subtemplate = "hibiki" -file = "~/.config/bemenu.conf" -start = "# start flavours" -end = "# end flavours" - -[[items]] -template = "neovim" -subtemplate = "hibiki" -file = "~/.config/nvim/lua/internal/colors.lua" -rewrite = true - -[[items]] -template = "mako" -subtemplate = "hibiki" -file = "~/.config/mako/config" -start = "# start flavours" -end = "# end flavours" -hook = "makoctl reload" - -# TODO aerc diff --git a/.config/flavours/schemes/base16-oxocarbon b/.config/flavours/schemes/base16-oxocarbon deleted file mode 160000 -Subproject f6944a9536b1e2f2879a32e49b104b2b4c09dfe diff --git a/.config/flavours/schemes/karafuru/karafuru.yaml b/.config/flavours/schemes/karafuru/karafuru.yaml deleted file mode 100644 index acdac6f..0000000 --- a/.config/flavours/schemes/karafuru/karafuru.yaml +++ /dev/null @@ -1,20 +0,0 @@ -scheme: "Karafuru Dark" -author: "robertgzr" - -base00: "1c1c1c" -base01: "db4d6d" -base02: "5dac81" -base03: "fad689" -base04: "58b2dc" -base05: "70649a" -base06: "69b0ac" -base07: "bdc0ba" - -base08: "4f4f48" -base09: "cb1b45" -base0A: "86c166" -base0B: "f7d94c" -base0C: "2ea9df" -base0D: "8a6bbe" -base0E: "81c7d4" -base0F: "fffffb" diff --git a/.config/flavours/templates/bemenu/templates/hibiki.mustache b/.config/flavours/templates/bemenu/templates/hibiki.mustache deleted file mode 100644 index 433aeb3..0000000 --- a/.config/flavours/templates/bemenu/templates/hibiki.mustache +++ /dev/null @@ -1,27 +0,0 @@ ---fn \"Iosevka SS04 Extended 10\" -# normal ---nb "#{{base00-hex}}" ---nf "#{{base07-hex}}" -# alternate ---ab "#{{base00-hex}}" ---af "#{{base07-hex}}" -# title ---tb "#{{base05-hex}}" ---tf "#{{base07-hex}}" -# filter ---fb "#{{base00-hex}}" ---ff "#{{base07-hex}}" -# selection ---sb "#{{base0A-hex}}" ---sf "#{{base00-hex}}" -# highlighted ---hb "#{{base05-hex}}" ---hf "#{{base07-hex}}" -# scrollbar ---scb "#{{base00-hex}}" ---scf "#{{base08-hex}}" -# border ---bdr "#{{base05-hex}}" -# feedback ---fbb "#{{base09-hex}}" ---fbf "#{{base05-hex}}" diff --git a/.config/flavours/templates/bemenu/templates/hibiki.mustache.in b/.config/flavours/templates/bemenu/templates/hibiki.mustache.in deleted file mode 100644 index bb11b38..0000000 --- a/.config/flavours/templates/bemenu/templates/hibiki.mustache.in +++ /dev/null @@ -1,27 +0,0 @@ ---fn \"@monofont@ 10\" -# normal ---nb "#{{base00-hex}}" ---nf "#{{base07-hex}}" -# alternate ---ab "#{{base00-hex}}" ---af "#{{base07-hex}}" -# title ---tb "#{{base05-hex}}" ---tf "#{{base07-hex}}" -# filter ---fb "#{{base00-hex}}" ---ff "#{{base07-hex}}" -# selection ---sb "#{{base0A-hex}}" ---sf "#{{base00-hex}}" -# highlighted ---hb "#{{base05-hex}}" ---hf "#{{base07-hex}}" -# scrollbar ---scb "#{{base00-hex}}" ---scf "#{{base08-hex}}" -# border ---bdr "#{{base05-hex}}" -# feedback ---fbb "#{{base09-hex}}" ---fbf "#{{base05-hex}}" diff --git a/.config/flavours/templates/foot/templates/hibiki.mustache b/.config/flavours/templates/foot/templates/hibiki.mustache deleted file mode 100644 index 3dc4df2..0000000 --- a/.config/flavours/templates/foot/templates/hibiki.mustache +++ /dev/null @@ -1,28 +0,0 @@ -# Base16 Karafuru Dark - foot color config -# robertgzr - -font=Iosevka SS04 Extended:size=11,Sarasa Fixed J:size=12,Noto Emoji,Material Design Icons Desktop - -[colors] -background={{base00-hex}} -foreground={{base0F-hex}} - -# Normal colors -regular0={{base00-hex}} # Black -regular1={{base01-hex}} # Red -regular2={{base02-hex}} # Green -regular3={{base03-hex}} # Yellow -regular4={{base04-hex}} # Blue -regular5={{base05-hex}} # Magenta -regular6={{base06-hex}} # Cyan -regular7={{base07-hex}} # White - -# Bright colors -bright0={{base08-hex}} -bright1={{base09-hex}} -bright2={{base0A-hex}} -bright3={{base0B-hex}} -bright4={{base0C-hex}} -bright5={{base0D-hex}} -bright6={{base0E-hex}} -bright7={{base0F-hex}} diff --git a/.config/flavours/templates/foot/templates/hibiki.mustache.in b/.config/flavours/templates/foot/templates/hibiki.mustache.in deleted file mode 100644 index 7cb3b6a..0000000 --- a/.config/flavours/templates/foot/templates/hibiki.mustache.in +++ /dev/null @@ -1,28 +0,0 @@ -# Base16 Karafuru Dark - foot color config -# robertgzr - -font=@monofont@:size=11,Sarasa Fixed J:size=12,Noto Emoji,Material Design Icons Desktop - -[colors] -background={{base00-hex}} -foreground={{base0F-hex}} - -# Normal colors -regular0={{base00-hex}} # Black -regular1={{base01-hex}} # Red -regular2={{base02-hex}} # Green -regular3={{base03-hex}} # Yellow -regular4={{base04-hex}} # Blue -regular5={{base05-hex}} # Magenta -regular6={{base06-hex}} # Cyan -regular7={{base07-hex}} # White - -# Bright colors -bright0={{base08-hex}} -bright1={{base09-hex}} -bright2={{base0A-hex}} -bright3={{base0B-hex}} -bright4={{base0C-hex}} -bright5={{base0D-hex}} -bright6={{base0E-hex}} -bright7={{base0F-hex}} diff --git a/.config/flavours/templates/mako/templates/hibiki.mustache b/.config/flavours/templates/mako/templates/hibiki.mustache deleted file mode 100644 index d14ea03..0000000 --- a/.config/flavours/templates/mako/templates/hibiki.mustache +++ /dev/null @@ -1,5 +0,0 @@ -font=Iosevka Etoile 10 -background-color=#{{base00-hex}} -text-color=#{{base0F-hex}} -border-color=#{{base05-hex}}dd -progress-color=source #{{base05-hex}}dd diff --git a/.config/flavours/templates/mako/templates/hibiki.mustache.in b/.config/flavours/templates/mako/templates/hibiki.mustache.in deleted file mode 100644 index c7632b5..0000000 --- a/.config/flavours/templates/mako/templates/hibiki.mustache.in +++ /dev/null @@ -1,5 +0,0 @@ -font=@uifont@ 10 -background-color=#{{base00-hex}} -text-color=#{{base0F-hex}} -border-color=#{{base05-hex}}dd -progress-color=source #{{base05-hex}}dd diff --git a/.config/flavours/templates/neovim/templates/hibiki.mustache b/.config/flavours/templates/neovim/templates/hibiki.mustache deleted file mode 100644 index 42403d3..0000000 --- a/.config/flavours/templates/neovim/templates/hibiki.mustache +++ /dev/null @@ -1,18 +0,0 @@ -return { - base00 = '#{{base00-hex}}', - base01 = '#{{base01-hex}}', - base02 = '#{{base02-hex}}', - base03 = '#{{base03-hex}}', - base04 = '#{{base04-hex}}', - base05 = '#{{base05-hex}}', - base06 = '#{{base06-hex}}', - base07 = '#{{base07-hex}}', - base08 = '#{{base08-hex}}', - base09 = '#{{base09-hex}}', - base0A = '#{{base0A-hex}}', - base0B = '#{{base0B-hex}}', - base0C = '#{{base0C-hex}}', - base0D = '#{{base0D-hex}}', - base0E = '#{{base0E-hex}}', - base0F = '#{{base0F-hex}}', -} diff --git a/.config/flavours/templates/sway/templates/hibiki.mustache b/.config/flavours/templates/sway/templates/hibiki.mustache deleted file mode 100644 index 77487cc..0000000 --- a/.config/flavours/templates/sway/templates/hibiki.mustache +++ /dev/null @@ -1,18 +0,0 @@ -# vim: ft=swayconfig - -font pango:Iosevka Etoile 9 - -set $text #{{base0F-hex}} -set $text2 #{{base07-hex}} -set $bg #{{base00-hex}} -set $bg2 #{{base05-hex}} -set $main #{{base05-hex}} -set $main2 #{{base0D-hex}} -set $urgent #{{base09-hex}} -set $urgent2 #{{base01-hex}} -set $indicator $text2 - -client.focused $main $main $text $indicator $main -client.focused_inactive $bg $bg $text2 $bg $bg -client.unfocused $bg $bg $text2 $bg $bg -client.urgent $urgent2 $urgent $text $urgent2 $urgent diff --git a/.config/flavours/templates/sway/templates/hibiki.mustache.in b/.config/flavours/templates/sway/templates/hibiki.mustache.in deleted file mode 100644 index 9b1b331..0000000 --- a/.config/flavours/templates/sway/templates/hibiki.mustache.in +++ /dev/null @@ -1,18 +0,0 @@ -# vim: ft=swayconfig - -font pango:@uifont@ 9 - -set $text #{{base0F-hex}} -set $text2 #{{base07-hex}} -set $bg #{{base00-hex}} -set $bg2 #{{base05-hex}} -set $main #{{base05-hex}} -set $main2 #{{base0D-hex}} -set $urgent #{{base09-hex}} -set $urgent2 #{{base01-hex}} -set $indicator $text2 - -client.focused $main $main $text $indicator $main -client.focused_inactive $bg $bg $text2 $bg $bg -client.unfocused $bg $bg $text2 $bg $bg -client.urgent $urgent2 $urgent $text $urgent2 $urgent diff --git a/.config/flavours/templates/vimiv/templates/hibiki.mustache b/.config/flavours/templates/vimiv/templates/hibiki.mustache deleted file mode 100644 index ba9bd20..0000000 --- a/.config/flavours/templates/vimiv/templates/hibiki.mustache +++ /dev/null @@ -1,17 +0,0 @@ -font = 10pt Iosevka Etoile -base00 = #{{base00-hex}} -base01 = #{{base01-hex}} -base02 = #{{base02-hex}} -base03 = #{{base03-hex}} -base04 = #{{base04-hex}} -base05 = #{{base05-hex}} -base06 = #{{base06-hex}} -base07 = #{{base07-hex}} -base08 = #{{base08-hex}} -base09 = #{{base09-hex}} -base0a = #{{base0A-hex}} -base0b = #{{base0B-hex}} -base0c = #{{base0C-hex}} -base0d = #{{base0D-hex}} -base0e = #{{base0E-hex}} -base0f = #{{base0F-hex}} diff --git a/.config/flavours/templates/vimiv/templates/hibiki.mustache.in b/.config/flavours/templates/vimiv/templates/hibiki.mustache.in deleted file mode 100644 index 2c09f4f..0000000 --- a/.config/flavours/templates/vimiv/templates/hibiki.mustache.in +++ /dev/null @@ -1,17 +0,0 @@ -font = 10pt @uifont@ -base00 = #{{base00-hex}} -base01 = #{{base01-hex}} -base02 = #{{base02-hex}} -base03 = #{{base03-hex}} -base04 = #{{base04-hex}} -base05 = #{{base05-hex}} -base06 = #{{base06-hex}} -base07 = #{{base07-hex}} -base08 = #{{base08-hex}} -base09 = #{{base09-hex}} -base0a = #{{base0A-hex}} -base0b = #{{base0B-hex}} -base0c = #{{base0C-hex}} -base0d = #{{base0D-hex}} -base0e = #{{base0E-hex}} -base0f = #{{base0F-hex}} diff --git a/.config/flavours/templates/waybar/templates/hibiki.mustache b/.config/flavours/templates/waybar/templates/hibiki.mustache deleted file mode 100644 index 5ef11bb..0000000 --- a/.config/flavours/templates/waybar/templates/hibiki.mustache +++ /dev/null @@ -1,21 +0,0 @@ -@define-color base00 #{{base00-hex}}; -@define-color base01 #{{base01-hex}}; -@define-color base02 #{{base02-hex}}; -@define-color base03 #{{base03-hex}}; -@define-color base04 #{{base04-hex}}; -@define-color base05 #{{base05-hex}}; -@define-color base06 #{{base06-hex}}; -@define-color base07 #{{base07-hex}}; -@define-color base08 #{{base08-hex}}; -@define-color base09 #{{base09-hex}}; -@define-color base0A #{{base0A-hex}}; -@define-color base0B #{{base0B-hex}}; -@define-color base0C #{{base0C-hex}}; -@define-color base0D #{{base0D-hex}}; -@define-color base0E #{{base0E-hex}}; -@define-color base0F #{{base0F-hex}}; - -* { - font-family: Iosevka Etoile, Sarasa Fixed J, Material Design Icons; - font-size: 9pt; -} diff --git a/.config/flavours/templates/waybar/templates/hibiki.mustache.in b/.config/flavours/templates/waybar/templates/hibiki.mustache.in deleted file mode 100644 index ddd8d07..0000000 --- a/.config/flavours/templates/waybar/templates/hibiki.mustache.in +++ /dev/null @@ -1,21 +0,0 @@ -@define-color base00 #{{base00-hex}}; -@define-color base01 #{{base01-hex}}; -@define-color base02 #{{base02-hex}}; -@define-color base03 #{{base03-hex}}; -@define-color base04 #{{base04-hex}}; -@define-color base05 #{{base05-hex}}; -@define-color base06 #{{base06-hex}}; -@define-color base07 #{{base07-hex}}; -@define-color base08 #{{base08-hex}}; -@define-color base09 #{{base09-hex}}; -@define-color base0A #{{base0A-hex}}; -@define-color base0B #{{base0B-hex}}; -@define-color base0C #{{base0C-hex}}; -@define-color base0D #{{base0D-hex}}; -@define-color base0E #{{base0E-hex}}; -@define-color base0F #{{base0F-hex}}; - -* { - font-family: @uifont@, Sarasa Fixed J, Material Design Icons; - font-size: 9pt; -} diff --git a/.config/foot/colors.ini b/.config/foot/colors.ini deleted file mode 120000 index e12ed5d..0000000 --- a/.config/foot/colors.ini +++ /dev/null @@ -1 +0,0 @@ -colors_kanagawabones.ini \ No newline at end of file diff --git a/.config/foot/colors_kanagawabones.ini b/.config/foot/colors_kanagawabones.ini deleted file mode 100644 index 3537ffa..0000000 --- a/.config/foot/colors_kanagawabones.ini +++ /dev/null @@ -1,24 +0,0 @@ -# This file is auto-generated by shipwright.nvim -# -*- conf -*- -font=Iosevka SS06 Extended:size=10,IPAexGothic,Noto Sans Mono CJK JP,Noto Color Emoji,Material Design Icons Desktop -[cursor] -color=1F1F28 E6E0C2 -[colors] -foreground=fffffb -background=080808 -regular0=1F1F28 -regular1=E46A78 -regular2=98BC6D -regular3=E5C283 -regular4=7EB3C9 -regular5=957FB8 -regular6=7EB3C9 -regular7=DDD8BB -bright0=3C3C51 -bright1=EC818C -bright2=9EC967 -bright3=F1C982 -bright4=7BC2DF -bright5=A98FD2 -bright6=7BC2DF -bright7=A8A48D diff --git a/.config/foot/colors_karafuru.ini b/.config/foot/colors_karafuru.ini deleted file mode 100644 index d991db1..0000000 --- a/.config/foot/colors_karafuru.ini +++ /dev/null @@ -1,28 +0,0 @@ -# Base16 Karafuru Dark - foot color config -# robertgzr - -font=Iosevka SS04 Extended:size=9,IPAexGothic,Noto Sans Mono CJK JP,Noto Color Emoji,Material Design Icons Desktop - -[colors] -background=080808 -foreground=fffffb - -# Normal colors -regular0=080808 # Black -regular1=db4d6d # Red -regular2=5dac81 # Green -regular3=fad689 # Yellow -regular4=58b2dc # Blue -regular5=70649a # Magenta -regular6=69b0ac # Cyan -regular7=bdc0ba # White - -# Bright colors -bright0=4f4f48 -bright1=cb1b45 -bright2=86c166 -bright3=f7d94c -bright4=2ea9df -bright5=8a6bbe -bright6=81c7d4 -bright7=fffffb diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini deleted file mode 100644 index a8829d1..0000000 --- a/.config/foot/foot.ini +++ /dev/null @@ -1,52 +0,0 @@ -include=~/.config/foot/colors.ini - -term=foot-direct -bold-text-in-bright=no -box-drawings-uses-font-glyphs=no -resize-delay-ms=0 -initial-window-size-pixels=2560x1440 -dpi-aware=no -pad=2x2 - -[colors] -# color overwrites -alpha=0.99 - -[bell] -urgent=yes -notify=no -#command=beep -b -#command-focused=beep -b - -[scrollback] -lines=1000 - -[mouse] -hide-when-typing=no -alternate-scroll-mode=no - -[key-bindings] -unicode-input=Control+Mod1+u -show-urls-launch=Control+Shift+u -pipe-visible=[sh -c 'wl-copy ; notify-send foot "copied visible"'] Control+Shift+y -pipe-visible=[sh -c 'env MENU_PROMPT=" foot-pipe" menu -l10 | xargs -r wl-copy'] Control+Shift+o -pipe-scrollback=[sh -c 'grab-uris | sort -u | env MENU_PROMPT=" foot-pipe" menu -l10 | xargs -r url-launcher'] Control+Shift+p -pipe-scrollback=[sh -c 'wl-copy ; notify-send foot "copied scrollback"'] Control+Shift+l - -[url] -osc8-underline=always -launch=porta open-uri ${url} - -[search-bindings] -cancel=Escape -commit=Return - -[url-bindings] -cancel=Escape -toggle-url-visible=t - -[tweak] -grapheme-shaping=yes -overflowing-glyphs=yes -font-monospace-warn=no -max-shm-pool-size-mb=1024 diff --git a/.config/ghostty/config b/.config/ghostty/config deleted file mode 100644 index 9ac90ee..0000000 --- a/.config/ghostty/config +++ /dev/null @@ -1,39 +0,0 @@ -term = ghostty -shell-integration = none - -cursor-style-blink = false -confirm-close-surface = false -resize-overlay = never - -window-decoration = none -gtk-titlebar = false - -window-theme = system -window-padding-balance = true -window-padding-color = extend - -font-size = 10 -font-family = "" -font-family = "Iosevka SS06 Extended" -font-family = "IPAexGothic" -font-family = "Noto Sans Mono CJK JP" -font-family = "Noto Sans Mono CJK KR" -font-family = "Noto Color Emoji" -font-family = "Material Design Icons Desktop" - -theme = dark:kanagawabones,light:acme -background-opacity = 0.99 - -title-report = true - -keybind = ctrl+comma=unbind -#keybind = xf86copy=copy_to_clipboard -#keybind = xf86paste=paste_from_clipboard - -#custom-shader = ./shaders/crt-shader-with-chromatic-aberration-glow-scanlines-dot-matrix.glsl -#custom-shader = ./shaders/glow.glsl -#custom-shader = ./shaders/dither.glsl -#custom-shader = ./shaders/bettercrt.glsl -#custom-shader = ./shaders/in-game-crt.glsl - -config-file = ?theme diff --git a/.config/ghostty/themes/acme b/.config/ghostty/themes/acme deleted file mode 100644 index df41cca..0000000 --- a/.config/ghostty/themes/acme +++ /dev/null @@ -1,22 +0,0 @@ -palette = 0 = #424242 -palette = 1 = #B85C57 -palette = 2 = #57864E -palette = 3 = #8F7634 -palette = 4 = #2A8DC5 -palette = 5 = #8888C7 -palette = 6 = #6AA7A8 -palette = 7 = #FFFFEC -palette = 8 = #999957 -palette = 9 = #F2ACAA -palette = 10 = #98CE8F -palette = 11 = #B7B19C -palette = 12 = #A6DCF8 -palette = 13 = #D0D0F7 -palette = 14 = #B0ECED -palette = 15 = #EEEEA7 -background = #FFFFEC -foreground = #424242 -cursor-color = #8888C7 -cursor-text = #FFFFEC -selection-background = #EEEEA7 -selection-foreground = #424242 diff --git a/.config/ghostty/themes/kanagawabones b/.config/ghostty/themes/kanagawabones deleted file mode 100755 index b74b517..0000000 --- a/.config/ghostty/themes/kanagawabones +++ /dev/null @@ -1,22 +0,0 @@ -palette = 0 = #080808 -palette = 1 = #e46a78 -palette = 2 = #98bc6d -palette = 3 = #e5c283 -palette = 4 = #7eb3c9 -palette = 5 = #957fb8 -palette = 6 = #7eb3c9 -palette = 7 = #fffffb -palette = 8 = #3c3c51 -palette = 9 = #ec818c -palette = 10 = #9ec967 -palette = 11 = #f1c982 -palette = 12 = #7bc2df -palette = 13 = #a98fd2 -palette = 14 = #7bc2df -palette = 15 = #a8a48d -background = #080808 -foreground = #fffffb -cursor-color = #e6e0c2 -cursor-text = #080808 -selection-background = #49473e -selection-foreground = #fffffb diff --git a/.config/git/config b/.config/git/config deleted file mode 100644 index 141d409..0000000 --- a/.config/git/config +++ /dev/null @@ -1,336 +0,0 @@ -[user] - name = Robert Günzler - email = r@gnzler.io - ; signingkey = AF6AB8C8B10436B9F61293632143BD2AAB94BCC4 - signingkey = ~/.ssh/id_ed25519.pub - -[gpg] - format = ssh - -[sendemail] - from = Robert Günzler <r@gnzler.io> - smtpServer = smtp.mailfence.com - smtpEncryptionn = ssl - smtpUser = robert@gnzler.de - annotate = true - multiEdit = true - confirm = always - -[credential "git.sr.ht"] - username = robertgzr - helper = !sh -c 'rbw get c7e750ea-6713-4254-90e7-6e077b552ffa | xargs printf password=%s\\n' - -[credential "github.com"] - username = robertgzr - helper = !sh -c 'rbw get f94a873d-9d72-412e-a46d-53e4cd19a291 | xargs printf password=%s\\n' - -[credential "smtp.mailfence.com"] - username = robert@gnzler.de - helper = !sh -c 'rbw get 68b0ea26-733a-43cd-b8f8-e8ecc98de072 | xargs printf password=%s\\n' - -[core] - excludesfile = $HOME/.config/git/ignore - - # Treat spaces before tabs and all kinds of trailing whitespace as an error - # [default] trailing-space: looks for spaces at the end of a line - # [default] space-before-tab: looks for spaces before tabs at the beginning of a line - whitespace = space-before-tab,-indent-with-non-tab,-trailing-space - - # Make `git rebase` safer on OS X - # More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/> - trustctime = false - - # Prevent showing files whose names contain non-ASCII symbols as unversioned. - # http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html - precomposeunicode = false - filemode = false - - # enable coditional paging based on the amount of content - ; pager = "less -F -X" - pager = "diff-highlight | less -FRX --tabs=4" - autocrlf = false - longpaths = true - - askPass = "~/bin/askpass" - -[init] - defaultBranchName = master - # templateDir = ~/.dotfiles/git/templates - -[interactive] - diffFilter="diff-highlight | less -FRX --tabs=4" - -[log] - date = iso-strict-local - ; date = relative - -[format] - signoff = true - coverLetter = false - -[column] - ui = auto - -[commit] - template = ~/.config/git/message - gpgSign = true - verbose = true - -[alias] - stp = status --porcelain --branch - sti = status --porcelain --branch --ignored - st = status -sb - stl = ls-files -m -o --exclude-standard - a = add --patch - ci = commit - br = branch - co = checkout - sw = switch - cp = cherry-pick - d = diff - df = diff --word-diff - ds = diff --staged - dl = diff --stat - diffthis = "!f(){ rev=${1:-HEAD}; git log --color=always -1 ${rev}; echo; git --no-pager diff --color=always -p --patch-with-stat ${rev}^..${rev}; }; f" - dt = diffthis - ; diffsummary = "!f() { local a=${1:-HEAD}; local b=${2:-master}; if [[ $a == '-' ]]; then a=HEAD; fi; printf ' %s is %s commits ahead and %s commits behind %s\n' `git rev-parse --short=7 $a` `git rev-list --count $b..$a` `git rev-list --count $a..$b` $b; printf ' last common commit (merge-base): %s\n' `git merge-base $a $b`; git diff --shortstat $a..$b; }; f" - dft = difftool - unstage = reset --hard HEAD - lp = log --graph --pretty=format:'%Cred%h%Creset%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit - ll = log --pretty=oneline --graph --decorate --abbrev-commit - lol = ll - lla = ll --all - lola = lla - g = grep --break --heading --line-number - amend = ci --amend --reuse-message=HEAD --edit - show-ignored = "! git clean -ndX | perl -pe 's/Would remove/Ignored:/'" - # usage: change-date [rev] [date] [...additional filter-branch flags] - # rewrites the commit/author date of <rev> to be <date> - # if <rev> is empty HEAD is used - # if <date> is empty the current time is used - change-date = "!f() { now=\"$(date +'%a %b %d %H:%M:%S %Y %z')\"; head=\"$(git rev-parse HEAD)\"; git filter-branch $3 --env-filter 'if [[ $GIT_COMMIT = ${1-$head} ]]; then export GIT_AUTHOR_DATE=${2:-$now}; export GIT_COMMITTER_DATE=${2:-$now}; fi'; }; f" - # usage: ld <n> - # prints out the `git log` for the n last days - log-since = "!sh -c \"git log --since '${1:-1} days ago' --oneline --author $(git config user.email)\" -" - # usage: pr <num> [<remote>] - # creates local branch pr/<num> from origin or <remote> and checks it out - ; pr = "!f() { git fetch -fu ${2:-origin} refs/pull/${1:?missing pr num}/head:pr/$1 && git checkout pr/$1; }; f" - total-lines = "! git ls-tree -r master --name-only | xargs -I {} git blame --line-porcelain {} | sed -n 's/^author //p' | sort | uniq -c | sort -rn" - fixup = "!f() { git commit --fixup=${1}; }; f" - fix = "!f() { git fixup ${1} && git ri ${1}^; }; f" - squash = "!f() { git commit --squash=${1}; }; f" - ri = rebase --autostash --autosquash -i # -x 'git hook run pre-commit' - ri-pr = !bash -c 'git ri `git merge-base HEAD ${1:-origin/master}`' - mt = mergetool - pushf = push --force-with-lease - root = "rev-parse --show-toplevel" - trailer = "!f() { trailer=${1:?TRAILER}; ref=${2:-HEAD}; mode='--amend'; [ $ref != 'HEAD' ] && mode='--fixup=$ref'; msg=$(git rev-parse --show-toplevel)/LAST_COMMIT_MSG; git log -1 --format=%B $ref > $msg; git interpret-trailers --in-place --trailer $trailer $msg; git commit --allow-empty --no-verify --only --edit --file $msg $mode; rm $msg; }; f" - ; oldest-ancestor = !bash -c 'diff -u <(git rev-list --first-parent ${1:-master}) <(git rev-list --first-parent ${2:-HEAD}) | sed -ne \"s/^ //p\" | head -1' - ; oldest-ancestor = !bash -c 'git merge-base ${1:-master} ${2:-HEAD}' - rebaseonto = "!f() { git ri --onto=${1:-origin/master} $(git merge-base ${1:-origin/master} ${2:-HEAD}); }; f" - ro = rebaseonto - find-by-subject = "!f() { set -ex; s=`git log -1 --format=%s ${1}`; git --no-pager log -1 --grep=\"^${s}$\" --no-merges ${2}; }; f" - tig = !tig - amend = commit --amend - fixnow = "!f() { git commit --fixup=${1} && git ri ${1}^; }; f" - b = !fzfez git-branches | head -n1 | xargs -r git switch - l = !fzfez git-log - t = !fzfez git-tags - pushall = "!f() { args=$@; git remote show -n | xargs -I{} sh -c \"set -x;git push {} $args\"; }; f" - pushfall = "!f() { args=$@; git remote show -n | xargs -I{} sh -c \"set -x;git pushf {} $args\"; }; f" - ; git-hack shortcuts - ; hack = hack hack - ; sync = hack sync - owners = "!f() { ref=\"$(git branch --format='%(upstream:short)'|head -n1)\"; git diff --name-only $ref | xargs -I{} git shortlog -nse $ref {} | sort -k2 | uniq -f2 | sed 's/^[ ]*//' | sort -gr | cut -f2; }; f" - owners = "!f() { local path=$(git ls-files --full-name $1) ref=$(git branch --format='%(upstream:short)'|head -n1); git shortlog -nse $ref $path; }; f" - reviewers = "!f() { ref=\"$(git branch --format='%(upstream:short)'|head -n1)\"; git diff --name-only $ref | xargs -I{} git shortlog -nse --group=trailer:reviewed-by $ref {} | sort -k2 | uniq -f2 | sed 's/^[ ]*//' | sort -gr | cut -f2; }; f" - -[apply] - # Detect whitespace errors when applying a patch - whitespace = fix - -[color "branch"] - current = yellow reverse - local = yellow - remote = green - -[color "diff"] - meta = yellow bold - frag = magenta bold # line info - old = red # deletions - new = green # additions - -[color "status"] - added = yellow - changed = green - untracked = cyan - -[diff] - # Detect copies as well as renames - renames = copies - renameLimit = 3210 - tool = difftastic - -[diff "bin"] - # Use `hexdump` to diff binary files - textconv = hexdump -v -C - renames = copies - tool = vimdiff - -[difftool] - prompt = false - -[difftool "difftastic"] - cmd = difft "$LOCAL" "$REMOTE" - -[pager] - difftool = true - -[fetch] - prune = true - -[submodule] - recurse = true - -[pull] - rebase = true - autostash = true - -[grep] - lineNumber = true - -[help] - # Automatically correct and execute mistyped commands - autocorrect = 10 - -[merge] - # Include summaries of merged commits in newly created merge commit messages - log = true - defaultToUpstream = true - tool = vimdiff - -[mergetool "vimdiff"] - path = /usr/bin/nvim - conflictstyle = diff3 - prompt = false - -[rebase] - ; instructionFormat = "%aI %an <%ae> | %s" - -[rerere] - enabled = false - -[push] - # Use the Git 1.x.x default to avoid errors on machines with old Git - # installations. To use `simple` instead, add this to your `~/.extra` file: - # `git config --global push.default simple`. See http://git.io/mMah-w. - default = simple - # Make `git push` push relevant annotated tags when pushing branches out. - followTags = true - # Automatically setup a tracking branch - autoSetupRemote = true - -[tag] - gpgsign = true - -[safe] - directory = /var/tmp/portage/* - directory = /var/cache/distfiles/git3-src/* - -# URL shorthands - -; [url "git@github.com:"] -; insteadOf = "https://github.com/" -; pushInsteadOf = "git://github.com/" - -; [url "git@bitbucket.org:"] -; insteadOf = "https://bitbucket.org/" -; pushInsteadOf = "git://bitbucket.org/" - -; [url "git@gitlab.com:"] -; insteadOf = "https://gitlab.com/" -; pushInsteadOf = "git://gitlab.com/" - -; [url "git@git.sr.ht:"] -; insteadOf = "https://git.sr.ht/" -; pushInsteadOf = "git://git.sr.ht/" - -; [url "git@gist.github.com:"] -; insteadOf = "gist:" -; pushInsteadOf = "git://gist.github.com/" - -[http] - sslverify = true - cookiefile = /home/robert/.gitcookies - -[trailer "changetype"] - key = "Change-type" -[trailer "connects"] - key = "Connects-to" -[trailer "depends"] - key = "Depends-on" -[trailer "changelog"] - key = "Changelog-entry" -[trailer "coauthor"] - key = "Co-authored-by" -[trailer "reviewed"] - key = "Reviewed-by" -[trailer "tested"] - key = "Tested-by" -[trailer "fixes"] - key = "Fixes" - -; TIG config -[tig] - main-view = id date author commit-title:graph=yes,refs=yes - blame-view = date:default author id:yes,color line-number:yes,interval=1 text - pager-view = line-number:yes,interval=1 text - stage-view = line-number:yes,interval=1 text - log-view = line-number:yes,interval=1 text - blob-view = line-number:yes,interval=1 text - diff-view = line-number:yes,interval=1 text:yes,commit-title-overflow=no - line-graphics = utf-8 - tab-size = 4 - ignore-space = at-eol - ignore-case = true - split-view-height = 80% - diff-options = -m --first-parent - mouse = true - editor-line-number = yes - refresh-mode = auto - diff-highlight = true - -[tig "color"] - diff-header = default magenta - diff-chunk = black white - -[tig "bind"] - generic = I !@wl-copy -n "%(commit)" - generic = G move-last-line - generic = V view-pager - ; generic = <Ctrl-n> find-next - ; generic = <Ctrl-p> find-prev - ; generic = <Ctrl-l> scroll-right - ; generic = <Ctrl-h> scroll-left - ; generic = <Ctrl-g> refresh - generic = ~ :goto %(commit)^ - - main = g none - main = gg move-first-line - main = G move-last-line - main = <esc>g :toggle commit-title-graph - - diff = g none - diff = gg move-first-line - diff = G move-last-line - diff = n :/^@@ - diff = p :?^@@ - - stage = n :/^@@ - stage = p :?^@@ - - pager = n :/^@@ - pager = p :?^@@ - - log = n :/^commit - log = p :?^commit diff --git a/.config/git/ignore b/.config/git/ignore deleted file mode 100644 index 33b0186..0000000 --- a/.config/git/ignore +++ /dev/null @@ -1,60 +0,0 @@ -# Random -*~ -._* -Thumbs.db -.DS_Store* -Desktop.ini -.idea -ehthumbs.db -Icon* -Session.vim - -# external -.Spotlight-V100 -.Trashes - -# compiled -*.o -*.out -*.pyc -*.so -*.exe -*.class -*.dll -bin/ -tags - -# logs and db -*.log -*.sql -*.sqlite -*.db - -# packages -*.7z -*.dmg -*.gz -*.iso -*.jar -*.rar -*.tar -*.zip - -# web stuff -node_modules -bower_components - -# personal stuff -.todo.md -.org.md - -# clangd -.cache/ - -# cargo -target/debug/build/ -target/release/build/ - -# zig -zig-out/ -.zig-cache/ diff --git a/.config/imv/config b/.config/imv/config deleted file mode 100644 index 5ec1c83..0000000 --- a/.config/imv/config +++ /dev/null @@ -1,13 +0,0 @@ -[options] -overlay = false -overlay_font = Iosevka Aile:12 -background = checks -upscaling_method = nearest_neighbour - -[binds] -n = next -p = prev -e = exec echo $imv_current_file -u = scaling none -y = scaling full -<Shift+Y> = exec url-launcher $imv_current_file diff --git a/.config/kanshi/config b/.config/kanshi/config deleted file mode 100644 index 2b2dee2..0000000 --- a/.config/kanshi/config +++ /dev/null @@ -1,30 +0,0 @@ -# vim: commentstring=#\ %s - -profile multi { - output eDP-1 disable - output "Dell Inc. DELL U2518D 3C4YP87AAK3L" mode 2560x1440@59.951Hz position 0,0 transform 90 scale 1 enable - output "Dell Inc. DELL P2720DC H97SKF3" mode 2560x1440@59.951Hz position 1440,0 scale 1 enable - # output "Dell Inc. DELL P2720DC H97SKF3" mode 1920x1080@59.951Hz position 1440,0 scale 1 enable - - exec oguri-cycle; s6-svc -r ~/.s6/wlsunset; s6-svc -r ~/.s6/mako -} - -profile single { - output "Dell Inc. DELL P2720DC H97SKF3" mode 2560x1440 position 0,0 transform normal scale 1 enable - output eDP-1 position 2560,0 scale 1.3 enable - - exec oguri-cycle; s6-svc -r ~/.s6/wlsunset; s6-svc -r ~/.s6/mako -} - -profile tv { - output eDP-1 position 0,0 scale 1.3 enable - output HDMI-A-1 transform normal position 2560,0 scale 2 enable - - exec oguri-cycle; s6-svc -r ~/.s6/wlsunset; s6-svc -r ~/.s6/mako -} - -profile laptop { - output eDP-1 scale 1.3 enable - - exec oguri-cycle; s6-svc -r ~/.s6/wlsunset; s6-svc -r ~/.s6/mako -} diff --git a/.config/khal/config b/.config/khal/config deleted file mode 100644 index f1c7dda..0000000 --- a/.config/khal/config +++ /dev/null @@ -1,22 +0,0 @@ -[calendars] - -[[personal]] -path = ~/calendars/personal -color = light magenta - -[locale] -timeformat = %H:%M -dateformat = %Y-%m-%d -longdateformat = %Y-%m-%d -datetimeformat = %Y-%m-%d %H:%M -longdatetimeformat = %Y-%m-%d %H:%M - -[default] -default_calendar = personal -highlight_event_days = true - -[highlight_days] -default_color = dark green - -[keybindings] -external_edit = E diff --git a/.config/mako/config b/.config/mako/config deleted file mode 100644 index 3ed7d70..0000000 --- a/.config/mako/config +++ /dev/null @@ -1,48 +0,0 @@ -# vim: ft=config - -layer=top -anchor=top-right - -# width=500 -# height=300 -padding=6 -# border-radius=2 -border-size=2 - -# start flavours -font=Iosevka Etoile 10 -background-color=#0c0c0c -text-color=#fffffb -border-color=#70649add -progress-color=source #70649add -# end flavours - -group-by=summary -default-timeout=2000 -max-visible=6 -history=1 -max-history=20 - -on-button-middle=exec notifmenu $id - -[mode=off] -invisible=1 - -[urgency=high] -border-color=#db4d6ddd -on-notify=exec pw-play --media-role=event --volume=0.5 $HOME/Music/sounds/basementarcade/qbert-bonk.wav - -[category=error] -border-color=#db4d6ddd -on-notify=exec pw-play --media-role=event --volume=0.5 $HOME/Music/sounds/basementarcade/tapper-43.wav - -[category=warning] -border-color=#fad689dd -on-notify=exec pw-play --media-role=event --volume=0.5 $HOME/Music/sounds/basementarcade/tapper-22.wav - -[category=success] -border-color=#5dac81dd -on-notify=exec pw-play --media-role=event --volume=0.5 $HOME/Music/sounds/basementarcade/tapper-02.wav - -[summary=reminder] -on-notify=exec pw-play --media-role=event --volume=0.5 $HOME/Music/sounds/basementarcade/tapper-22.wav diff --git a/.config/mbsyncrc b/.config/mbsyncrc deleted file mode 100644 index 684ac75..0000000 --- a/.config/mbsyncrc +++ /dev/null @@ -1,66 +0,0 @@ -## remote - -IMAPStore gnzler -Host imap.mailfence.com -User robert@gnzler.de -PassCmd "rbw get 68b0ea26-733a-43cd-b8f8-e8ecc98de072" -SSLType IMAPS - -IMAPStore gandi -Host mail.gandi.net -User robert@gnzler.io -PassCmd "rbw get 67436053-fde1-43c3-9544-6a5289f08c76" -SSLType IMAPS - -# IMAPStore selfhosted -# Host localhost:1430 -# User postmaster@gnzler.de -# PassCmd "secretmenu -P postmaster@gnzler.io | head -n1" -# SSLType None - -## on-disk - -MaildirStore local -Path ~/mail/gnzler/ -INBOX ~/mail/gnzler/INBOX -SubFolders Verbatim - -MaildirStore local.bak -Path ~/mail/gnzler.bak/ -INBOX ~/mail/gnzler.bak/INBOX -SubFolders Verbatim - -## channel - -Channel gnzler -Far :gnzler: -Near :local: -Patterns * -# Sync Pull New -SyncState * -# WATCH OUT WHAT YOU'RE DOING -Create Both -Remove Both -Expunge Both - -## backup/restore - -Channel pull -Far :gandi: -Near :local.bak: -Patterns * -SyncState * -Sync Pull -Create Near -Remove Near -Expunge Near - -Channel restore -Far :gnzler: -Near :local: -Patterns lists lists/* -SyncState * -Sync Push -Create Far -Remove Far -Expunge Far diff --git a/.config/mpv/config b/.config/mpv/config deleted file mode 100644 index 8e43c38..0000000 --- a/.config/mpv/config +++ /dev/null @@ -1,242 +0,0 @@ -# MPV Configuration - -input-ipc-server=/run/user/1000/mpv -script-opts=ytdl_hook-ytdl_path=/usr/bin/yt-dlp,ytdl_hook-all_formats=yes - -autocreate-playlist=same -cache=yes - -# -# Video -# -vo=gpu-next -# hwdec=auto-copy -hwdec=vaapi -gpu-context=waylandvk -gpu-api=vulkan -# framedrop=decoder+vo -video-sync=display-resample -# interpolation -window-maximized=no # prevent wayland problems with buffer resize - -# colour shit -tone-mapping=auto -# tone-mapping=bt.2446a -# icc-profile=~~/B140QAN02_0.icm -# tone-mapping=mobius -# inverse-tone-mapping -# target-peak=500 - -# -# Audio -# -alang=jpn,ja,eng,en,ger,de -volume-max=120 -audio-channels=auto-safe - -# -# Subtitles -# -slang=eng,en,ger,de,jpn,ja - -# sub-font=Rosario -sub-font=Luciole -# sub-scale-by-window=no -sub-blur=0.2 -sub-border-color=0.0/0.0/0.0/1.0 -sub-border-size=3.0 -sub-color=1.0/1.0/1.0 -sub-margin-x=100 -sub-margin-y=10 -sub-shadow-color=0.0/0.0/0.0/0.25 -sub-shadow-offset=0 - -sub-fix-timing=yes -# sub-ass-vsfilter-blur-compat=no -# sub-ass-force-style=Kerning=yes - -# Some settings fixing VOB/PGS subtitles -# (creating blur & changing yellow subs to gray) -sub-gauss=0.6 -sub-gray=yes - -# Forces showing subtitles while seeking through the video -demuxer-mkv-subtitle-preroll=yes - -# Allows to put subtitles into letterbox -stretch-image-subs-to-screen=yes - -# -# OSD -# -osc=no # we use uosc -osd-bar=no # we use uosc -border=no # needed for uosc decorations - -osd-font=Iosevka Etoile -cursor-autohide=100 -cursor-autohide-fs-only -keep-open=yes -stop-screensaver=yes -load-stats-overlay=yes -load-console=yes -keepaspect-window=yes -autofit-larger=x50% -# osd-scale-by-window=no -# hidpi-window-scale=yes -deband=no - -# -# Screenshots -# -screenshot-directory=~/pictures/screenshots/mpv -screenshot-template='%tY%tm%td-%tH%tM%tS-%F-%p' -screenshot-format=png -screenshot-png-compression=9 - -# -# Named filter chains -# (don't forget to invert with "!" to disable by default) -# -vf-add=@deband:!gradfun -vf-add=@no-3d:!stereo3d:ab2l:ml -af-add=@skip-silence:!silenceremove=0:0:0:-1:0.001:-45dB:0:rms - -# -# PROFILES -# -[fullscreen] -vo=dmabuf-wayland - -[protocol.http] -profile-desc="Optimized for streaming video" -glsl-shaders-clr -title="${media-title}" -# ytdl-format=bv[height<=?1080]+ba / b[height<=?1080] -ytdl-format=(bv[vcodec~='^av01']/bv)[height<=?1080]+ba / b[height<=?1080] -demuxer-seekable-cache=yes -cache-pause=no -hls-bitrate=max - -[protocol.https] -profile=protocol.http - -# [url.ytcookies] -# profile=protocol.http -# profile-cond=not not string.match(get('path'), 'youtube.com') -# # ytdl-raw-options=cookies=~/Downloads/cookies.balena_google_drive.txt - -[gpuhq] -profile-desc="Optimized for HQ rendering" -profile-cond=height <= 1440 -profile=gpu-hq - -[scale] -profile-desc="Use fancy scaling algorithms" -profile-cond=height <= 1440 -glsl-shaders-clr -scale=ewa_lanczossharp -dscale=ewa_lanczossharp -correct-downscaling=yes -sigmoid-upscaling=yes - -# [interpolate] -# profile-desc="Increase framecount by interpolating (with vapoursynth)" -# profile=gpu-hq -# vf-toggle=@vsfmt:format=yuv420p -# vf-toggle=@vsscale:scale=w=-1:h=540 -# vf-toggle=@vs:vapoursynth=~~/vapoursynth/interpolate.vpy:4:4 -# sws-scaler=spline - -[reset] -profile-desc="Reset everything to vanilla mpv" -profile=default -load-scripts=no -osc=yes -osd-bar=yes - -[webcam] -profile-desc="Optimized for showing real-time webcam feed" -profile-cond=(not not string.match(get('path'), '/dev/video*')) -load-scripts=no -osc=no -profile=low-latency -untimed -video-sync=display-resample -no-demuxer-thread -opengl-glfinish=yes -opengl-swapinterval=0 -vf-add=hflip - -[webcam/local] -profile-cond=(not not string.match(get('path'), '/dev/video0')) -profile=webcam -demuxer-lavf-o=input_format=mjpeg - -[downmix] -ad-lavc-downmix=no -# == pan == -# <output channel layout> | <output channel definition> -# FL = front left -# FC = front center -# BL = back left -# SL = side left -# LFE = low frequency -# -# == dynaudnorm == -# g (gausssize): 3-301 (must be odd; default: 31), window size (in frames) of smoothing filter around current frame -# larger: stronger smoothing -> less gain variation -# f (framelen): 10-8000 ms (default: 500), length of the section of audio used to detect peaks -# r (targetrms): 0.0-1.0 (default: 0.0 disabled), use RMS (root mean square) of signal instead of peak - better approx. of "perceived loudness" -# adjusts frames to a constant RMS value -# p (peak): (default: 0.95 leaves 5% headroom), target peak value -#af-add='lavfi=[pan=2.1| FL < FC+0.8FL+0.1*BL+0.1*SL | FR < FC+0.8*FR+0.1*BR+0.1*SR | LFE < LFE,dynaudnorm=g=41:f=700:r=0.9]' -#af-add='lavfi=[pan=5.1| FL < 0.8*FL | FR < 0.8*FR | LFE < LFE | FC < FC | BL < BL | BR < BR,dynaudnorm=g=41:f=700:r=0.9]' -af-add='lavfi=[pan=5.1| FL = 0.5*FL | FR = 0.5*FR | LFE = LFE | FC = FC | BL = 0.3*BL | BR = 0.3*BR]' - -[fastforward] -profile-restore=copy-equal -profile=fast -scale=bilinear -dscale=bilinear -cscale=bilinear -vd-lavc-skiploopfilter=all -vd-lavc-skipframe=all - -[bigcache] -demuxer-readahead-secs=20 -demuxer-max-bytes=512M -demuxer-max-back-bytes=512M - -# image viewer settings - -[mvi] -profile-desc="mpv image viewer" -profile-restore=copy-equal -profile=gpu-hq -profile=scale -sub-auto=no -audio-file-auto=no -term-status-msg= -title="${?media-title:${media-title}}${!media-title:No file}" -video-aspect-override=no -loop-file=inf -image-display-duration=inf -input-conf=~~/mvi/input.conf -input-commands-add=load-script '~~/mvi/scripts/ruler.lua' -input-commands-add=load-script '~~/mvi/scripts/detect-image.lua' -input-commands-add=load-script '~~/mvi/scripts/freeze-window.lua' -input-commands-add=load-script '~~/mvi/scripts/image-positioning.lua' -input-commands-add=load-script '~~/mvi/scripts/minimap.lua' -input-commands-add=load-script '~~/mvi/scripts/ruler.lua' -script-opts-add=uosc-volume=none -script-opts-add=uosc-controls=never -script-opts-add=uosc-progress=never -script-opts-add=uosc-timeline_size=0 - -[extension.jpg] -profile=mvi -[extension.png] -profile=mvi -[extension.gif] -profile=mvi diff --git a/.config/mpv/input.conf b/.config/mpv/input.conf deleted file mode 100644 index 9407fda..0000000 --- a/.config/mpv/input.conf +++ /dev/null @@ -1,182 +0,0 @@ -# MPV INPUT CONFIG - -# taken from the default config -ESC set fullscreen no -f cycle fullscreen - -SPACE cycle pause #! pause/play -m cycle mute #! controls > mute - -# ARROW KEY BINDINGS -LEFT seek -10 exact -RIGHT seek 10 exact -DOWN seek -60 exact -UP seek 60 exact - -WHEEL_UP seek -10 exact -WHEEL_DOWN seek 10 exact -Shift+WHEEL_UP seek -60 exact -Shift+WHEEL_DOWN seek 60 exact - -h seek -10 keyframes -j seek -60 keyframes -k seek 60 keyframes -l seek 10 keyframes - -HOME seek 0 absolute-percent -0 seek 0 absolute-percent - -END seek 100 absolute-percent -$ seek 100 absolute-percent - -Shift+RIGHT playlist-next -n playlist-next #! controls > playlist next -Shift+LEFT playlist-prev -p playlist-prev #! controls > playlist prev -#Alt+RIGHT frame-step -#Alt+LEFT frame-back-step -> frame-step -< frame-back-step -Ctrl+< seek -1 keyframes -Ctrl+> seek 1 keyframes - -Shift+UP add volume 10 -Shift+DOWN add volume -10 -Alt+UP add volume 5 -Alt+DOWN add volume -5 - -L add chapter 1 #! controls > chapter next -H add chapter -1 #! controls > chapter prev -PGUP add chapter 1 -PGDWN add chapter -1 - -a cycle audio -A script-binding uosc/audio #! select > audio -D cycle deinterlace -v script-binding uosc/video #! select > video - -s cycle sub -S script-binding uosc/subtitles #! select > sub -Ctrl+s script-binding uosc/load-subtitles #! select > load sub... -e add sub-scale +0.1 #! sub > scale up -w add sub-scale -0.1 #! sub > scale down -r add sub-pos +1 #! sub > pos up -t add sub-pos -1 #! sub > pos down - -z add sub-delay -0.1 #! delay > sub -0.1 -x add sub-delay +0.1 #! delay > sub +0.1 -Z add audio-delay -0.1 #! delay > audio -0.1 -X add audio-delay +0.1 #! delay > audio +0.1 -Ctrl+z sub-step -1 #! delay > sub-step -1 -Ctrl+x sub-step 1 #! delay > sub-step +1 - -U cycle-values sub-ass-override "scale" "force" "strip" "no" #! sub > ass override -V cycle sub-visibility #! sub > visibility -# Meta+s cycle sub-ass-force-margins - -# PLAYER BINDINGS -i script-binding stats/display-stats-toggle #! stats -Ctrl+g screenshot #! utils > screenshot > default -Alt+g screenshot video #! utils > screenshot > video - -Ctrl+a cycle-values video-aspect-override "16:9" "4:3" "21:9" "2.35:1" "-1" #! controls > aspect-ratio -Alt+s cycle-values audio-channels "auto-safe" "auto" "stereo" #! controls > audio channels -Alt+a cycle-values video-rotate 0 90 180 270 #! controls > video-rotate -# T cycle ontop - -q stop -Q quit-watch-later #! watch later - -# Ctrl+BS revert-seek mark-permanent - -Alt+] script-binding skip2silence #! utils > skip2silence -Alt+} script-binding skip2scene #! utils > skip2scene -u revert-seek mark-permanent #! controls > undo/revert seek - -= add volume 10 -Shift+= add volume 5 -- add volume -10 -Shift+- add volume -5 - -Alt+[ cycle-values speed 0.75 0.5 0.25 #! controls > speed > slower -Alt+] cycle-values speed 1.25 1.5 2.0 #! controls > speed > faster -Alt+BS set speed 1.0 #! utils > speed > reset - -M cycle-values vf setpts=(2/1)*PTS setpts=(4/1)*PTS setpts=(1/2)*PTS setpts=(1/4)*PTS setpts=(1/8)*PTS "" - -Alt+l-f cycle-values loop-file yes no #! loop > file -Alt+l-l ab-loop #! loop > A-B - -# VAPOURSYNTH/FILTER BINDINGS -b ignore # debanding -B ignore -F1 af toggle asubcut #! fx > a:subcut -F2 af toggle loudnorm #! fx > a:loudnorm -F3 af toggle earwax #! fx > a:earwax -F6 af toggle @skip-silence #! fx > a:@skip-silence -F4 vf toggle bwdif #! fx > v:deinterlace -F5 vf toggle @deband #! fx > v:@deband -F7 vf toggle @no-3d #! fx > v:@no-3d - -# uosc -? script-binding uosc/keybinds -Ctrl+SPACE script-binding uosc/toggle-ui -MBTN_MID script-binding uosc/menu -: script-binding uosc/menu -Enter script-binding uosc/menu -P script-binding uosc/items #! select > playlist -C script-binding uosc/chapters #! select > chapters -o script-binding uosc/open-file #! select > file... -Ctrl+o script-binding openuri/openuri #! select > uri... -Ctrl+Shift+o script-binding openuri/pasteuri #! select > paste -Ctrl+n script-binding uosc/next-file -Ctrl+p script-binding uosc/prev-file - -# various -Alt+w script-binding webm/display-webm-encoder #! utils > webm encoder -# Alt+s-a script-binding slicing/slicing_audio #! utils > slicing > audio -# Alt+s-m script-binding slicing/slicing_mark #! utils > slicing > mark -Alt+a-d script-binding autodeint #! utils > autodeint -Alt+a-c script-binding autocrop/toggle_crop #! utils > autocrop -Alt+m-c script-binding mouse_coords #! utils > mouse coords -Alt+b script-binding blur/toggle-blur #! utils > blur - -# gallery -# g script-message contact-sheet-close; script-message playlist-view-toggle #! utils > playlist view -# c script-message playlist-view-close; script-message contact-sheet-toggle #! utils > contact sheet - -# yanktime -y-y script_binding yanky/yanktime #! utils > yank > time -y-p script_binding yanky/yankpath #! utils > yank > path -y-s script_binding yanky/yanksubs #! utils > yank > subs - -# sponsorblock -Alt+b-g script_binding sponsorblock/set_segment #! sponsorblock > set -Alt+b-G script_binding sponsorblock/submit_segment #! sponsorblock > submit -Alt+b-u script_binding sponsorblock/upvote_segment #! sponsorblock > upvote -Alt+b-UP script_binding sponsorblock/upvote_segment #! sponsorblock > upvote -Alt+b-d script_binding sponsorblock/downvote_segment #! sponsorblock > downvote -Alt+b-DOWN script_binding sponsorblock/downvote_segment #! sponsorblock > downvote - -# mpvacious -Alt+a script-binding mpvacious-menu-open #! mpvacious > open -Ctrl+n script-binding mpvacious-export-note #! mpvacious > export note - -# 1 ignore -# 2 ignore -3 ignore -4 ignore -# 5 ignore -6 ignore -7 ignore -8 ignore -9 ignore - -5 cycle-values gamma-factor 1.0 1.1 1.2 - -I apply-profile interpolate #! profiles > interpolate - -Ctrl+Shift+0 apply-profile reset #! profiles > reset -Ctrl+Shift+1 apply-profile interpolate #! profiles > interpolate -Ctrl+Shift+2 apply-profile cache #! profiles > cache -Ctrl+Shift+3 apply-profile scale #! profiles > scale diff --git a/.config/mpv/mvi/input.conf b/.config/mpv/mvi/input.conf deleted file mode 100644 index 1d5b989..0000000 --- a/.config/mpv/mvi/input.conf +++ /dev/null @@ -1,109 +0,0 @@ -1 change-list script-opts append image_positioning-drag_to_pan_margin=200 -2 change-list script-opts append ruler-exit_bindings=8 -3 change-list script-opts append ruler-line_color=FF -4 change-list script-opts append ruler-scale=25 -5 change-list script-opts append ruler-max_size=20,20 - -SPACE repeatable playlist-next -alt+SPACE repeatable playlist-prev - -# familiar binds -n playlist-next -p playlist-prev - -UP ignore -DOWN ignore -LEFT repeatable playlist-prev -RIGHT repeatable playlist-next - -# simple reminder of default bindings -#1 add contrast -1 -#2 add contrast 1 -#3 add brightness -1 -#4 add brightness 1 -#5 add gamma -1 -#6 add gamma 1 -#7 add saturation -1 -#8 add saturation 1 - -# mouse-centric bindings -MBTN_RIGHT script-binding drag-to-pan -MBTN_LEFT script-binding pan-follows-cursor -MBTN_LEFT_DBL ignore -WHEEL_UP script-message cursor-centric-zoom 0.1 -WHEEL_DOWN script-message cursor-centric-zoom -0.1 - -# panning with the keyboard: -# pan-image takes the following arguments -# pan-image AXIS AMOUNT ZOOM_INVARIANT IMAGE_CONSTRAINED -# ^ ^ ^ -# x or y | | -# | | -# if yes, will pan by the same if yes, stops panning if the image -# amount regardless of zoom would go outside of the window - -ctrl+down repeatable script-message pan-image y -0.1 yes yes -ctrl+up repeatable script-message pan-image y +0.1 yes yes -ctrl+right repeatable script-message pan-image x -0.1 yes yes -ctrl+left repeatable script-message pan-image x +0.1 yes yes - -# now with more precision -alt+down repeatable script-message pan-image y -0.01 yes yes -alt+up repeatable script-message pan-image y +0.01 yes yes -alt+right repeatable script-message pan-image x -0.01 yes yes -alt+left repeatable script-message pan-image x +0.01 yes yes - -# replace at will with h,j,k,l if you prefer vim-style bindings - -# on a trackpad you may want to use these -#WHEEL_UP repeatable script-message pan-image y -0.02 yes yes -#WHEEL_DOWN repeatable script-message pan-image y +0.02 yes yes -#WHEEL_LEFT repeatable script-message pan-image x -0.02 yes yes -#WHEEL_RIGHT repeatable script-message pan-image x +0.02 yes yes - -# align the border of the image to the border of the window -# align-border takes the following arguments: -# align-border ALIGN_X ALIGN_Y -# any value for ALIGN_* is accepted, -1 and 1 map to the border of the window -ctrl+shift+right script-message align-border -1 "" -ctrl+shift+left script-message align-border 1 "" -ctrl+shift+down script-message align-border "" -1 -ctrl+shift+up script-message align-border "" 1 - -# reset the image -ctrl+0 no-osd set video-pan-x 0; no-osd set video-pan-y 0; no-osd set video-zoom 0 - -+ add video-zoom 0.5 -- add video-zoom -0.5; script-message reset-pan-if-visible -= no-osd set video-zoom 0; script-message reset-pan-if-visible - -e script-message equalizer-toggle -alt+e script-message equalizer-reset - -h no-osd vf toggle hflip; show-text "Horizontal flip" -v no-osd vf toggle vflip; show-text "Vertical flip" - -r script-message rotate-video 90; show-text "Clockwise rotation" -R script-message rotate-video -90; show-text "Counter-clockwise rotation" -alt+r no-osd set video-rotate 0; show-text "Reset rotation" - -d script-message ruler - -# Toggling between pixel-exact reproduction and interpolation -a cycle-values scale nearest ewa_lanczossharp - -# Toggle color management on or off -c cycle icc-profile-auto - -# Screenshot of the window output -S screenshot window - -# Toggle aspect ratio information on and off -A cycle-values video-aspect-override "-1" "no" - -P script-message force-print-filename - -# ADVANCED: you can define bindings that belong to a "section" (named "image-viewer" here) like so: -#alt+SPACE {image-viewer} repeatable playlist-prev -#SPACE {image-viewer} repeatable playlist-next -# to load them conditionally with a command. See scripts-opts/image_viewer.conf for how you can do this diff --git a/.config/mpv/mvi/mpv.conf b/.config/mpv/mvi/mpv.conf deleted file mode 100644 index 973ba42..0000000 --- a/.config/mpv/mvi/mpv.conf +++ /dev/null @@ -1,49 +0,0 @@ -## IMAGE -# classic opengl-hq parameter, change at will -scale=spline36 -cscale=spline36 -dscale=mitchell -dither-depth=auto -correct-downscaling -sigmoid-upscaling -# debanding seems rarely useful with images -#deband -# dark grey background instead of pure black -background=color -background-color=0.2 - -## MISC -mute=yes -# the osc is mostly useful for videos -osc=no -# don't try to autoload subtitles or audio files -sub-auto=no -audio-file-auto=no -# get rid of the useless V: 00:00:00 / 00:00:00 line -term-status-msg= - -# replace mpv with mvi in the window title -title="${?media-title:${media-title}}${!media-title:No file} - mvi" - -# don't slideshow by default -image-display-duration=inf -# loop files in case of webms or gifs -loop-file=inf -# and loop the whole playlist -loop-playlist=inf - -# you need this if you plan to use drag-to-pan or pan-follows-cursor with MOUSE_LEFT -window-dragging=no - -#according to haasn, aspect ratio info for PNG and JPG is "universally bust" -[extension.png] -video-aspect-override=no - -[extension.jpg] -video-aspect-override=no - -[extension.jpeg] -profile=extension.jpg - -[silent] -msg-level=all=no diff --git a/.config/mpv/mvi/script-opts/detect_image.conf b/.config/mpv/mvi/script-opts/detect_image.conf deleted file mode 100644 index 586fb95..0000000 --- a/.config/mpv/mvi/script-opts/detect_image.conf +++ /dev/null @@ -1,17 +0,0 @@ -# commands to execute when a file detected as an image (1 frame, no audio) is loaded or unloaded - -# an image was loaded, and the previous file was not an image (or there was no previous file) -command_on_first_image_loaded= -# an image was loaded (regardless of what the previous file was) -command_on_image_loaded= -# a non-image was loaded, and the previous file was an image -command_on_non_image_loaded= - -# the purpose of these "hooks" is to let you change bindings, profiles, reset properties... -# see https://mpv.io/manual/master/#list-of-input-commands for general command information -# note that there is no such thing as "unloading a profile", to emulate this you must create an opposite profile and load that - -# example possible values: -#command_on_first_image_loaded=apply-profile image; enable-section image-viewer; script-message status-line-enable -#command_on_image_loaded=no-osd set video-pan-x 0; script-message align-border "" -1 -#command_on_non_image_loaded=disable-section image-viewer; no-osd set video-pan-x 0; no-osd set video-pan-y 0; no-osd set video-zoom 0; script-message status-line-disable diff --git a/.config/mpv/mvi/script-opts/image_positioning.conf b/.config/mpv/mvi/script-opts/image_positioning.conf deleted file mode 100644 index 998ec64..0000000 --- a/.config/mpv/mvi/script-opts/image_positioning.conf +++ /dev/null @@ -1,14 +0,0 @@ -# size of the margins with drag-to-pan -drag_to_pan_margin=50 -drag_to_pan_move_if_full_view=no - -# size of the margins with pan-follows-cursor -pan_follows_cursor_margin=50 - -# size of the margins with cursor-centric-zoom -cursor_centric_zoom_margin=50 -# if the borders would show up, move the image -# this makes it not exactly cursor-centric in some cases -cursor_centric_zoom_auto_center=yes -# allow zooming out if the image can already fully fit in the window -cursor_centric_zoom_dezoom_if_full_view=no diff --git a/.config/mpv/mvi/script-opts/minimap.conf b/.config/mpv/mvi/script-opts/minimap.conf deleted file mode 100644 index 72a05ea..0000000 --- a/.config/mpv/mvi/script-opts/minimap.conf +++ /dev/null @@ -1,19 +0,0 @@ -# whether to show by default -enabled=yes -# the position of the center of the minimap, in percentage of the window (x, y) -center=92,92 -# the scale of the minimap (i.e. the view rectangle is scale / 100 times the size of the window) -scale=12 -# the cutoff size of the minimap (i.e. the image rectangle is clipped if it falls outside of the this zone) -max_size=16,16 -# opacity of the "image" (from 00=opaque to FF=transparent) -image_opacity=88 -# color of the "image" (#BBGGRR where each component rages from 00 to FF) -image_color=BBBBBB -# opacity of the "view" -view_opacity=BB -view_color=222222 -# whether the view should be drawn above the image -view_above_image=yes -# whether to show the minimap if the current image is fully visible -hide_when_full_image_in_view=yes diff --git a/.config/mpv/mvi/script-opts/ruler.conf b/.config/mpv/mvi/script-opts/ruler.conf deleted file mode 100644 index 5e6f48d..0000000 --- a/.config/mpv/mvi/script-opts/ruler.conf +++ /dev/null @@ -1,21 +0,0 @@ -# whether to show the length of the lines between the two points -show_distance=yes -# whether to show the coordinates of the two points -show_coordinates=yes -# the coordinate space of the text shown. Can be "image", "window", "both" -coordinates_space=image -# can be "degrees", "radians", "both", or "no" -show_angles=degrees -line_width=2 -dots_radius=3 -font_size=36 -# ranges from 00 (black) to FF (white) -line_color=33 -# bindings used to set points. The binding to trigger ruler mode can also be used. Comma-separated list -confirm_bindings=MBTN_LEFT,ENTER -# bindings used to set points. The binding to trigger ruler mode can also be used. Comma-separated list -exit_bindings=ESC -# if yes, the first point will be immediately set at the cursor position when calling 'ruler' -set_first_point_on_begin=no -# if yes, the ruler overlay will be immediately cleared when setting the second point -clear_on_second_point_set=no diff --git a/.config/mpv/mvi/script-opts/status_line.conf b/.config/mpv/mvi/script-opts/status_line.conf deleted file mode 100644 index ec15108..0000000 --- a/.config/mpv/mvi/script-opts/status_line.conf +++ /dev/null @@ -1,14 +0,0 @@ -# whether to show by default -enabled=yes -# its font size -size=36 -# distance of the text to the borders -margin=10 -# the text to be expanded -# see property expansion: https://mpv.io/manual/master/#property-expansion -# \N can be used for line breaks -# you can also use ass tags, see here: http://docs.aegisub.org/3.2/ASS_Tags/ -text_top_left= -text_top_right= -text_bottom_left=${filename} [${playlist-pos-1}/${playlist-count}] -text_bottom_right=[${dwidth:X}x${dheight:X}] diff --git a/.config/mpv/mvi/scripts/detect-image.lua b/.config/mpv/mvi/scripts/detect-image.lua deleted file mode 100644 index bfe52c2..0000000 --- a/.config/mpv/mvi/scripts/detect-image.lua +++ /dev/null @@ -1,73 +0,0 @@ -local opts = { - command_on_first_image_loaded="", - command_on_image_loaded="", - command_on_non_image_loaded="", -} -local options = require 'mp.options' -local msg = require 'mp.msg' - -options.read_options(opts, nil, function() end) - -function run_maybe(str) - if str ~= "" then - mp.command(str) - end -end - -local was_image = false - -function set_image(is_image) - if is_image and not was_image then - msg.info("First image detected") - run_maybe(opts.command_on_first_image_loaded) - end - if is_image then - msg.info("Image detected") - run_maybe(opts.command_on_image_loaded) - end - if not is_image and was_image then - msg.info("Non-image detected") - run_maybe(opts.command_on_non_image_loaded) - end - was_image = is_image -end - -local properties = {} - -function properties_changed() - local dwidth = properties["dwidth"] - local tracks = properties["track-list"] - local path = properties["path"] - local framecount = properties["estimated-frame-count"] - - if not path or path == "" then return end - if not tracks or #tracks == 0 then return end - local audio_tracks = 0 - for _, track in ipairs(tracks) do - if track.type == "audio" then - audio_tracks = audio_tracks + 1 - end - end - - -- only do things when state is consistent - if not framecount and audio_tracks > 0 then - set_image(false) - elseif framecount and dwidth and dwidth > 0 then - -- png have 0 frames, jpg 1 ¯\_(ツ)_/¯ - set_image((framecount == 0 or framecount == 1) and audio_tracks == 0) - end -end - -function observe(propname) - mp.observe_property(propname, "native", function(_, val) - if val ~= properties[propname] then - properties[propname] = val - msg.verbose("Property " .. propname .. " changed") - properties_changed() - end - end) -end -observe("estimated-frame-count") -observe("track-list") -observe("dwidth") -observe("path") diff --git a/.config/mpv/mvi/scripts/equalizer.lua b/.config/mpv/mvi/scripts/equalizer.lua deleted file mode 100644 index f7a50ab..0000000 --- a/.config/mpv/mvi/scripts/equalizer.lua +++ /dev/null @@ -1,176 +0,0 @@ -local opts = { - bars = 'brightness,contrast,gamma,saturation,hue', - draw_icons = true, -} - -local msg = require 'mp.msg' -local assdraw = require 'mp.assdraw' -local options = require 'mp.options' -local utils = require 'mp.utils' - -options.read_options(opts, nil, function(c) -end) - -local enabled = false -local active_bars = {} -local bar_being_dragged = nil -local stale = false - -function split_comma(input) - local ret = {} - for str in string.gmatch(input, "([^,]+)") do - ret[#ret + 1] = str - end - return ret -end - -function get_position_normalized(x, y, bar) - return (x - bar.x) / bar.w, (y - bar.y) / bar.h -end - -function handle_mouse_move() - if not bar_being_dragged then return end - local bar = bar_being_dragged - local mx, my = mp.get_mouse_pos() - local nx, _ = get_position_normalized(mx, my, bar) - nx = math.max(0, math.min(nx, 1)) - local val = math.floor(nx * (bar.max_value - bar.min_value) + bar.min_value + 0.5) - mp.set_property_number(bar.property, val) - -- the observe_property call will take care of setting the value -end - -function handle_mouse_left(table) - if table["event"] == "down" then - local mx, my = mp.get_mouse_pos() - for _, bar in ipairs(active_bars) do - local nx, ny = get_position_normalized(mx, my, bar) - if nx >= 0 and ny >= 0 and nx <= 1 and ny <= 1 then - bar_being_dragged = bar - local val = math.floor(nx * (bar.max_value - bar.min_value) + bar.min_value + 0.5) - mp.set_property_number(bar.property, val) - mp.add_forced_key_binding("mouse_move", "mouse_move", handle_mouse_move) - break - end - end - elseif table["event"] == "up" then - mp.remove_key_binding("mouse_move") - bar_being_dragged = nil - end -end - -function property_changed(prop, val) - for _, bar in ipairs(active_bars) do - if bar.property == prop then - bar.value = val - stale = true - break - end - end -end - -function idle_handler() - if not stale then return end - stale = false - local a = assdraw.ass_new() - a:new_event() - a:append(string.format('{\\an0\\bord2\\shad0\\1a&00&\\1c&%s&}', '888888')) - a:pos(0, 0) - a:draw_start() - for _, bar in ipairs(active_bars) do - a:rect_cw(bar.x, bar.y, bar.x + bar.w, bar.y + bar.h) - end - a:new_event() - a:append(string.format('{\\an0\\bord2\\shad0\\1a&00&\\1c&%s&}', 'dddddd')) - a:pos(0, 0) - a:draw_start() - for _, bar in ipairs(active_bars) do - if bar.value > bar.min_value then - local val_norm = (bar.value - bar.min_value) / (bar.max_value - bar.min_value) - a:rect_cw(bar.x, bar.y, bar.x + val_norm * bar.w, bar.y + bar.h) - end - end - for _, bar in ipairs(active_bars) do - a:new_event() - a:append("{\\an6\\fs40\\bord2}") - a:pos(bar.x - 8, bar.y + bar.h/2 - 2) - a:append(bar.property:sub(1,1):upper() .. bar.property:sub(2,-1)) - end - local ww, wh = mp.get_osd_size() - mp.set_osd_ass(ww, wh, a.text) -end - -function fix_position() - local ww, wh = mp.get_osd_size() - for i, bar in ipairs(active_bars) do - bar.x = ww / 5 - bar.y = wh / 2 + i * 50 - bar.w = ww - 2 * (ww / 5) - bar.h = 30 - end -end - -function dimensions_changed() - stale = true - fix_position() -end - -function enable() - if enabled then return end - enabled = true - mp.add_forced_key_binding("MBTN_LEFT", "mouse_left", handle_mouse_left, {complex=true}) - for i, prop in ipairs(split_comma(opts.bars)) do - local prop_info = mp.get_property_native("option-info/" .. prop) - if not prop_info then - msg.warn("Property \'" .. prop .. "\' does not exist") - elseif not prop_info.type == 'Integer' then - msg.warn("Property \'" .. prop .. "\' is not an integer") - else - mp.observe_property(prop, 'native', property_changed) - active_bars[#active_bars + 1] = { - property = prop, - value = mp.get_property_number(prop), - min_value = prop_info.min, - max_value = prop_info.max, - } - end - end - stale = true - fix_position() - mp.observe_property("osd-dimensions", "native", dimensions_changed) - mp.register_idle(idle_handler) -end - -function disable() - if not enabled then return end - enabled = false - active_bars = {} - bar_being_dragged = nil - mp.remove_key_binding("mouse_left") - mp.remove_key_binding("mouse_move") - mp.unobserve_property(property_changed) - mp.unobserve_property(dimensions_changed) - mp.unregister_idle(idle_handler) - mp.set_osd_ass(1280, 720, "") -end - -function toggle() - if enabled then - disable() - else - enable() - end -end - -function reset() - for _, prop in ipairs(split_comma(opts.bars)) do - local prop_info = mp.get_property_native("option-info/" .. prop) - if prop_info and prop_info["default-value"] then - mp.set_property(prop_info["name"], prop_info["default-value"]) - end - end -end - -mp.add_key_binding(nil, "equalizer-enable", enable) -mp.add_key_binding(nil, "equalizer-disable", disable) -mp.add_key_binding(nil, "equalizer-toggle", toggle) -mp.add_key_binding(nil, "equalizer-reset", reset) diff --git a/.config/mpv/mvi/scripts/freeze-window.lua b/.config/mpv/mvi/scripts/freeze-window.lua deleted file mode 100644 index 693c717..0000000 --- a/.config/mpv/mvi/scripts/freeze-window.lua +++ /dev/null @@ -1,14 +0,0 @@ --- credit to TheAMM - -local size_changed = false - -mp.register_idle(function() - if not size_changed then return end - local ww, wh = mp.get_osd_size() - if not ww or ww <= 0 or not wh or wh <= 0 then return end - mp.set_property("geometry", string.format("%dx%d", ww, wh)) - size_changed = false -end) - -mp.observe_property("osd-width", "native", function() size_changed = true end) -mp.observe_property("osd-height", "native", function() size_changed = true end) diff --git a/.config/mpv/mvi/scripts/image-positioning.lua b/.config/mpv/mvi/scripts/image-positioning.lua deleted file mode 100644 index c0036d9..0000000 --- a/.config/mpv/mvi/scripts/image-positioning.lua +++ /dev/null @@ -1,277 +0,0 @@ -local opts = { - drag_to_pan_margin = 50, - drag_to_pan_move_if_full_view=false, - - pan_follows_cursor_margin = 50, - - cursor_centric_zoom_margin = 50, - cursor_centric_zoom_auto_center = true, - cursor_centric_zoom_dezoom_if_full_view = false, -} -local options = require 'mp.options' -local msg = require 'mp.msg' -local assdraw = require 'mp.assdraw' - -options.read_options(opts, nil, function() end) - -function clamp(value, low, high) - if value <= low then - return low - elseif value >= high then - return high - else - return value - end -end - - -local cleanup = nil -- function set up by drag-to-pan/pan-follows cursor and must be called to clean lingering state - -function drag_to_pan_handler(table) - if cleanup then - cleanup() - cleanup = nil - end - if table["event"] == "down" then - local dim = mp.get_property_native("osd-dimensions") - if not dim then return end - local mouse_pos_origin, video_pan_origin = {}, {} - local moved = false - mouse_pos_origin[1], mouse_pos_origin[2] = mp.get_mouse_pos() - video_pan_origin[1] = mp.get_property_number("video-pan-x") - video_pan_origin[2] = mp.get_property_number("video-pan-y") - local video_size = { dim.w - dim.ml - dim.mr, dim.h - dim.mt - dim.mb } - local margin = opts.drag_to_pan_margin - local move_up = true - local move_lateral = true - if not opts.drag_to_pan_move_if_full_view then - if dim.ml >= 0 and dim.mr >= 0 then - move_lateral = false - end - if dim.mt >= 0 and dim.mb >= 0 then - move_up = false - end - end - if not move_up and not move_lateral then return end - local idle = function() - if moved then - local mX, mY = mp.get_mouse_pos() - local pX = video_pan_origin[1] - local pY = video_pan_origin[2] - if move_lateral then - pX = video_pan_origin[1] + (mX - mouse_pos_origin[1]) / video_size[1] - if 2 * margin > dim.ml + dim.mr then - pX = clamp(pX, - (-margin + dim.w / 2) / video_size[1] - 0.5, - (margin - dim.w / 2) / video_size[1] + 0.5) - else - pX = clamp(pX, - (margin - dim.w / 2) / video_size[1] + 0.5, - (-margin + dim.w / 2) / video_size[1] - 0.5) - end - end - if move_up then - pY = video_pan_origin[2] + (mY - mouse_pos_origin[2]) / video_size[2] - if 2 * margin > dim.mt + dim.mb then - pY = clamp(pY, - (-margin + dim.h / 2) / video_size[2] - 0.5, - (margin - dim.h / 2) / video_size[2] + 0.5) - else - pY = clamp(pY, - (margin - dim.h / 2) / video_size[2] + 0.5, - (-margin + dim.h / 2) / video_size[2] - 0.5) - end - end - mp.command("no-osd set video-pan-x " .. clamp(pX, -3, 3) .. "; no-osd set video-pan-y " .. clamp(pY, -3, 3)) - moved = false - end - end - mp.register_idle(idle) - mp.add_forced_key_binding("mouse_move", "image-viewer-mouse-move", function() moved = true end) - cleanup = function() - mp.remove_key_binding("image-viewer-mouse-move") - mp.unregister_idle(idle) - end - end -end - -function pan_follows_cursor_handler(table) - if cleanup then - cleanup() - cleanup = nil - end - if table["event"] == "down" then - local dim = mp.get_property_native("osd-dimensions") - if not dim then return end - local video_size = { dim.w - dim.ml - dim.mr, dim.h - dim.mt - dim.mb } - local moved = true - local idle = function() - if moved then - local mX, mY = mp.get_mouse_pos() - local x = math.min(1, math.max(- 2 * mX / dim.w + 1, -1)) - local y = math.min(1, math.max(- 2 * mY / dim.h + 1, -1)) - local command = "" - local margin = opts.pan_follows_cursor_margin - if dim.ml + dim.mr < 0 then - command = command .. "no-osd set video-pan-x " .. clamp(x * (2 * margin - dim.ml - dim.mr) / (2 * video_size[1]), -3, 3) .. ";" - elseif mp.get_property_number("video-pan-x") ~= 0 then - command = command .. "no-osd set video-pan-x " .. "0;" - end - if dim.mt + dim.mb < 0 then - command = command .. "no-osd set video-pan-y " .. clamp(y * (2 * margin - dim.mt - dim.mb) / (2 * video_size[2]), -3, 3) .. ";" - elseif mp.get_property_number("video-pan-y") ~= 0 then - command = command .. "no-osd set video-pan-y " .. "0;" - end - if command ~= "" then - mp.command(command) - end - moved = false - end - end - mp.register_idle(idle) - mp.add_forced_key_binding("mouse_move", "image-viewer-mouse-move", function() moved = true end) - cleanup = function() - mp.remove_key_binding("image-viewer-mouse-move") - mp.unregister_idle(idle) - end - end -end - -function cursor_centric_zoom_handler(amt) - local zoom_inc = tonumber(amt) - if not zoom_inc or zoom_inc == 0 then return end - local dim = mp.get_property_native("osd-dimensions") - if not dim then return end - - local margin = opts.cursor_centric_zoom_margin - - local video_size = { dim.w - dim.ml - dim.mr, dim.h - dim.mt - dim.mb } - - -- the size in pixels of the (in|de)crement - local diff_width = (2 ^ zoom_inc - 1) * video_size[1] - local diff_height = (2 ^ zoom_inc - 1) * video_size[2] - if not opts.cursor_centric_zoom_dezoom_if_full_view and - zoom_inc < 0 and - video_size[1] + diff_width + 2 * margin <= dim.w and - video_size[2] + diff_height + 2 * margin <= dim.h - then - -- the zoom decrement is too much, reduce it such that the full image is visible, no more, no less - -- in addition, this should take care of trying too zoom out while everything is already visible - local new_zoom_inc_x = math.log((dim.w - 2 * margin) / video_size[1]) / math.log(2) - local new_zoom_inc_y = math.log((dim.h - 2 * margin) / video_size[2]) / math.log(2) - local new_zoom_inc = math.min(0, math.min(new_zoom_inc_x, new_zoom_inc_y)) - zoom_inc = new_zoom_inc - diff_width = (2 ^ zoom_inc - 1) * video_size[1] - diff_height = (2 ^ zoom_inc - 1) * video_size[2] - end - local new_width = video_size[1] + diff_width - local new_height = video_size[2] + diff_height - - local mouse_pos_origin = {} - mouse_pos_origin[1], mouse_pos_origin[2] = mp.get_mouse_pos() - local new_pan_x, new_pan_y - - -- some additional constraints: - -- if image can be fully visible (in either direction), set pan to 0 - -- if border would show on either side, then prefer adjusting the pan even if not cursor-centric - local auto_c = opts.cursor_centric_zoom_auto_center - if auto_c and new_width <= dim.w then - new_pan_x = 0 - else - local pan_x = mp.get_property("video-pan-x") - local rx = (dim.ml + video_size[1] / 2 - mouse_pos_origin[1]) / (video_size[1] / 2) - new_pan_x = (pan_x * video_size[1] + rx * diff_width / 2) / new_width - if auto_c then - new_pan_x = clamp(new_pan_x, (dim.w - 2 * margin) / (2 * new_width) - 0.5, - (dim.w - 2 * margin) / (2 * new_width) + 0.5) - end - end - - if auto_c and new_height <= dim.h then - new_pan_y = 0 - else - local pan_y = mp.get_property("video-pan-y") - local ry = (dim.mt + video_size[2] / 2 - mouse_pos_origin[2]) / (video_size[2] / 2) - new_pan_y = (pan_y * video_size[2] + ry * diff_height / 2) / new_height - if auto_c then - new_pan_y = clamp(new_pan_y, (dim.h - 2 * margin) / (2 * new_height) - 0.5, - (dim.h - 2 * margin) / (2 * new_height) + 0.5) - end - end - - local zoom_origin = mp.get_property("video-zoom") - mp.command("no-osd set video-zoom " .. zoom_origin + zoom_inc .. "; no-osd set video-pan-x " .. clamp(new_pan_x, -3, 3) .. "; no-osd set video-pan-y " .. clamp(new_pan_y, -3, 3)) -end - -function align_border(x, y) - local dim = mp.get_property_native("osd-dimensions") - if not dim then return end - local video_size = { dim.w - dim.ml - dim.mr, dim.h - dim.mt - dim.mb } - local x, y = tonumber(x), tonumber(y) - local command = "" - if x then - command = command .. "no-osd set video-pan-x " .. clamp(- x * (dim.ml + dim.mr) / (2 * video_size[1]), -3, 3) .. ";" - end - if y then - command = command .. "no-osd set video-pan-y " .. clamp(- y * (dim.mt + dim.mb) / (2 * video_size[2]), -3, 3) .. ";" - end - if command ~= "" then - mp.command(command) - end -end - -function pan_image(axis, amount, zoom_invariant, image_constrained) - amount = tonumber(amount) - if not amount or amount == 0 or axis ~= "x" and axis ~= "y" then return end - if zoom_invariant == "yes" then - amount = amount / 2 ^ mp.get_property_number("video-zoom") - end - local prop = "video-pan-" .. axis - local old_pan = mp.get_property_number(prop) - if image_constrained == "yes" then - local dim = mp.get_property_native("osd-dimensions") - if not dim then return end - local margin = - (axis == "x" and amount > 0) and dim.ml - or (axis == "x" and amount < 0) and dim.mr - or (amount > 0) and dim.mt - or (amount < 0) and dim.mb - local vid_size = (axis == "x") and (dim.w - dim.ml - dim.mr) or (dim.h - dim.mt - dim.mb) - local pixels_moved = math.abs(amount) * vid_size - -- the margin is already visible, no point going further - if margin >= 0 then - return - elseif margin + pixels_moved > 0 then - amount = -(math.abs(amount) / amount) * margin / vid_size - end - end - mp.set_property_number(prop, old_pan + amount) -end - -function rotate_video(amt) - local rot = mp.get_property_number("video-rotate") - rot = (rot + amt) % 360 - mp.set_property_number("video-rotate", rot) -end - -function reset_pan_if_visible() - local dim = mp.get_property_native("osd-dimensions") - if not dim then return end - local command = "" - if (dim.ml + dim.mr >= 0) then - command = command .. "no-osd set video-pan-x 0" .. ";" - end - if (dim.mt + dim.mb >= 0) then - command = command .. "no-osd set video-pan-y 0" .. ";" - end - if command ~= "" then - mp.command(command) - end -end - -mp.add_key_binding(nil, "drag-to-pan", drag_to_pan_handler, {complex = true}) -mp.add_key_binding(nil, "pan-follows-cursor", pan_follows_cursor_handler, {complex = true}) -mp.add_key_binding(nil, "cursor-centric-zoom", cursor_centric_zoom_handler) -mp.add_key_binding(nil, "align-border", align_border) -mp.add_key_binding(nil, "pan-image", pan_image) -mp.add_key_binding(nil, "rotate-video", rotate_video) -mp.add_key_binding(nil, "reset-pan-if-visible", reset_pan_if_visible) -mp.add_key_binding(nil, "force-print-filename", force_print_filename) diff --git a/.config/mpv/mvi/scripts/minimap.lua b/.config/mpv/mvi/scripts/minimap.lua deleted file mode 100644 index f1b9a7d..0000000 --- a/.config/mpv/mvi/scripts/minimap.lua +++ /dev/null @@ -1,201 +0,0 @@ -local opts = { - enabled = true, - center = "92,92", - scale = 12, - max_size = "16,16", - image_opacity = "88", - image_color = "BBBBBB", - view_opacity = "BB", - view_color = "222222", - view_above_image = true, - hide_when_full_image_in_view = true, -} - -local msg = require 'mp.msg' -local assdraw = require 'mp.assdraw' -local options = require 'mp.options' - -options.read_options(opts, nil, function(c) - if c["enabled"] then - if opts.enabled then - enable() - else - disable() - end - end - mark_stale() -end) - -function split_comma(input) - local ret = {} - for str in string.gmatch(input, "([^,]+)") do - ret[#ret + 1] = tonumber(str) - end - return ret -end - -local active = false -local refresh = true - -function draw_ass(ass) - local ww, wh = mp.get_osd_size() - mp.set_osd_ass(ww, wh, ass) -end - -function mark_stale() - refresh = true -end - -function refresh_minimap() - if not refresh then return end - refresh = false - - local dim = mp.get_property_native("osd-dimensions") - if not dim then - draw_ass("") - return - end - local ww, wh = dim.w, dim.h - - if not (ww > 0 and wh > 0) then return end - if opts.hide_when_full_image_in_view then - if dim.mt >= 0 and dim.mb >= 0 and dim.ml >= 0 and dim.mr >= 0 then - draw_ass("") - return - end - end - - local center = split_comma(opts.center) - center[1] = center[1] * 0.01 * ww - center[2] = center[2] * 0.01 * wh - local cutoff = split_comma(opts.max_size) - cutoff[1] = cutoff[1] * 0.01 * ww * 0.5 - cutoff[2] = cutoff[2] * 0.01 * wh * 0.5 - - local a = assdraw.ass_new() - local draw = function(x, y, w, h, opacity, color) - a:new_event() - a:pos(center[1], center[2]) - a:append("{\\bord0}") - a:append("{\\shad0}") - a:append("{\\c&" .. color .. "&}") - a:append("{\\2a&HFF}") - a:append("{\\3a&HFF}") - a:append("{\\4a&HFF}") - a:append("{\\1a&H" .. opacity .. "}") - w = w * 0.5 - h = h * 0.5 - a:draw_start() - local rounded = {true,true,true,true} -- tl, tr, br, bl - local x0,y0,x1,y1 = x-w, y-h, x+w, y+h - if x0 < -cutoff[1] then - x0 = -cutoff[1] - rounded[4] = false - rounded[1] = false - end - if y0 < -cutoff[2] then - y0 = -cutoff[2] - rounded[1] = false - rounded[2] = false - end - if x1 > cutoff[1] then - x1 = cutoff[1] - rounded[2] = false - rounded[3] = false - end - if y1 > cutoff[2] then - y1 = cutoff[2] - rounded[3] = false - rounded[4] = false - end - - local r = 3 - local c = 0.551915024494 * r - if rounded[0] then - a:move_to(x0 + r, y0) - else - a:move_to(x0,y0) - end - if rounded[1] then - a:line_to(x1 - r, y0) - a:bezier_curve(x1 - r + c, y0, x1, y0 + r - c, x1, y0 + r) - else - a:line_to(x1, y0) - end - if rounded[2] then - a:line_to(x1, y1 - r) - a:bezier_curve(x1, y1 - r + c, x1 - r + c, y1, x1 - r, y1) - else - a:line_to(x1, y1) - end - if rounded[3] then - a:line_to(x0 + r, y1) - a:bezier_curve(x0 + r - c, y1, x0, y1 - r + c, x0, y1 - r) - else - a:line_to(x0, y1) - end - if rounded[4] then - a:line_to(x0, y0 + r) - a:bezier_curve(x0, y0 + r - c, x0 + r - c, y0, x0 + r, y0) - else - a:line_to(x0, y0) - end - a:draw_stop() - end - local image = function() - draw((dim.ml/2 - dim.mr/2) / opts.scale, - (dim.mt/2 - dim.mb/2) / opts.scale, - (ww - dim.ml - dim.mr) / opts.scale, - (wh - dim.mt - dim.mb) / opts.scale, - opts.image_opacity, - opts.image_color) - end - local view = function() - draw(0, - 0, - ww / opts.scale, - wh / opts.scale, - opts.view_opacity, - opts.view_color) - end - if opts.view_above_image then - image() - view() - else - view() - image() - end - draw_ass(a.text) -end - -function enable() - if active then return end - active = true - mp.observe_property("osd-dimensions", nil, mark_stale) - mp.register_idle(refresh_minimap) - mark_stale() -end - -function disable() - if not active then return end - active = false - mp.unobserve_property(mark_stale) - mp.unregister_idle(refresh_minimap) - draw_ass("") -end - -function toggle() - if active then - disable() - else - enable() - end -end - -if opts.enabled then - enable() -end - -mp.add_key_binding(nil, "minimap-enable", enable) -mp.add_key_binding(nil, "minimap-disable", disable) -mp.add_key_binding(nil, "minimap-toggle", toggle) diff --git a/.config/mpv/mvi/scripts/mouse_coords.lua b/.config/mpv/mvi/scripts/mouse_coords.lua deleted file mode 120000 index ecd3896..0000000 --- a/.config/mpv/mvi/scripts/mouse_coords.lua +++ /dev/null @@ -1 +0,0 @@ -../../scripts/mouse_coords.lua \ No newline at end of file diff --git a/.config/mpv/mvi/scripts/ruler.lua b/.config/mpv/mvi/scripts/ruler.lua deleted file mode 100644 index 2cfcd0f..0000000 --- a/.config/mpv/mvi/scripts/ruler.lua +++ /dev/null @@ -1,314 +0,0 @@ -local opts = { - show_distance = true, - show_coordinates = true, - coordinates_space = "image", - show_angles = "degrees", - line_width = 2, - dots_radius = 3, - font_size = 36, - line_color = "33", - confirm_bindings = "MBTN_LEFT,ENTER", - exit_bindings = "ESC", - set_first_point_on_begin = false, - clear_on_second_point_set = false, -} - -local options = require 'mp.options' -local msg = require 'mp.msg' -local assdraw = require 'mp.assdraw' - -local state = 0 -- {0,1,2,3} = {inactive,setting first point,setting second point,done} -local first_point = nil -- in normalized video space coordinates -local second_point = nil -- in normalized video space coordinates -local video_dimensions_stale = false - -function split(input) - local ret = {} - for str in string.gmatch(input, "([^,]+)") do - ret[#ret + 1] = str - end - return ret -end - -local confirm_bindings = split(opts.confirm_bindings) -local exit_bindings = split(opts.exit_bindings) - -options.read_options(opts, nil, function() - if state ~= 0 then - remove_bindings() - end - confirm_bindings = split(opts.confirm_bindings) - exit_bindings = split(opts.exit_bindings) - if state ~= 0 then - add_bindings() - mark_stale() - end -end) - -function draw_ass(ass) - local ww, wh = mp.get_osd_size() - mp.set_osd_ass(ww, wh, ass) -end - - -function cursor_video_space_normalized(dim) - local mx, my = mp.get_mouse_pos() - local ret = {} - ret[1] = (mx - dim.ml) / (dim.w - dim.ml - dim.mr) - ret[2] = (my - dim.mt) / (dim.h - dim.mt - dim.mb) - return ret -end - -function refresh() - if not video_dimensions_stale then return end - video_dimensions_stale = false - - local dim = mp.get_property_native("osd-dimensions") - local out_params = mp.get_property_native("video-out-params") - if not dim or not out_params then - draw_ass("") - return - end - local vid_width = out_params.dw - local vid_height = out_params.dh - - function video_space_normalized_to_video(point) - local ret = {} - ret[1] = point[1] * vid_width - ret[2] = point[2] * vid_height - return ret - end - function video_space_normalized_to_screen(point) - local ret = {} - ret[1] = point[1] * (dim.w - dim.ml - dim.mr) + dim.ml - ret[2] = point[2] * (dim.h - dim.mt - dim.mb) + dim.mt - return ret - end - - local line_start = {} - local line_end = {} - if second_point then - line_start.image = video_space_normalized_to_video(first_point) - line_start.screen = video_space_normalized_to_screen(first_point) - line_end.image = video_space_normalized_to_video(second_point) - line_end.screen = video_space_normalized_to_screen(second_point) - elseif first_point then - line_start.image = video_space_normalized_to_video(first_point) - line_start.screen = video_space_normalized_to_screen(first_point) - line_end.image = video_space_normalized_to_video(cursor_video_space_normalized(dim)) - line_end.screen = {} - line_end.screen[1], line_end.screen[2] = mp.get_mouse_pos() - else - local mx, my = mp.get_mouse_pos() - line_start.image = video_space_normalized_to_video(cursor_video_space_normalized(dim)) - line_start.screen = {} - line_start.screen[1], line_start.screen[2] = mp.get_mouse_pos() - line_end = line_start - end - local distinct = (math.abs(line_start.screen[1] - line_end.screen[1]) >= 1 - or math.abs(line_start.screen[2] - line_end.screen[2]) >= 1) - - local a = assdraw:ass_new() - local draw_setup = function(bord) - a:new_event() - a:pos(0,0) - a:append("{\\bord" .. bord .. "}") - a:append("{\\shad0}") - local r = opts.line_color - a:append("{\\3c&H".. r .. r .. r .. "&}") - a:append("{\\1a&HFF}") - a:append("{\\2a&HFF}") - a:append("{\\3a&H00}") - a:append("{\\4a&HFF}") - a:draw_start() - end - local dot = function(pos, size) - draw_setup(size) - a:move_to(pos[1], pos[2]-0.5) - a:line_to(pos[1], pos[2]+0.5) - end - local line = function(from, to, size) - draw_setup(size) - a:move_to(from[1], from[2]) - a:line_to(to[1], to[2]) - end - if distinct then - dot(line_start.screen, opts.dots_radius) - line(line_start.screen, line_end.screen, opts.line_width) - dot(line_end.screen, opts.dots_radius) - else - dot(line_start.screen, opts.dots_radius) - end - - local line_info = function() - if not opts.show_distance then return end - a:new_event() - a:append("{\\fs36}{\\bord1}") - a:pos((line_start.screen[1] + line_end.screen[1]) / 2, (line_start.screen[2] + line_end.screen[2]) / 2) - local an = 1 - if line_start.image[1] < line_end.image[1] then an = an + 2 end - if line_start.image[2] < line_end.image[2] then an = an + 6 end - a:an(an) - local image = math.sqrt(math.pow(line_start.image[1] - line_end.image[1], 2) + math.pow(line_start.image[2] - line_end.image[2], 2)) - local screen = math.sqrt(math.pow(line_start.screen[1] - line_end.screen[1], 2) + math.pow(line_start.screen[2] - line_end.screen[2], 2)) - if opts.coordinates_space == "both" then - a:append(string.format("image: %.1f\\Nscreen: %.1f", image, screen)) - elseif opts.coordinates_space == "image" then - a:append(string.format("%.1f", image)) - elseif opts.coordinates_space == "window" then - a:append(string.format("%.1f", screen)) - end - end - local dot_info = function(pos, opposite) - if not opts.show_coordinates then return end - a:new_event() - a:append("{\\fs" .. opts.font_size .."}{\\bord1}") - a:pos(pos.screen[1], pos.screen[2]) - local an - if distinct then - an = 1 - if line_start.image[1] > line_end.image[1] then an = an + 2 end - if line_start.image[2] < line_end.image[2] then an = an + 6 end - else - an = 7 - end - if opposite then - an = 9 + 1 - an - end - a:an(an) - if opts.coordinates_space == "both" then - a:append(string.format("image: %.1f, %.1f\\Nscreen: %i, %i", - pos.image[1], pos.image[2], pos.screen[1], pos.screen[2])) - elseif opts.coordinates_space == "image" then - a:append(string.format("%.1f, %.1f", pos.image[1], pos.image[2])) - elseif opts.coordinates_space == "window" then - a:append(string.format("%i, %i", pos.screen[1], pos.screen[2])) - end - end - dot_info(line_start, true) - if distinct then - line_info() - dot_info(line_end, false) - end - if distinct and opts.show_angles ~= "no" then - local dist = 50 - local pos_from_angle = function(mult, angle) - return { - line_start.screen[1] + mult * dist * math.cos(angle), - line_start.screen[2] + mult * dist * math.sin(angle), - } - end - local extended = { line_start.screen[1], line_start.screen[2] } - if line_end.screen[1] > line_start.screen[1] then - extended[1] = extended[1] + dist - else - extended[1] = extended[1] - dist - end - line(line_start.screen, extended, math.max(0, opts.line_width-0.5)) - local angle = math.atan(math.abs(line_start.image[2] - line_end.image[2]) / math.abs(line_start.image[1] - line_end.image[1])) - local fix_angle - local an - if line_end.image[2] < line_start.image[2] and line_end.image[1] > line_start.image[1] then - -- upper-right - an = 4 - fix_angle = function(angle) return - angle end - elseif line_end.image[2] < line_start.image[2] then - -- upper-left - an = 6 - fix_angle = function(angle) return math.pi + angle end - elseif line_end.image[1] < line_start.image[1] then - -- bottom-left - an = 6 - fix_angle = function(angle) return math.pi - angle end - else - -- bottom-right - an = 4 - fix_angle = function(angle) return angle end - end - -- should implement this https://math.stackexchange.com/questions/873224/calculate-control-points-of-cubic-bezier-curve-approximating-a-part-of-a-circle - local cp1 = pos_from_angle(1, fix_angle(angle*1/4)) - local cp2 = pos_from_angle(1, fix_angle(angle*3/4)) - local p2 = pos_from_angle(1, fix_angle(angle)) - a:bezier_curve(cp1[1], cp1[2], cp2[1], cp2[2], p2[1], p2[2]) - - a:new_event() - a:append("{\\fs" .. opts.font_size .."}{\\bord1}") - local text_pos = pos_from_angle(1.1, fix_angle(angle*2/3)) -- you'd think /2 would make more sense, but *2/3 looks better - a:pos(text_pos[1], text_pos[2]) - a:an(an) - if opts.show_angles == "both" then - a:append(string.format("%.2f\\N%.1f°", angle, angle / math.pi * 180)) - elseif opts.show_angles == "degrees" then - a:append(string.format("%.1f°", angle / math.pi * 180)) - elseif opts.show_angles == "radians" then - a:append(string.format("%.2f", angle)) - end - end - - draw_ass(a.text) -end - -function mark_stale() - video_dimensions_stale = true -end - -function add_bindings() - mp.add_forced_key_binding("mouse_move", "ruler-mouse-move", mark_stale) - for _, key in ipairs(confirm_bindings) do - mp.add_forced_key_binding(key, "ruler-next-" .. key, next_step) - end - for _, key in ipairs(exit_bindings) do - mp.add_forced_key_binding(key, "ruler-stop-" .. key, stop) - end -end - -function remove_bindings() - for _, key in ipairs(confirm_bindings) do - mp.remove_key_binding("ruler-next-" .. key) - end - for _, key in ipairs(exit_bindings) do - mp.remove_key_binding("ruler-stop-" .. key) - end - mp.remove_key_binding("ruler-mouse-move") -end - -function next_step() - if state == 0 then - state = 1 - mp.register_idle(refresh) - mp.observe_property("osd-dimensions", nil, mark_stale) - mark_stale() - add_bindings() - if opts.set_first_point_on_begin then - next_step() - end - elseif state == 1 then - local dim = mp.get_property_native("osd-dimensions") - if not dim then return end - state = 2 - first_point = cursor_video_space_normalized(dim) - elseif state == 2 then - local dim = mp.get_property_native("osd-dimensions") - if not dim then return end - state = 3 - second_point = cursor_video_space_normalized(dim) - if opts.clear_on_second_point_set then - next_step() - end - else - stop() - end -end - -function stop() - if state == 0 then return end - mp.unregister_idle(refresh) - mp.unobserve_property(mark_stale) - remove_bindings() - state = 0 - first_point = nil - second_point = nil - draw_ass("") -end - -mp.add_key_binding(nil, "ruler", next_step) diff --git a/.config/mpv/mvi/scripts/status-line.lua b/.config/mpv/mvi/scripts/status-line.lua deleted file mode 100644 index 7ac5168..0000000 --- a/.config/mpv/mvi/scripts/status-line.lua +++ /dev/null @@ -1,142 +0,0 @@ -local opts = { - enabled = true, - size = 36, - margin = 10, - text_top_left = "", - text_top_right = "", - text_bottom_left = "${filename} [${playlist-pos-1}/${playlist-count}]", - text_bottom_right = "[${dwidth:X}x${dheight:X}]", -} - -local msg = require 'mp.msg' -local assdraw = require 'mp.assdraw' -local options = require 'mp.options' - -options.read_options(opts, nil, function(c) - if c["enabled"] then - if opts.enabled then - enable() - else - disable() - end - end - if c["size"] or c["margin"] then - mark_stale() - end - if c["text_top_left"] or - c["text_top_right"] or - c["text_bottom_left"] or - c["text_bottom_right"] - then - observe_properties() - mark_stale() - end -end) - -local stale = true -local active = false - -function draw_ass(ass) - local ww, wh = mp.get_osd_size() - mp.set_osd_ass(ww, wh, ass) -end - -function refresh() - if not stale then return end - stale = false - local a = assdraw:ass_new() - local draw_text = function(text, an, x, y) - if text == "" then return end - local expanded = mp.command_native({ "expand-text", text}) - if not expanded then - msg.error("Error expanding status-line") - return - end - msg.verbose("Status-line changed to: " .. expanded) - a:new_event() - a:an(an) - a:pos(x,y) - a:append("{\\fs".. opts.size.. "}{\\bord1.0}") - a:append(expanded) - end - local w,h = mp.get_osd_size() - local m = opts.margin - draw_text(opts.text_top_left, 7, m, m) - draw_text(opts.text_top_right, 9, w-m, m) - draw_text(opts.text_bottom_left, 1, m, h-m) - draw_text(opts.text_bottom_right, 3, w-m, h-m) - draw_ass(a.text) -end - -function mark_stale() - stale = true -end - -function observe_properties() - mp.unobserve_property(mark_stale) - if not active then return end - for _, str in ipairs({ - opts.text_top_left, - opts.text_top_right, - opts.text_bottom_left, - opts.text_bottom_right, - }) do - local start = 0 - while true do - local s, e, cap = string.find(str, "%${[?!]?([%l%d-/]*)", start) - if not s then break end - msg.verbose("Observing property " .. cap) - mp.observe_property(cap, nil, mark_stale) - start = e - end - end - mp.observe_property("osd-width", nil, mark_stale) - mp.observe_property("osd-height", nil, mark_stale) -end - -function enable() - if active then return end - active = true - observe_properties() - mp.register_idle(refresh) - mark_stale() -end - - -function disable() - if not active then return end - active = false - observe_properties() - mp.unregister_idle(refresh) - draw_ass("") -end - -function toggle() - if active then - disable() - else - enable() - end -end - -if opts.enabled then - enable() -end - -mp.add_key_binding(nil, "status-line-enable", enable) -mp.add_key_binding(nil, "status-line-disable", disable) -mp.add_key_binding(nil, "status-line-toggle", toggle) - --- TODO remove -mp.add_key_binding(nil, "enable-status-line", function() - msg.warn("This binding is deprecated, use 'status-line-enable' instead") - enable() -end) -mp.add_key_binding(nil, "disable-status-line", function() - msg.warn("This binding is deprecated, use 'status-line-disable' instead") - disable() -end) -mp.add_key_binding(nil, "toggle-status-line", function() - msg.warn("This binding is deprecated, use 'status-line-toggle' instead") - toggle() -end) diff --git a/.config/mpv/script-opts/console.conf b/.config/mpv/script-opts/console.conf deleted file mode 100644 index b887b61..0000000 --- a/.config/mpv/script-opts/console.conf +++ /dev/null @@ -1,2 +0,0 @@ -font=Iosevka Etoile -#font_size=18 diff --git a/.config/mpv/script-opts/console.conf.in b/.config/mpv/script-opts/console.conf.in deleted file mode 100644 index 0137862..0000000 --- a/.config/mpv/script-opts/console.conf.in +++ /dev/null @@ -1,2 +0,0 @@ -font=@uifont@ -#font_size=18 diff --git a/.config/mpv/script-opts/osc.conf b/.config/mpv/script-opts/osc.conf deleted file mode 100644 index c99b867..0000000 --- a/.config/mpv/script-opts/osc.conf +++ /dev/null @@ -1,23 +0,0 @@ -# -# MPV LUA SETTINGS -# - -layout=bottombar -# layout=topbar -# layout=slimbox -# layout=box - -boxalpha=90 -# valign=-1 -# hidetimeout=1000 -# fadeduration=100 -seekbarstyle=bar -# seekbarstyle=slider -# seekbarstyle=knob - -# use native mpv values and disable OSC internal track list management (and some functions that depend on it) -iamaprogrammer=yes -# display total time instead of remaining time? -# timetotal=no -# display timecodes with milliseconds -# timems=yes diff --git a/.config/mpv/script-opts/stats.conf b/.config/mpv/script-opts/stats.conf deleted file mode 100644 index 40c1d80..0000000 --- a/.config/mpv/script-opts/stats.conf +++ /dev/null @@ -1,4 +0,0 @@ -font=Iosevka Etoile -# font_mono=monospace -# font_size=8 -# border_size=0.6 diff --git a/.config/mpv/script-opts/stats.conf.in b/.config/mpv/script-opts/stats.conf.in deleted file mode 100644 index bcf678e..0000000 --- a/.config/mpv/script-opts/stats.conf.in +++ /dev/null @@ -1,4 +0,0 @@ -font=@uifont@ -# font_mono=monospace -# font_size=8 -# border_size=0.6 diff --git a/.config/mpv/script-opts/subs2srs.conf b/.config/mpv/script-opts/subs2srs.conf deleted file mode 100644 index 09e2af4..0000000 --- a/.config/mpv/script-opts/subs2srs.conf +++ /dev/null @@ -1,13 +0,0 @@ -autoclip=yes - -deck_name=subs2srs -model_name=Japanese sentences -sentence_field=SentKanji -secondary_field=SentEng -audio_field=SentAudio -image_field=Image -note_tag=subs2srs - -use_ffmpeg=yes -snapshot_format=webp -opus_container=webm diff --git a/.config/mpv/script-opts/thumbfast.conf b/.config/mpv/script-opts/thumbfast.conf deleted file mode 100644 index 2284440..0000000 --- a/.config/mpv/script-opts/thumbfast.conf +++ /dev/null @@ -1,8 +0,0 @@ -# Apply tone-mapping, no to disable -tone_mapping=auto - -# Enable on network playback -network=yes - -# Enable hardware decoding -hwdec=yes diff --git a/.config/mpv/script-opts/uosc.conf b/.config/mpv/script-opts/uosc.conf deleted file mode 100644 index 0ed5f6e..0000000 --- a/.config/mpv/script-opts/uosc.conf +++ /dev/null @@ -1,10 +0,0 @@ -border_radius=1 -controls=menu,gap,subtitles,<has_many_audio>audio,<has_many_video>video,<has_many_edition>editions,<stream>stream-quality,<has_chapter>chapters,gap,space,speed,space,shuffle,loop-playlist,loop-file,gap,prev,items,next -controls_size=24 -pause_indicator=none -timeline_size=32 -top_bar=always -top_bar_size=32 -top_bar_alt_title=${filename} -top_bar_flash_on=audio,image,video -volume_size=32 diff --git a/.config/mpv/script-opts/webm.conf b/.config/mpv/script-opts/webm.conf deleted file mode 100644 index 90b4aae..0000000 --- a/.config/mpv/script-opts/webm.conf +++ /dev/null @@ -1,3 +0,0 @@ -output_format=av1 -output_directory=~ -output_template=[%s-%e]--%T diff --git a/.config/mpv/scripts/hooks.lua b/.config/mpv/scripts/hooks.lua deleted file mode 100644 index 4f350ec..0000000 --- a/.config/mpv/scripts/hooks.lua +++ /dev/null @@ -1,27 +0,0 @@ -local mp = require("mp") -local utils = require("mp.utils") - -local function run(...) - utils.subprocess_detached({ - args = { "sh", "-c", table.concat({ ... }, " ") .. " >/dev/null 2>&1" }, - max_size = 0, - cancellable = false, - }) -end - -mp.register_event("file-loaded", function() - local function cb(n, vo) - -- mp.msg.warn(n, vo) - if vo == true then - run("makoctl", "mode", "-a", "off") - run("svdn", "wlsunset") - mp.unobserve_property(cb) - end - end - mp.observe_property("vo-configured", "bool", cb) -end) - -mp.register_event("shutdown", function() - run("makoctl", "mode", "-r", "off") - run("svup", "wlsunset") -end) diff --git a/.config/mpv/scripts/mouse_coords.lua b/.config/mpv/scripts/mouse_coords.lua deleted file mode 100644 index b2a2a65..0000000 --- a/.config/mpv/scripts/mouse_coords.lua +++ /dev/null @@ -1,41 +0,0 @@ -local msg = require("mp.msg") - --- local x, y = 0, 0 - --- function set_marker() --- x, y = mp.get_mouse_pos() --- end - --- function measure() --- x2, y2 = mp.get_mouse_pos() --- w = x2-x --- h = y2-y - --- pos = "x: " .. x .. ", y:" .. y --- dimensions = "w: " .. h .. ", h:" .. h --- output = pos .. " | " .. dimensions - --- mp.msg.warn(output) --- mp.osd_message(output) --- end - -function print_pos() - dw = mp.get_property_number("dwidth") - dh = mp.get_property_number("dheight") - ow, oh = mp.get_osd_size() - - wr = math.floor(ow / dw) - hr = math.floor(oh / dh) - - mx, my = mp.get_mouse_pos() - x = math.floor(mx / wr) - y = math.floor(my / hr) - - pos = dw .. "x" .. dh .. " " .. x .. "," .. y - mp.msg.warn(pos) - mp.osd_message(pos) -end - -mp.add_key_binding("0", mp.get_script_name(), print_pos) --- mp.add_key_binding("8", mp.get_script_name().."/set", set_marker) --- mp.add_key_binding("9", mp.get_script_name().."/measure", measure) diff --git a/.config/mpv/scripts/openuri.lua b/.config/mpv/scripts/openuri.lua deleted file mode 100644 index 61b20e5..0000000 --- a/.config/mpv/scripts/openuri.lua +++ /dev/null @@ -1,42 +0,0 @@ -mp = require("mp") -format_json = require("mp.utils").format_json - -function open_uri() - local json = format_json({ - type = "open-uri", - title = "https://mpv.io", - items = { - { - title = "Enter a network url", - align = "left", - value = "ignore", - muted = true, - selectable = false - } - }, - on_search = { "script-message-to", mp.get_script_name(), "openuri-cb" }, - palette = true, - search_style = "palette", - search_debounce = "submit" - }) or "{}" - mp.commandv("script-message-to", "uosc", "open-menu", json) -end - -mp.register_script_message("openuri-cb", function(path) - mp.commandv("script-message-to", "uosc", "close-menu", "openuri") - mp.commandv("loadfile", path, "append-play") -end) - -mp.add_key_binding("ctrl+o", "openuri", open_uri) - -mp.add_key_binding("ctrl+shift+o", "pasteuri", function() - local r = mp.command_native({ - name = "subprocess", - playback_only = false, - capture_stdout = true, - args = { "wl-paste" }, - }) - if r.status == 0 then - mp.commandv("script-message-to", mp.get_script_name(), "openuri-cb", r.stdout) - end -end) diff --git a/.config/mpv/scripts/yanky.lua b/.config/mpv/scripts/yanky.lua deleted file mode 100644 index be9d308..0000000 --- a/.config/mpv/scripts/yanky.lua +++ /dev/null @@ -1,37 +0,0 @@ -local mp = require("mp") - -function yank(payload) - mp.commandv("run", "wl-copy", payload) - mp.msg.info("yanked: " .. payload) - mp.osd_message("yanked: " .. payload) -end - -function yankproperty(prop) - yank(mp.get_property_native(prop)) -end - -function yankpath() - local path = mp.get_property_native("path") - if path ~= "^http" then - yank(path) - return - end - local cwd = mp.get_property_native("working-directory") - yank(require("mp.utils").join_path(cwd, path)) -end - -function yanktime() - local s = mp.get_property_native("playback-time") - local ts = string.format("%.2d:%.2d:%.2d.%.3d", s / (60 * 60), s / 60 % 60, s % 60, (s % 1) * 1000) - yank(ts) -end - -function yanksubs() - local subText = mp.get_property("sub-text") - -- local secondarySubText = mp.get_property("secondary-sub-text") - yank(subText) -end - -mp.add_key_binding("y-t", "yanktime", yanktime) -mp.add_key_binding("y-p", "yankpath", yankpath) -mp.add_key_binding("y-s", "yanksubs", yanksubs) diff --git a/.config/mpv/update-uosc.sh b/.config/mpv/update-uosc.sh deleted file mode 100755 index 7334b58..0000000 --- a/.config/mpv/update-uosc.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -set -e - -URI=" - https://github.com/tomasklaen/uosc/releases/latest/download/uosc.zip - https://github.com/tomasklaen/uosc/releases/latest/download/uosc.conf -" - -target="$(readlink -f -- "$(dirname "$0")")" -tmp=$(mktemp -d) -trap '{ rm -r $tmp; }' EXIT INT -cd "$tmp" || exit 1 - -for src in $URI; do - curl -sLO "$src" - { unzip -qd "$tmp"/ "$tmp"/*.zip 2>/dev/null && rm "$tmp"/*.zip; } || true - { tar -xf "$tmp"/*.tar* -C "$tmp"/ 2>/dev/null && rm "$tmp"/*.tar*; } || true -done - -rsync -ac "$tmp"/ "$target"/ diff --git a/.config/mpv/vapoursynth/interpolate.vpy b/.config/mpv/vapoursynth/interpolate.vpy deleted file mode 100644 index 414aa4d..0000000 --- a/.config/mpv/vapoursynth/interpolate.vpy +++ /dev/null @@ -1,84 +0,0 @@ -# vim: set ft=python: - -# see the README at https://gist.github.com/phiresky/4bfcfbbd05b3c2ed8645 -# source: https://github.com/mpv-player/mpv/issues/2149 -# source: https://github.com/mpv-player/mpv/issues/566 -# source: https://github.com/haasn/gentoo-conf/blob/nanodesu/home/nand/.mpv/filters/mvtools.vpy - -from vapoursynth import core - -# ref: http://avisynth.org.ru/mvtools/mvtools2.html#functions -# default is 400, less means interpolation will only happen when it will work well -ignore_threshold = 140 -# if n% of blocks change more than threshold then don't interpolate at all (default is 51%) -scene_change_percentage = 15 -# default to 60fps -dst_fps = 60 -realtime = True - -if "video_in" in globals(): - # realtime (mpv) - clip = video_in - # Needed because clip FPS is missing - src_fps_num = int(container_fps * 1e8) - src_fps_den = int(1e8) - clip = core.std.AssumeFPS(clip, fpsnum=src_fps_num, fpsden=src_fps_den) - dst_fps = display_fps - # Interpolating to fps higher than 60 is too CPU-expensive, smoothmotion can handle the rest. - while (dst_fps > 60): - dst_fps /= 2 -else: - realtime = False - core.std.LoadPlugin('/usr/lib64/libffms2.so') - # run with vspipe - clip = core.ffms2.Source(source=video_in_path) - if "output_fps" in globals(): - dst_fps = float(output_fps) - -# resolution in megapixels. 1080p ≈ 2MP, 720p ≈ 1MP -mpix = clip.width * clip.height / 1000000 - -# Skip interpolation for >1080p or 60 Hz content due to performance -if not (realtime and (mpix > 2.5 or clip.fps_num / clip.fps_den > 59)): - analParams = { - 'overlap': 0, - 'search': 3, - 'truemotion': True, - #'chrome': True, - #'blksize':16, - #'searchparam':1 - } - blockParams = { - 'thscd1': ignore_threshold, - 'thscd2': int(scene_change_percentage * 255 / 100), - 'mode': 3, - } - - if realtime and mpix > 1.5: - # can't handle these on Full HD with Intel i5-2500k - # see the description of these parameters in http://avisynth.org.ru/mvtools/mvtools2.html#functions - analParams['search'] = 0 - blockParams['mode'] = 0 - quality = 'low' - else: - quality = 'high' - - dst_fps_num = int(dst_fps * 1e4) - dst_fps_den = int(1e4) - print("Reflowing from {} fps to {} fps (quality={})".format( - clip.fps_num / clip.fps_den, dst_fps_num / dst_fps_den, quality)) - - sup = core.mv.Super(clip, pel=2) - bvec = core.mv.Analyse(sup, isb=True, **analParams) - fvec = core.mv.Analyse(sup, isb=False, **analParams) - clip = core.mv.BlockFPS(clip, - sup, - bvec, - fvec, - num=dst_fps_num, - den=dst_fps_den, - **blockParams) -else: - print("Skipping interpolation") - -clip.set_output() diff --git a/.config/newsboat/config b/.config/newsboat/config deleted file mode 100644 index 641cfb2..0000000 --- a/.config/newsboat/config +++ /dev/null @@ -1,17 +0,0 @@ -article-sort-order date-asc -auto-reload yes -browser firefox - -unbind-key l -bind-key L toggle-show-read-feeds - -bind-key j down -bind-key k up -bind-key l open -bind-key h quit - -color info black cyan -color listfocus black white bold -color listfocus black white bold -color listnormal_unread cyan black -color listfocus_unread cyan white bold diff --git a/.config/newsboat/urls b/.config/newsboat/urls deleted file mode 100644 index d54ea73..0000000 --- a/.config/newsboat/urls +++ /dev/null @@ -1,20 +0,0 @@ -https://blog.fefe.de/rss.xml news -http://www.tagesschau.de/xml/atom/ news - -# https://www.cgpgrey.com/rss.xml?html internet - -https://blog.nightly.mozilla.org/feed/ dev -https://drewdevault.com/feed.xml dev -https://emersion.fr/blog/rss.xml dev -https://hacktivis.me/feed.atom dev -https://wolf480pl.github.io/feed.xml dev -https://cli.fan/posts/index.xml dev -# https://blog.jessfraz.com/index.xml dev - -https://git.sr.ht/~sircmpwn/aerc/log/rss.xml dev repos -https://git.sr.ht/~emersion/soju/log/rss.xml dev repos - -https://blog.kobol.io/feed.xml -https://nitter.net/kobol_io/rss - -https://torrentfreak.com/feed/ diff --git a/.config/nvim b/.config/nvim deleted file mode 120000 index 815cbcc..0000000 --- a/.config/nvim +++ /dev/null @@ -1 +0,0 @@ -../.vim \ No newline at end of file diff --git a/.config/nvim/.editorconfig b/.config/nvim/.editorconfig new file mode 100644 index 0000000..c0b69e9 --- /dev/null +++ b/.config/nvim/.editorconfig @@ -0,0 +1,11 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +tab_width = 8 +end_of_line = lf +insert_final_newline = true + +[*.lua] +max_line_length = 100 diff --git a/.config/nvim/.stylua.toml b/.config/nvim/.stylua.toml new file mode 100644 index 0000000..616d360 --- /dev/null +++ b/.config/nvim/.stylua.toml @@ -0,0 +1,6 @@ +column_width = 100 +line_endings = "Unix" +indent_type = "Spaces" +indent_width = 2 +quote_style = "AutoPreferSingle" +#call_parentheses = "Always" diff --git a/.config/nvim/after/ftplugin/gitcommit.lua b/.config/nvim/after/ftplugin/gitcommit.lua new file mode 100644 index 0000000..cec1130 --- /dev/null +++ b/.config/nvim/after/ftplugin/gitcommit.lua @@ -0,0 +1 @@ +vim.opt_local.textwidth=74 diff --git a/.config/nvim/after/ftplugin/gitrebase.lua b/.config/nvim/after/ftplugin/gitrebase.lua new file mode 100644 index 0000000..f85d3b9 --- /dev/null +++ b/.config/nvim/after/ftplugin/gitrebase.lua @@ -0,0 +1,4 @@ +vim.keymap.set('n', 'K', function() + -- local cword = vim.fn.expand('<cword>') + -- require('gitsigns').show_commit(cword, 'aboveleft split') +end, { desc = 'Lookup commit hash', buffer = 0 }) diff --git a/.config/nvim/after/ftplugin/oil.lua b/.config/nvim/after/ftplugin/oil.lua new file mode 100644 index 0000000..4d1c2c4 --- /dev/null +++ b/.config/nvim/after/ftplugin/oil.lua @@ -0,0 +1,25 @@ + +local get_client = function() + local active_clients = vim.lsp.get_clients({ name = 'zk' }) + + if next(active_clients) == nil then + return + end + + for _, v in ipairs(active_clients) do + if next(v.attached_buffers) ~= nil then + print(vim.inspect(v)) + return v.id + end + end +end + +local client_id = get_client() +if client_id == nil then + return +end + +local client = vim.lsp.get_client_by_id(client_id) +print(vim.inspect(client)) + +print('hi') diff --git a/.config/nvim/after/ftplugin/todotxt.lua b/.config/nvim/after/ftplugin/todotxt.lua new file mode 100644 index 0000000..0e90d2b --- /dev/null +++ b/.config/nvim/after/ftplugin/todotxt.lua @@ -0,0 +1 @@ +vim.opt.textwidth = 0 diff --git a/.config/nvim/after/ftplugin/typst.lua b/.config/nvim/after/ftplugin/typst.lua new file mode 100644 index 0000000..e444bd5 --- /dev/null +++ b/.config/nvim/after/ftplugin/typst.lua @@ -0,0 +1,6 @@ +vim.api.nvim_buf_create_user_command(0, 'OpenPdf', function() + local path = vim.api.nvim_buf_get_name(0) + vim.system({ 'xdg-open', path:gsub('%.typ$', '.pdf') }) +end, { desc = 'typst: open pdf' }) + +vim.keymap.set('n', '<leader>o', '<cmd>OpenPdf<cr>', { desc = 'typst: open pdf', buffer = 0 }) diff --git a/.config/nvim/after/lsp/gopls.lua b/.config/nvim/after/lsp/gopls.lua new file mode 100644 index 0000000..5262a45 --- /dev/null +++ b/.config/nvim/after/lsp/gopls.lua @@ -0,0 +1,24 @@ +return { + settings = { + gopls = { + hints = { + assignVariableTypes = true, + compositeLiteralFields = true, + compositeLiteralTypes = true, + constantValues = true, + functionTypeParameters = true, + parameterNames = true, + rangeVariableTypes = true, + }, + analyses = { + -- composites = false, + nilness = true, + shadow = false, + unusedparams = true, + unusedwrite = true, + }, + gofumpt = true, + -- hoverKind = 'Structured', + }, + }, +} diff --git a/.config/nvim/after/lsp/tinymist.lua b/.config/nvim/after/lsp/tinymist.lua new file mode 100644 index 0000000..77f0c66 --- /dev/null +++ b/.config/nvim/after/lsp/tinymist.lua @@ -0,0 +1,7 @@ +return { + settings = { + exportPdf = "onSave", + -- semanticTokens = "disabled", + formatterMode = "typstyle", + } +} diff --git a/.config/nvim/after/lsp/zls.lua b/.config/nvim/after/lsp/zls.lua new file mode 100644 index 0000000..8d5ed7b --- /dev/null +++ b/.config/nvim/after/lsp/zls.lua @@ -0,0 +1,3 @@ +return { + cmd = {'zls', '--log-level', 'warn'}, +} diff --git a/.config/nvim/after/luasnippets/all.lua b/.config/nvim/after/luasnippets/all.lua new file mode 100644 index 0000000..ed0c536 --- /dev/null +++ b/.config/nvim/after/luasnippets/all.lua @@ -0,0 +1,3 @@ +return { + s({trig = 'today'}, t"today from luasnip") +} diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..ce916ce --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,14 @@ +_G.feedkeys = function(keys) + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(keys, true, false, true), 'n', true) +end + +require('config.reset') +require('config.lazy') +require('config.filetypes') +require('config.diagnostics') +require('config.keymaps') +require('config.lsp') +require('config.options') +require('config.statuscolumn') +require('config.statusline') +require('config.undo') diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..3a9f634 --- /dev/null +++ b/.config/nvim/lazy-lock.json @@ -0,0 +1,31 @@ +{ + "LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" }, + "blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" }, + "calcium.nvim": { "branch": "main", "commit": "7a7d3740083fa5669e1a0f25d133705624a23f0d" }, + "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, + "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, + "fzf-lua": { "branch": "main", "commit": "d2fa4fcebe47c49f0393363c7bb2968ba5516cef" }, + "gentoo-syntax": { "branch": "master", "commit": "1b3a81ec62e5c843245dc431be0fe072add7eca8" }, + "git-dev.nvim": { "branch": "master", "commit": "90c1395ca37a38228e287d0a843835a5a39ce553" }, + "gitgraph.nvim": { "branch": "main", "commit": "c16daa7d7dd597caf9085644c009cfa80b75db8e" }, + "gitlinker.nvim": { "branch": "master", "commit": "bbe2a1254fc8fce21f3bbf9a020266a1c49799f7" }, + "gitsigns.nvim": { "branch": "main", "commit": "1ce96a464fdbc24208e24c117e2021794259005d" }, + "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, + "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, + "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "markdown.nvim": { "branch": "master", "commit": "093be911d90de03877f3009de36081c1a6242d51" }, + "mini.ai": { "branch": "main", "commit": "9eae720f2b20f6ad28cbfa0ddc524e10dc2c3201" }, + "mini.align": { "branch": "main", "commit": "6d8a6ca3a0fd313938374abccb50cad026229db3" }, + "mini.icons": { "branch": "main", "commit": "efc85e42262cd0c9e1fdbf806c25cb0be6de115c" }, + "mini.operators": { "branch": "main", "commit": "c68010bb5498d418e056704710f71cd8d6fa227b" }, + "mini.surround": { "branch": "main", "commit": "d648a5601e1c48f175b07d10eba141da338a0a2a" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "338409dd8a6ed74767bad3eb5269f1b903ffb3cf" }, + "nvim-lspconfig": { "branch": "master", "commit": "5bfcc89fd155b4ffc02d18ab3b7d19c2d4e246a7" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-treesitter-refactor": { "branch": "master", "commit": "9cc0d22becf72e18808208cd0ce85032a2b19c6f" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" }, + "oil.nvim": { "branch": "master", "commit": "f55b25e493a7df76371cfadd0ded5004cb9cd48a" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "render-markdown": { "branch": "main", "commit": "48b4175dbca8439d30c1f52231cbe5a712c8f9d9" }, + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } +} diff --git a/.config/nvim/lua/config/diagnostics.lua b/.config/nvim/lua/config/diagnostics.lua new file mode 100644 index 0000000..6314b83 --- /dev/null +++ b/.config/nvim/lua/config/diagnostics.lua @@ -0,0 +1,65 @@ +vim.diagnostic.config({ + signs = { + text = { + [vim.diagnostic.severity.ERROR] = '', + [vim.diagnostic.severity.WARN] = '', + [vim.diagnostic.severity.INFO] = '', + [vim.diagnostic.severity.HINT] = '', + }, + linehl = { + -- [vim.diagnostic.severity.ERROR] = 'Search', + -- [vim.diagnostic.severity.WARN] = '', + -- [vim.diagnostic.severity.INFO] = '', + -- [vim.diagnostic.severity.HINT] = '', + }, + numhl = { + [vim.diagnostic.severity.ERROR] = 'DiagnosticSignError', + [vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn', + [vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo', + [vim.diagnostic.severity.HINT] = 'DiagnosticSignHint', + }, + }, + severity_sort = true, + underline = { + severity = { min = vim.diagnostic.severity.WARN }, + }, + float = false, + virtual_text = false, + virtual_lines = false, +}) + +local commonhl = { undercurl = true, force = true } +vim.api.nvim_set_hl(0, 'DiagnosticUnderlineError', commonhl) +vim.api.nvim_set_hl(0, 'DiagnosticUnderlineWarn', commonhl) +vim.api.nvim_set_hl(0, 'DiagnosticUnderlineInfo', commonhl) +vim.api.nvim_set_hl(0, 'DiagnosticUnderlineHint', commonhl) + +vim.keymap.set('n', '[d', function() + vim.diagnostic.jump({ count = 1, float = true }) +end, { desc = 'diagnostic: next' }) + +vim.keymap.set('n', ']d', function() + vim.diagnostic.jump({ count = -1, float = true }) +end, { desc = 'diagnostic: prev' }) + +vim.keymap.set('n', 'DD', vim.diagnostic.open_float, { desc = 'diagnostic: current line' }) + +vim.keymap.set('n', '<leader>d', '<nop>', { desc = "diagnostics" }) +vim.keymap.set('n', '<leader>dd', vim.diagnostic.open_float, { desc = 'diagnostic: current line' }) +vim.keymap.set('n', '<leader>dv', function() + -- NOTE: this can be used to switch between multiple sets of diagnostics display + -- currently it only toggles virtual_text + local visible = vim.diagnostic.config().virtual_text + + if visible then + -- vim.diagnostic.hide(nil, 0) + vim.diagnostic.config({ virtual_text = false }) + else + -- vim.diagnostic.show(nil, 0) + vim.diagnostic.config({ virtual_text = true }) + end +end, { desc = 'diagnostic: toggle visibility' }) + +vim.keymap.set('n', '<leader>da', function() + vim.diagnostic.enable(not vim.diagnostic.is_enabled()) +end, { desc = 'diagnostic: toggle all' }) diff --git a/.config/nvim/lua/config/filetypes.lua b/.config/nvim/lua/config/filetypes.lua new file mode 100644 index 0000000..f1428d2 --- /dev/null +++ b/.config/nvim/lua/config/filetypes.lua @@ -0,0 +1,5 @@ +vim.filetype.add({ + pattern = { + ['todo.txt'] = 'todotxt', + } +}) diff --git a/.config/nvim/lua/config/keymaps.lua b/.config/nvim/lua/config/keymaps.lua new file mode 100644 index 0000000..9c00f7b --- /dev/null +++ b/.config/nvim/lua/config/keymaps.lua @@ -0,0 +1,36 @@ +local map = vim.keymap.set + +map('n', 'gb', '<cmd>bnext<cr>', { desc = 'Buffer next' }) +map('n', 'gB', '<cmd>bprevious<cr>', { desc = 'Buffer prev' }) + +map('n', '<a-j>', '<cmd>cnext<cr>', { desc = 'Quickfix next' }) +map('n', '<a-k>', '<cmd>cprev<cr>', { desc = 'Quickfix prev' }) + +map('v', '<', '<gv', { desc = 'Indent' }) +map('v', '>', '>gv', { desc = 'Outdent' }) + +map('t', '<esc>', [[ <c-\><c-n> ]], { desc = 'Terminal: Exit INSERT mode' }) + +map( + 'n', + 'gx', + '<cmd>lua vim.ui.open(vim.fn.expand("<cfile>"))<cr>', + { desc = 'Open file under cursor' } +) + +vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, { + group = vim.api.nvim_create_augroup('bufclose', {}), + callback = function() + if vim.list_contains({'help', 'nofile', 'quickfix'}, vim.bo.buftype) then + map('', 'q', '<cmd>close<cr>', { desc = 'Close buffer', buffer = 0 }) + end + end, +}) + +map('n', '<leader><leader>x', function() + local file = vim.fn.expand('%') + vim.cmd.source(file) + vim.notify('** sourced ' .. file, vim.log.levels.INFO) +end, { desc = 'source current file' }) + +map('n', '<leader>a', '<cmd>edit #<cr>', { desc = 'open alternative file' }) diff --git a/.config/nvim/lua/config/lazy.lua b/.config/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..5f859f0 --- /dev/null +++ b/.config/nvim/lua/config/lazy.lua @@ -0,0 +1,63 @@ +local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = 'https://github.com/folke/lazy.nvim.git' + local out = vim.fn.system({'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath}) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + {'Failed to clone lazy.nvim:\n', 'ErrorMsg'}, + {out, 'WarningMsg'}, + {'\nPress any key to exit...'}, + }, true, {}) + vi.fn.getchar() -- let user ack + os.exit(1) + end +end + +vim.opt.rtp:prepend(lazypath) + +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" + +require('lazy').setup({ + -- load plugin specs from ./plugins + spec = { { import = 'plugins' } }, + -- colorscheme for installing plugins + install = { colorscheme = { 'default' } }, + -- automatically check for plugin updates + checker = { + enabled = true, + frequency = (3600 * 24 * 3), -- 3 days + }, +}) + +vim.keymap.set({'n'}, '<leader>l', '<nop>', { desc = 'lazy' }) +vim.keymap.set({'n'}, '<leader>lz', '<cmd>Lazy<cr>', { desc = 'lazy: open ui' }) +vim.keymap.set({'n'}, '<leader>ln', function() + local pname = 'TODO' + local ppath = vim.fn.stdpath('config') .. '/lua/plugins' + + vim.ui.input({ prompt = 'Plugin name: ' }, function(input) + pname = input + end) + + vim.cmd.cd(ppath) + + vim.fn.setreg('a', [[return { + { + '$name', + cmd = {'$cmd'}, + opts = {$opts}, + keys = { + { mode = {'n'}, '$lhs', '$rhs', desc = '$desc' }, + }, + } +}]]) + + local buf = vim.api.nvim_create_buf(true, false) + vim.api.nvim_buf_set_name(buf, pname .. '.lua') + vim.api.nvim_set_option_value('filetype', 'lua', { buf = buf }) + vim.api.nvim_win_set_buf(0, buf) + + require('luasnip.extras.otf').on_the_fly('a') + +end, { desc = 'lazy: new plugin' }) diff --git a/.config/nvim/lua/config/lsp.lua b/.config/nvim/lua/config/lsp.lua new file mode 100644 index 0000000..282a3dc --- /dev/null +++ b/.config/nvim/lua/config/lsp.lua @@ -0,0 +1,66 @@ +if not vim.lsp.enable then return end + +local lsp = vim.lsp + +lsp.enable({ + 'bashls', + 'ccls', + 'clangd', + 'gopls', + 'rust_analyzer', + 'superhtml', + 'tinymist', + 'zk', + 'zls', +}) + +local capabilities = nil +if pcall(require, 'blink.cmp') then + capabilities = require('blink.cmp').get_lsp_capabilities() +end + +lsp.config('*', { + root_markers = {'.git'}, + capabilities = capabilities +}) + +vim.api.nvim_create_autocmd({'LspAttach'}, { + group = vim.api.nvim_create_augroup('lspattach', {}), + callback = function(args) + local client = assert(vim.lsp.get_client_by_id(args.data.client_id)) + + -- TODO: what does this do? + vim.opt_local.omnifunc = 'v:lua.vim.lsp.omnifunc' + + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { desc = 'goto_definition' }) + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, { desc = 'goto declaration' }) + vim.keymap.set('n', 'gT', vim.lsp.buf.type_definition, { desc = 'goto type definition' }) + vim.keymap.set('n', 'gR', vim.lsp.buf.references, { desc = 'show references' }) + vim.keymap.set('n', 'ga', vim.lsp.buf.code_action, { desc = 'show code actions' }) + vim.keymap.set('n', 'grr', vim.lsp.buf.rename, { desc = 'rename' }) + + if client:supports_method('textDocument/implementation') then + vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, { desc = 'goto implementation' }) + end + + if client:supports_method('textDocument/completion') then + vim.lsp.completion.enable(true, client.id, args.buf, {autotrigger = false}) + end + + if client:supports_method('textDocument/formatting') then + vim.keymap.set('n', '<leader>f', vim.lsp.buf.format, { desc = 'format' }) + end + + if not client:supports_method('textDocument/willSaveWaitUntil') + and client:supports_method('textDocument/formatting') then + vim.api.nvim_create_autocmd({'BufWritePre'}, { + group = vim.api.nvim_create_augroup('lspattach', {}), + buffer = args.buf, + callback = function() + if vim.b.nofmt then return end + vim.lsp.buf.format({ bufnr = args.buf, id = client.id, timeout_ms = 1000 }) + end, + }) + end + end, +}) diff --git a/.config/nvim/lua/config/options.lua b/.config/nvim/lua/config/options.lua new file mode 100644 index 0000000..073835f --- /dev/null +++ b/.config/nvim/lua/config/options.lua @@ -0,0 +1,39 @@ +local opt = vim.opt + +opt.number = true +opt.cursorline = true + +-- connect system clipboard +opt.clipboard:prepend({ 'unnamedplus' }) + +-- preview supported ops in split buffer +opt.inccommand = 'split' + +-- show whitespace indicators +opt.list = true +opt.listchars:append({ + trail = '¬', + tab = '> ', + -- space = '·', + -- lead = '·', +}) +opt.showbreak = '↪ ' + +-- show indicator and wrap text at 80 chars +opt.colorcolumn = '+1' +opt.textwidth = 80 +opt.wrap = true + +opt.conceallevel = 2 +opt.concealcursor = nil + +-- use treesitter to determine folds +opt.foldmethod = 'expr' +opt.foldexpr = 'v:lua.vim.treesitter.foldexpr()' +opt.foldlevel = 99 + +-- https://fosstodon.org/@rockorager/114183888444195197 +opt.mousescroll = 'ver:1,hor:6' + +-- load local vim config (will as to allow it) +opt.exrc = true diff --git a/.config/nvim/lua/config/reset.lua b/.config/nvim/lua/config/reset.lua new file mode 100644 index 0000000..4908c20 --- /dev/null +++ b/.config/nvim/lua/config/reset.lua @@ -0,0 +1,17 @@ +vim.g.loaded_gzip = 1 +vim.g.loaded_tar = 1 +vim.g.loaded_tarPlugin = 1 +vim.g.loaded_zip = 1 +vim.g.loaded_zipPlugin = 1 +vim.g.loaded_getscript = 1 +vim.g.loaded_getscriptPlugin = 1 +vim.g.loaded_vimball = 1 +vim.g.loaded_vimballPlugin = 1 +vim.g.loaded_matchit = 1 +vim.g.loaded_2html_plugin = 1 +vim.g.loaded_logiPat = 1 +vim.g.loaded_rrhelper = 1 +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 +vim.g.loaded_netrwSettings = 1 +vim.g.loaded_netrwFileHandlers = 1 diff --git a/.config/nvim/lua/config/snippets.lua b/.config/nvim/lua/config/snippets.lua new file mode 100644 index 0000000..e0c260e --- /dev/null +++ b/.config/nvim/lua/config/snippets.lua @@ -0,0 +1,140 @@ +local ls = require('luasnip') +local types = require('luasnip.util.types') + +-- configure luasnip +ls.config.set_config({ + enable_autosnippets = true, + history = true, + updateevents = 'TextChanged,TextChangedI', + override_builtin = true, + ext_opts = { + [types.choiceNode] = { + active = { + virt_text = { { '◂ ', 'NonText' } }, + }, + }, + [types.insertNode] = { + active = { + virt_text = { { '◂ ', 'NonText' } }, + }, + }, + }, + snip_env = vim.tbl_deep_extend('error', ls.session.config.snip_env, { + -- snippet helpers + nl = function() + return ls.t({ '', '' }) + end, + exec = function(command) + return ls.f(function(_, _, ...) + local job = require('plenary.job'):new({ + command = vim.env.SHELL, + args = { '-c', ... }, + enable_recording = true, + }) + local res, exitcode = job:sync() + if not exitcode == 0 or #res == 0 then + error(string.format('exec "%s" failed', ...)) + end + return res + end, {}, { user_args = { command } }) + end, + -- condition helpers + cond = { + ts = function(capture) + return function() + return vim.tbl_contains(vim.treesitter.get_captures_at_cursor(), capture) + end + end, + }, + }), +}) + +-- snippet loaders +require('luasnip.loaders.from_lua').lazy_load() +require('luasnip.loaders.from_vscode').lazy_load({ include = {} }) + +-- keymaps +vim.keymap.set({ 'i', 's' }, '<c-j>', function() + return vim.snippet.active({ direction = 1 }) and vim.snippet.jump(1) +end, { silent = true, desc = 'snippet: jump next' }) + +vim.keymap.set({ 'i', 's' }, '<c-k>', function() + return vim.snippet.active({ direction = -1 }) and vim.snippet.jump(-1) +end, { silent = true, desc = 'snippet: jump prev' }) + +vim.keymap.set({ 'i', 's' }, '<c-n>', function() + if ls.choice_active() then + ls.change_choice(1) + end +end, { silent = true, desc = 'snippet: next choice' }) + +vim.keymap.set({ 'i', 's' }, '<c-p>', function() + if ls.choice_active() then + ls.change_choice(-1) + end +end, { silent = true, desc = 'snippet: prev choice' }) + +-- usercmds +vim.api.nvim_create_user_command('EditSnippets', require('luasnip.loaders').edit_snippet_files, {}) + +-- autocmds +-- vim.api.nvim_create_autocmd('User', { +-- pattern = 'LuasnipChoiceNodeEnter', +-- callback = function() +-- vim.schedule(function() +-- assert(ls.session.active_choice_nodes[vim.api.nvim_get_current_buf()], 'No active choiceNode') +-- vim.ui.select( +-- ls.get_current_choices(), +-- -- TODO: patch luasnip.extras.select_choice to fix missing prompt +-- { prompt = 'LuaSnip: choice node', kind = 'luasnip' }, +-- function(_, idx) +-- if not idx then +-- return +-- end +-- -- feed+immediately execute i to enter INSERT after vim.ui.input closes. +-- vim.api.nvim_feedkeys('i', 'x', false) +-- ls.set_choice(idx) +-- ls.unlink_current() +-- end +-- ) +-- end) +-- end, +-- }) + +-- unlink luasnip session on <esc> +vim.api.nvim_create_autocmd('ModeChanged', { + pattern = '*', + callback = function() + if ((vim.v.event.old_mode == 's' and vim.v.event.new_mode == 'n') or vim.v.event.old_mode == 'i') + and ls.session.current_nodes[vim.api.nvim_get_current_buf()] + and not ls.session.jump_active + and not require("blink.cmp").is_visible() + then + ls.unlink_current() + end + end +}) + +-- attach to builtin snippet hooks +vim.snippet.expand = ls.lsp_expand +vim.snippet.active = function(filter) + filter = filter or {} + filter.direction = filter.direction or 1 + if filter.direction == 1 then + return ls.expand_or_jumpable() + else + return ls.jumpable(filter.direction) + end +end +vim.snippet.jump = function(direction) + if direction == 1 then + if ls.expandable() then + return ls.expand_or_jump() + else + return ls.jumpable(1) and ls.jump(1) + end + else + return ls.jumpable(-1) and ls.jump(-1) + end +end +vim.snippet.stop = ls.unlink_current diff --git a/.config/nvim/lua/config/statuscolumn.lua b/.config/nvim/lua/config/statuscolumn.lua new file mode 100644 index 0000000..06e8988 --- /dev/null +++ b/.config/nvim/lua/config/statuscolumn.lua @@ -0,0 +1,11 @@ +function _G.statuscolumn() + local sc = '' + + sc = sc .. [[%l%r%s%C]] + + sc = sc .. '│' + + return sc +end + +-- vim.opt.statuscolumn = '%{%v:lua.statuscolumn()%}' diff --git a/.config/nvim/lua/config/statusline.lua b/.config/nvim/lua/config/statusline.lua new file mode 100644 index 0000000..fed6d33 --- /dev/null +++ b/.config/nvim/lua/config/statusline.lua @@ -0,0 +1,152 @@ +function _G.statusline() + local bufnr = vim.fn.bufnr() or 0 + local hi = statusline_color(vim.fn.mode()) + + local sl = hi + -- sl = sl .. statusline_append([[ ⢷]], 'StatusLineIcon', hi) + + sl = sl .. [[%-h%-w%-q%-f %-m%-r]] + + sl = sl .. statusline_append(statusline_git(bufnr, hi), 'StatusLineGit', hi) + + sl = sl .. statusline_append(statusline_grapple(bufnr, hi), 'StatusLineGrapple', hi) + + sl = sl .. [[ %= ]] -- spacer + + sl = sl .. statusline_append(statusline_lsp_diagnostics(bufnr, hi), 'StatusLineDiagnostics', hi) + + sl = sl .. statusline_append(statusline_dap(bufnr, hi), 'StatusLineDap', hi) + + -- sl = sl .. [[ %= ]] -- spacer + + sl = sl .. statusline_append(statusline_spinner(bufnr, hi), 'StatusLineJobs', hi) + + sl = sl .. [[%-l:%-v --%p%%-- %-Y]] + + return sl +end + +function _G.statusline_color(mode) + local hi = '%*' + if mode == 'i' then + -- hi = '%#StatusLineInsert#' + elseif mode == 'c' then + -- hi = '%#StatusLineCommand#' + elseif mode == 'v' or mode == 'V' or mode == '' then + hi = '%#StatusLineVisual#' + elseif mode == 'R' or mode == 'Rv' then + hi = '%#StatusLineReplace#' + end + -- return '%{g:actual_curwin==win_getid()?'.. hi ..':%#StatusLineNC#}' + return hi +end + +-- does item highlighting and conditionnal spacing +function _G.statusline_append(element, hi, default_hi, opts) + if not element or element == '' then + return '' + end + opts = opts or { append_space = true } + + if hi ~= nil then + hi = '%#' .. hi .. '#' + end + if not (default_hi == '%*') then + hi = default_hi + end + local el = hi .. element .. default_hi + if opts.append_space then + el = el .. ' ' + end + return el +end + +function _G.statusline_combine_hi(outer_name, inner_name) + local outer = vim.api.nvim_get_hl(0, { name = outer_name, create = false }) + local inner = vim.api.nvim_get_hl(0, { name = inner_name, create = false }) + -- try to find a predefined hl + local name = (outer_name .. inner_name) + if vim.api.nvim_get_hl(0, { name = name, create = false }) then + return name + end + -- generate one new one automatically + name = ('autohi_' .. outer_name .. inner_name) + vim.api.nvim_get_hl(0, { name = name, create = true }) + local hi = vim.tbl_extend('force', inner, { bg = inner.fg }, { fg = outer.bg }) + vim.api.nvim_set_hl(0, name, hi) + return name +end + +function _G.statusline_lsp_diagnostics(bufnr, default_hi) + local signs = vim.diagnostic.config().signs.text or {} + local error_num = vim.diagnostic.get(bufnr, { severity = vim.diagnostic.severity.ERROR }) + local warn_num = vim.diagnostic.get(bufnr, { severity = vim.diagnostic.severity.WARN }) + + local s = '' + if #error_num > 0 then + local errs = signs[vim.diagnostic.severity.ERROR] .. ' ' .. #error_num + s = s + .. statusline_append(errs, statusline_combine_hi('StatusLine', 'DiagnosticError'), default_hi) + end + if #warn_num > 0 then + local warns = signs[vim.diagnostic.severity.WARN] .. ' ' .. #warn_num + s = s + .. statusline_append(warns, statusline_combine_hi('StatusLine', 'DiagnosticWarn'), default_hi) + end + return vim.trim(s) +end + +function _G.statusline_git(_, hi) + if vim.b.gitsigns_status and vim.b.gitsigns_status ~= '' then + return statusline_append('[' .. vim.b.gitsigns_status .. ']', 'StatusLineGitChanges', hi) + end +end + +function _G.statusline_grapple(_, _) + local g = package.loaded.grapple + if not g then + return '' + end + return g.statusline() + -- if not g or not g.exists({ buffer = bufnr }) then + -- return '' + -- end + -- return '➥ ' .. g.key({ buffer = bufnr }) +end + +function _G.statusline_spinner(bufnr, _) + local sp = package.loaded.spinner + if not sp then + return '' + end + return sp.status(bufnr) +end + +function _G.statusline_dap(_, _) + local dap = package.loaded.dap + if not dap then + return '' + end + local s = dap.status() + if s == '' then + return s + end + return '[DAP: ' .. s .. ']' +end + +local hi = function(name, opts) + vim.api.nvim_set_hl(0, name, opts) +end + +local statusline = vim.api.nvim_get_hl(0, { name = 'StatusLine', create = false }) +hi('StatusLineDiagnosticError', { fg = 'NvimDarkRed', bg = statusline.bg, bold = true }) +hi('StatusLineDiagnosticWarn', { fg = 'NvimDarkYellow', bg = statusline.bg, bold = true }) + +vim.opt.statusline = '%{%v:lua.statusline()%}' + +-- WINBAR -- +-- vim.opt.winbar = [[%h%w%q%f %-m %-r %= %#WinBarCwd#%{%getcwd()%}%*]] -- keep it simple +-- function _G.winbar() +-- return [[%<%F %-m %-r]] +-- end +-- vim.opt.winbar = '%{%v:lua.winbar()%}' diff --git a/.config/nvim/lua/config/undo.lua b/.config/nvim/lua/config/undo.lua new file mode 100644 index 0000000..aed6195 --- /dev/null +++ b/.config/nvim/lua/config/undo.lua @@ -0,0 +1,10 @@ +-- persistent undo + +local undodir = vim.fn.stdpath('cache') .. '/undodir' + +if vim.fn.isdirectory(undodir) == 0 then + vim.fn.mkdir(undodir, 'p', '0700') +end + +vim.g.undodir = undodir +vim.opt.undofile = true diff --git a/.config/nvim/lua/plugins/blink.lua b/.config/nvim/lua/plugins/blink.lua new file mode 100644 index 0000000..1122bcc --- /dev/null +++ b/.config/nvim/lua/plugins/blink.lua @@ -0,0 +1,94 @@ +return { + { + 'saghen/blink.cmp', + version = '1.*', + + lazy = false, + + dependencies = { + { 'L3MON4D3/LuaSnip' }, + }, + + init = function() + vim.opt.completeopt = { 'menu', 'menuone', 'noselect' } + vim.opt.shortmess:append('c') + vim.opt.pumheight = 20 -- max height of completion window + + local hl = vim.api.nvim_set_hl + hl(0, 'BlinkCmpSource', { link = 'Comment', force = true }) + hl(0, 'BlinkCmpLabelDescription', { link = 'Comment', force = true }) + end, + + opts_extend = { 'sources.default' }, + + opts = { + -- TODO: + -- 'prefer_rust_with_warning', requires nightly rust, due to: + -- https://github.com/rust-lang/rust/issues/86656 + fuzzy = { + implementation = 'lua', + sorts = { + function(a, b) + local prio = { + snippets = 99, + -- everyting else 0 + } + local a_priority = prio[a.source_id] or 0 + local b_priority = prio[b.source_id] or 0 + if a_priority ~= b_priority then return a_priority > b_priority end + end, + -- defaults + 'score', + 'sort_text' + }, + }, + + appearance = { + -- fallback to cmp highlight names + use_nvim_cmp_as_default = true, + -- adjusts spacing to ensure icons are aligned + -- nerd_font_variant = 'normal', + }, + + sources = { + providers = { + buffer = { min_keyword_length = 3 }, + }, + }, + + completion = { + documentation = { auto_show = true }, + menu = { + draw = { + columns = { + { 'kind_icon' }, + { 'label', 'label_description', gap = 1 }, + { 'source_name' }, + }, + }, + }, + }, + + signature = { + enabled = true, + window = { scrollbar = false }, -- BUG: weird artifacts + }, + + keymap = { + ['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' }, + ['<C-e>'] = { 'cancel', 'fallback' }, + ['<C-y>'] = { 'select_and_accept' }, + ['<C-p>'] = { 'select_prev', 'fallback' }, + ['<C-n>'] = { 'select_next', 'fallback' }, + ['<C-b>'] = { 'scroll_documentation_up', 'fallback' }, + ['<C-f>'] = { 'scroll_documentation_down', 'fallback' }, + ['<Tab>'] = { 'select_and_accept', 'fallback' }, + ['<C-j>'] = { 'snippet_forward', 'fallback' }, + ['<C-k>'] = { 'snippet_backward', 'fallback' }, + -- ['<C-l>'] = { 'show', 'hide', 'fallback' }, + }, + + snippets = { preset = 'luasnip' }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/calcium.lua b/.config/nvim/lua/plugins/calcium.lua new file mode 100644 index 0000000..f0ab78c --- /dev/null +++ b/.config/nvim/lua/plugins/calcium.lua @@ -0,0 +1,15 @@ +return { + { + 'necrom4/calcium.nvim', + cmd = {'Calcium'}, + opts = { + notifications = false, + default_mode = 'replace', + }, + keys = { + { mode = {'n', 'v'}, 'gl', '<nop>', desc = 'Calcium' }, + { mode = {'n', 'v'}, 'glr', ':Calcium replace<cr>', desc = 'Calcium replace', silent = true }, + { mode = {'n', 'v'}, 'gla', ':Calcium append<cr>', desc = 'Calcium append', silent = true }, + }, + } +} diff --git a/.config/nvim/lua/plugins/colorizer.lua b/.config/nvim/lua/plugins/colorizer.lua new file mode 100644 index 0000000..2608ae6 --- /dev/null +++ b/.config/nvim/lua/plugins/colorizer.lua @@ -0,0 +1,15 @@ +return { + { + 'NvChad/nvim-colorizer.lua', + -- 'norcalli/nvim-colorizer.lua', + lazy = false, + opts = { + name = true, + RRGGBB = true, + RRGGBBAA = true, + rgb_fn = true, + hsl_fn = true, + mode = 'background', + }, + }, +} diff --git a/.config/nvim/lua/plugins/fzf.lua b/.config/nvim/lua/plugins/fzf.lua new file mode 100644 index 0000000..efee6ef --- /dev/null +++ b/.config/nvim/lua/plugins/fzf.lua @@ -0,0 +1,103 @@ +return { + { + enabled = true, + 'ibhagwan/fzf-lua', + lazy = false, + dependencies = { + 'echasnovski/mini.icons', + }, + config = function() + local fzf = require('fzf-lua') + fzf.register_ui_select() + fzf.setup({ + -- PROFILE + { 'default' }, + -- OPTIONS + winopts = { + split = 'belowright 20new', + border = 'none', + preview = { + border = 'none', + }, + -- on_create = function() end, + }, + keymap = { + fzf = { + true, + ['ctrl-n'] = 'down', + ['ctrl-p'] = 'up', + }, + }, + -- actions = { + -- files = { + -- ['ctrl-q'] = { fn = fzf.actions.file_sel_to_qf }, + -- }, + -- }, + fzf_colors = true, + -- PICKER CONFIG + files = { + file_icons = true, + }, + marks = { + marks = '[a-zA-Z]', + } + }) + end, + keys = { + { mode = 'n', ';<space>', '<cmd>FzfLua<cr>', desc = 'fzf: select' }, + { mode = 'n', ';/', '<cmd>FzfLua blines<cr>', desc = 'fzf: current_buffer_fuzzy_find' }, + { mode = 'n', ';b', '<cmd>FzfLua buffers<cr>', desc = 'fzf: buffers' }, + { mode = 'n', ';f', '<cmd>FzfLua files<cr>', desc = 'fzf: find_files' }, + { mode = 'n', ';g', '<cmd>FzfLua live_grep<cr>', desc = 'fzf: live_grep' }, + { mode = 'n', ';d', '<cmd>FzfLua diagnostics_workspace<cr>', desc = 'fzf: workspace diagnostics' }, + { mode = 'n', ';D', '<cmd>FzfLua diagnostics_document<cr>', desc = 'fzf: document diagnostics' }, + { mode = 'n', ';h', '<cmd>FzfLua helptags<cr>', desc = 'fzf: help' }, + { mode = 'n', ';s', '<cmd>FzfLua lsp_document_symbols<cr>', desc = 'fzf: document symbols' }, + { mode = 'n', ';w', '<cmd>FzfLua lsp_live_workspace_symbols<cr>', desc = 'fzf: workspace symbols' }, + { mode = 'n', ';m', '<cmd>FzfLua marks<cr>', desc = 'fzf: marks' }, + { + mode = 'n', + ';v', + function() + require('fzf-lua').files({ cwd = vim.fn.stdpath('config') }) + end, + desc = 'fzf: vim_config', + }, + -- { + -- mode = 'n', + -- ';;t', + -- '<cmd>Telescope<cr>', + -- desc = 'telescope: select (interactive)', + -- }, + { + mode = 'n', + ';;f', + function() + local dir + if vim.opt.filetype:get() == 'oil' then + dir = require('oil').get_current_dir() + else + dir = vim.fn.expand('%:p:h') + end + -- require('fzf-lua').files({ cwd = dir }) + _G.feedkeys(':Fzf files cwd=' .. dir) + end, + desc = 'fzf: files (interactive)', + }, + { + mode = 'n', + ';;g', + function() + local dir + if vim.opt.filetype:get() == 'oil' then + dir = require('oil').get_current_dir() + else + dir = vim.fn.expand('%:p:h') + end + _G.feedkeys(':Fzf live_grep cwd=' .. dir) + end, + desc = 'fzf: grep (interactive)', + }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/gentoo.lua b/.config/nvim/lua/plugins/gentoo.lua new file mode 100644 index 0000000..470e6de --- /dev/null +++ b/.config/nvim/lua/plugins/gentoo.lua @@ -0,0 +1,15 @@ +return { + { + 'gentoo/gentoo-syntax', + -- ft = { 'ebuild' }, + -- init = function() + -- vim.api.nvim_create_autocmd('LspAttach', { + -- callback = function(args) + -- if vim.opt.filetype == 'ebuild' then + -- vim.lsp.stop_client(vim.lsp.get_clients({ bufnr = args.bufnr })) + -- end + -- end, + -- }) + -- end, + }, +} diff --git a/.config/nvim/lua/plugins/git.lua b/.config/nvim/lua/plugins/git.lua new file mode 100644 index 0000000..2561ad9 --- /dev/null +++ b/.config/nvim/lua/plugins/git.lua @@ -0,0 +1,116 @@ +return { + { + 'lewis6991/gitsigns.nvim', + lazy = false, + opts = { + debug_mode = false, + }, + keys = { + { + ']c', + function() + if vim.wo.diff then + vim.cmd.normal({ ']c', bang = true }) + else + require('gitsigns').nav_hunk('next') + end + end, + desc = 'Gitsigns: next hunk', + }, + { + '[c', + function() + if vim.wo.diff then + vim.cmd.normal({ '[c', bang = true }) + else + require('gitsigns').nav_hunk('prev') + end + end, + desc = 'Gitsigns: prev hunk', + }, + { '<leader>g', '<nop>', desc = 'git' }, + { '<leader>g<space>', '<cmd>Gitsigns<cr>', desc = 'Gitsigns: select action' }, + { '<leader>gb', '<cmd>Gitsigns blame<cr>', desc = 'Gitsigns: blame' }, + { '<leader>ga', '<cmd>Gitsigns stage_hunk<cr>', desc = 'Gitsigns: stage hunk' }, + { '<leader>ga', ':Gitsigns stage_hunk<cr>', desc = 'Gitsigns: stage hunk', mode = 'x' }, + { '<leader>gd', ':Gitsigns diffthis<cr>', desc = 'Gitsigns: diff' }, + { + ';c', + function() + require('gitsigns').setqflist('all', { open = false }) + require('fzf-lua').quickfix({ prompt = 'Git changesets' }) + end, + desc = 'Gitsigns: list hunks', + }, + }, + }, + + { + 'linrongbin16/gitlinker.nvim', + cmd = { 'GitLink' }, + dependencies = { 'nvim-lua/plenary.nvim' }, + opts = { + message = true, + }, + keys = { + { + '<leader>gl', + vim.cmd.GitLink, + desc = 'GitLinker: clipboard', + }, + }, + }, + + { + 'moyiz/git-dev.nvim', + lazy = true, + cmd = { 'GitDevOpen', 'GitDevCleanAll' }, + opts = { + read_only = false, + }, + }, + + { + 'isakbm/gitgraph.nvim', + dependencies = { 'sindrets/diffview.nvim' }, + opts = { + symbols = { + merge_commit = 'M', + commit = '∙', + }, + format = { + timestamp = '%d-%m-%Y %H:%M:%S %z', + fields = { 'hash', 'timestamp', 'author', 'branch_name', 'tag' }, + }, + }, + init = vim.schedule_wrap(function() + vim.api.nvim_set_hl(0, 'GitGraphBranch1', { fg = 'NvimLightGray1' }) + vim.api.nvim_set_hl(0, 'GitGraphBranch2', { fg = 'NvimLightMagenta' }) + vim.api.nvim_set_hl(0, 'GitGraphBranch3', { fg = 'NvimLightRed' }) + vim.api.nvim_set_hl(0, 'GitGraphBranch4', { fg = 'NvimDarkCyan' }) + vim.api.nvim_set_hl(0, 'GitGraphBranch5', { fg = 'NvimDarkYellow' }) + vim.api.nvim_set_hl(0, 'GitGraphHash', { fg = 'NvimLightMagenta' }) + vim.api.nvim_set_hl(0, 'GitGraphAuthor', { fg = 'NvimLightGray4', italic = true }) + vim.api.nvim_set_hl(0, 'GitGraphTimestamp', { fg = 'NvimLightCyan' }) + vim.api.nvim_set_hl(0, 'GitGraphBranchName', { fg = 'NvimLightYellow' }) + vim.api.nvim_set_hl(0, 'GitGraphBranchTag', { fg = 'NvimLightYellow' }) + vim.api.nvim_set_hl(0, 'GitGraphBranchMsg', { link = 'Normal' }) + -- vim.api.nvim_create_autocmd('FileType', { + -- pattern = { 'gitgraph' }, + -- callback = function() + -- vim.keymap.set('n', 'q', '<cmd>bdel!<cr>', { silent = true, buffer = 0 }) + -- end, + -- group = vim.api.nvim_create_augroup('GitGraph'), + -- }) + end), + keys = { + { + 'g-', + function() + require('gitgraph').draw({}, { all = true, max_count = 5000 }) + end, + desc = 'GitGraph: view log', + }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/icons.lua b/.config/nvim/lua/plugins/icons.lua new file mode 100644 index 0000000..9a597ab --- /dev/null +++ b/.config/nvim/lua/plugins/icons.lua @@ -0,0 +1,13 @@ +return { + { + 'echasnovski/mini.icons', + version = false, + events = { 'VeryLazy' }, + -- opts = {}, + config = function(_, opts) + require('mini.icons').setup(opts) + ---@diagnostic disable-next-line: undefined-global + MiniIcons.mock_nvim_web_devicons() + end, + }, +} diff --git a/.config/nvim/lua/plugins/indent.lua b/.config/nvim/lua/plugins/indent.lua new file mode 100644 index 0000000..e247c5a --- /dev/null +++ b/.config/nvim/lua/plugins/indent.lua @@ -0,0 +1,30 @@ +return { + -- show indents using virtual text + { + 'lukas-reineke/indent-blankline.nvim', + lazy = false, + main = 'ibl', + opts = { + indent = { + char = '▏', + }, + scope = { + enabled = true, + show_start = false, + show_end = false, + char = '▌', + }, + }, + }, + -- detect indent from the buffer contents + { + enabled = false, + 'NMAC427/guess-indent.nvim', + lazy = false, + opts = { + auto_cmd = true, + filetype_exclude = { 'netrw', 'tutor', 'dirbuf', 'nvimtree', 'oil' }, + buftype_exclude = { 'help', 'nofile', 'terminal', 'prompt' }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua new file mode 100644 index 0000000..aebf3c4 --- /dev/null +++ b/.config/nvim/lua/plugins/lsp.lua @@ -0,0 +1,6 @@ +return { + { + 'neovim/nvim-lspconfig', + version = '^2.0', + } +} diff --git a/.config/nvim/lua/plugins/markdown.lua b/.config/nvim/lua/plugins/markdown.lua new file mode 100644 index 0000000..b21255e --- /dev/null +++ b/.config/nvim/lua/plugins/markdown.lua @@ -0,0 +1,82 @@ +return { + { + -- handy markdown commands + 'tadmccorkle/markdown.nvim', + ft = { 'markdown' }, + opts = { + mappings = false, + on_attach = function(buf) + local set = function(mode, lhs, rhs, desc) + vim.keymap.set(mode, lhs, rhs, { buffer = buf, desc = 'Markdown: ' .. desc }) + end + set('n', 'nio', '<cmd>MDListItemBelow<cr>', 'Insert list item below') + set('n', 'niO', '<cmd>MDListItemAbove<cr>', 'Insert list item above') + set({ 'n', 'v', 'x', 'i' }, '<m-x>', '<cmd>MDTaskToggle<cr>', 'Toggle task') + set('x', '<m-l>', '<esc>gv<plug>(markdown_add_link_visual)', 'Make link') + end, + }, + }, + { + -- pretty markdown + 'MeanderingProgrammer/markdown.nvim', + name = 'render-markdown', -- needed if used together with markdown.nvim above + main = 'render-markdown', + dependencies = { + 'nvim-treesitter/nvim-treesitter', + 'echasnovski/mini.icons', + }, + ft = { 'markdown' }, + opts = { + completions = { blink = { enabled = true } }, + sign = { enabled = true }, + indent = { enabled = false }, + heading = { + width = 'block', + icons = { + '▒ ', + '▒▒ ', + '▒▒▒ ', + '▒▒▒▒ ', + '▒▒▒▒▒ ', + '▒▒▒▒▒▒ ', + }, + signs = { 'ⅰ', 'ⅱ', 'ⅲ', 'ⅳ', 'ⅴ', 'ⅵ' }, + backgrounds = {}, + foregrounds = {}, + }, + bullet = { + icons = { '* ', '-', '>' }, + }, + checkbox = { + checked = { icon = ' ' }, + unchecked = { icon = ' ' }, + custom = { + todo = { raw = '[-]', rendered = ' ', highlight = 'RenderMarkdownTodo' }, + }, + }, + code = { + width = 'block', + border = 'thin', + disable_background = true, + }, + }, + init = vim.schedule_wrap(function() + local hl = vim.api.nvim_set_hl + hl(0, '@markup.bold', { link = 'markdownBold', force = true }) + hl(0, '@markup.italic', { link = 'markdownItalic', force = true }) + + -- hl(0, 'RenderMarkdownH1', { fg = 'NvimLightCyan' }) + -- hl(0, 'RenderMarkdownH1Bg', { bg = 'NvimDarkCyan' }) + -- hl(0, 'RenderMarkdownH2', { fg = 'NvimLightMagenta' }) + -- hl(0, 'RenderMarkdownH2Bg', { bg = 'NvimDarkMagenta' }) + -- hl(0, 'RenderMarkdownH3', { fg = 'NvimLightYellow' }) + -- hl(0, 'RenderMarkdownH3Bg', { bg = 'NvimDarkYellow' }) + -- hl(0, 'RenderMarkdownH4', { fg = 'NvimLightBlue' }) + -- hl(0, 'RenderMarkdownH4Bg', { bg = 'NvimDarkBlue' }) + -- hl(0, 'RenderMarkdownH5', { fg = 'NvimLightRed' }) + -- hl(0, 'RenderMarkdownH5Bg', { bg = 'NvimDarkRed' }) + + hl(0, 'RenderMarkdownBullet', { link = '@markup.list', force = true }) + end), + }, +} diff --git a/.config/nvim/lua/plugins/mini.lua b/.config/nvim/lua/plugins/mini.lua new file mode 100644 index 0000000..fb4c9a6 --- /dev/null +++ b/.config/nvim/lua/plugins/mini.lua @@ -0,0 +1,26 @@ +return { + { + 'echasnovski/mini.align', + version = false, + lazy = false, + opts = {}, + }, + { + 'echasnovski/mini.ai', + version = false, + lazy = false, + opts = {}, + }, + { + 'echasnovski/mini.surround', + version = false, + lazy = false, + opts = {}, + }, + { + 'echasnovski/mini.operators', + version = false, + lazy = false, + opts = {}, + }, +} diff --git a/.config/nvim/lua/plugins/oil.lua b/.config/nvim/lua/plugins/oil.lua new file mode 100644 index 0000000..401fe8b --- /dev/null +++ b/.config/nvim/lua/plugins/oil.lua @@ -0,0 +1,21 @@ +return { + { + 'stevearc/oil.nvim', + lazy = false, + opts = { + keymaps = { + ['gt'] = { + function() + local cwd = require('oil').get_current_dir() + vim.cmd('silent !footclient --no-wait -D ' .. cwd) + end, + nowait = true, + desc = 'Open current directory with foot', + }, + }, + }, + keys = { + { mode = 'n', '-', '<cmd>Oil<cr>', desc = 'oil: open parent directory' }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/snippets.lua b/.config/nvim/lua/plugins/snippets.lua new file mode 100644 index 0000000..97a4455 --- /dev/null +++ b/.config/nvim/lua/plugins/snippets.lua @@ -0,0 +1,13 @@ +return { + { + 'L3MON4D3/LuaSnip', + version = 'v2.*', + build = 'make install_jsregexp', + config = function() + require('config.snippets') + end, + dependencies = { + "rafamadriz/friendly-snippets", + }, + } +} diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua new file mode 100644 index 0000000..93f396d --- /dev/null +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -0,0 +1,93 @@ +return { + { + 'nvim-treesitter/nvim-treesitter', + branch = 'master', + dependencies = { + { 'nvim-treesitter/nvim-treesitter-refactor', lazy = false }, + { 'nvim-treesitter/nvim-treesitter-textobjects', lazy = false }, + -- { 'nvim-treesitter/playground', cmd = { 'TSPlayground' } }, + }, + lazy = false, + build = ':TSUpdate', + config = function(_, opts) + require('nvim-treesitter.configs').setup(opts) + + -- use bash parser for gentoo ebuilds + vim.treesitter.language.register('bash', 'ebuild') + end, + opts = { + ensure_installed = { + 'bash', + 'c', + 'cmake', + 'comment', + 'cpp', + 'css', + 'dockerfile', + 'go', + 'gomod', + 'gotmpl', + 'gowork', + 'html', + 'javascript', + 'json', + 'jsonc', + 'lua', + 'make', + 'markdown', + 'markdown_inline', + 'ninja', + 'python', + 'regex', + 'rust', + 'scss', + 'sql', + 'todotxt', + 'toml', + 'typescript', + 'typst', + 'vim', + 'vimdoc', + 'yaml', + 'zig', + }, + highlight = { + enable = true, + additional_vim_regex_highlighting = { 'markdown' }, + }, + indent = { + enable = true, + }, + refactor = { + navigation = { + enable = true, + }, + smart_rename = { + enable = true, + }, + }, + textobjects = { + select = { + enable = true, + keymaps = { + ['ib'] = '@block.inner', + ['ab'] = '@block.outer', + -- ['ic'] = '@conditional.inner', + -- ['ac'] = '@conditional.outer', + ['if'] = '@function.inner', + ['af'] = '@function.outer', + ['il'] = '@loop.inner', + ['al'] = '@loop.outer', + ['is'] = '@scopename.inner', + ['as'] = '@scopename.outer', + ['ic'] = '@comment.inner', + ['ac'] = '@comment.outer', + }, + selection_mode = { + ['@comment.outer'] = 'V', + }, + }, + }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/whichkey.lua b/.config/nvim/lua/plugins/whichkey.lua new file mode 100644 index 0000000..dc21eda --- /dev/null +++ b/.config/nvim/lua/plugins/whichkey.lua @@ -0,0 +1,10 @@ +return { + { + 'folke/which-key.nvim', + event = 'VeryLazy', + opts = { + sort = { 'alphanum' }, + icons = { separator = '→ ', group = '🞱 ' }, + }, + }, +} diff --git a/.config/oguri/config b/.config/oguri/config deleted file mode 100644 index 0beb0b1..0000000 --- a/.config/oguri/config +++ /dev/null @@ -1,4 +0,0 @@ -[output *] -image=~/.config/oguri/ripples.jpg -scaling-mode=tile -filter=best diff --git a/.config/oguri/ripples.jpg b/.config/oguri/ripples.jpg deleted file mode 100644 index 7c06586..0000000 --- a/.config/oguri/ripples.jpg +++ /dev/null Binary files differdiff --git a/.config/river/colors b/.config/river/colors deleted file mode 100755 index 57021bd..0000000 --- a/.config/river/colors +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -riverctl background-color 0x080808ff -riverctl border-color-focused 0x70649aff -riverctl border-color-unfocused 0x080808ff -riverctl border-color-urgent 0xcb1b45ff -riverctl border-width 2 diff --git a/.config/river/functions.sh b/.config/river/functions.sh deleted file mode 100644 index 69b534b..0000000 --- a/.config/river/functions.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -declare_mode() { - riverctl declare-mode "$1" - riverctl map normal "$2" "$3" enter-mode "$1" - riverctl map "$1" None Return enter-mode normal - riverctl map "$1" None Escape enter-mode normal - riverctl map "$1" None Q enter-mode normal -} - -map_mode() { - if test "$1" = "-n"; then - shift 1 - local mode=$1 mod=$2 key=$3 - shift 3 - riverctl map "$mode" "$mod" "$key" $@ - else - riverctl map "$1" "$2" "$3" spawn "riverctl enter-mode normal ; $4" - fi - set +x -} diff --git a/.config/river/gsettings b/.config/river/gsettings deleted file mode 100755 index c7f6871..0000000 --- a/.config/river/gsettings +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -riverctl xcursor-theme plan9 - -gsettings set org.gnome.desktop.interface gtk-theme Adwaita -gsettings set org.gnome.desktop.interface icon-theme Adwaita -gsettings set org.gnome.desktop.interface cursor-theme plan9 -gsettings set org.gnome.desktop.interface enable-animations false -gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark -gsettings set org.gnome.desktop.interface color-scheme prefer-dark -gsettings set org.gnome.desktop.privacy remember-recent-files false -gsettings set org.gnome.desktop.privacy recent-files-max-age 0 -gsettings set org.gtk.Settings.FileChooser show-hidden false -gsettings set org.gtk.gtk4.Settings.FileChooser show-hidden false -gsettings set org.gtk.gtk4.Settings.FileChooser startup-mode cwd diff --git a/.config/river/init b/.config/river/init deleted file mode 100755 index fedb5f9..0000000 --- a/.config/river/init +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -riverctl spawn /etc/s6-rc/bin/s6-session-spawn - -. "$XDG_CONFIG_HOME/river/functions.sh" -. "$XDG_CONFIG_HOME/river/colors" -. "$XDG_CONFIG_HOME/river/keybinds" -. "$XDG_CONFIG_HOME/river/rules" -. "$XDG_CONFIG_HOME/river/layouts" -. "$XDG_CONFIG_HOME/river/gsettings" - -#riverctl spawn 'dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP' -riverctl spawn 'light -i set 80%' -riverctl spawn 'kanshictl reload' - -riverctl set-repeat 70 200 -riverctl input "pointer-*" natural-scroll enabled -riverctl input "pointer-*" pointer-accel 0 -riverctl input "pointer-*" tap enabled -riverctl input "pointer-*" accel-profile adaptive -riverctl input "pointer-*" disable-while-typing enabled -riverctl input "*Kensington_Slimblade_Trackball" natural-scroll disabled -riverctl input "*Kensington_Slimblade_Trackball" pointer-accel 1 - -riverctl set-cursor-warp on-output-change - -# Set and exec into the default layout generator, rivertile. -# River will send the process group of the init executable SIGTERM on exit. -riverctl default-layout rivertile -riverctl send-layout-cmd rivertile "main-ratio 0.66" -riverctl send-layout-cmd rivertile "main-count 1" -exec rivertile -view-padding 0 -outer-padding 0 diff --git a/.config/river/keybinds b/.config/river/keybinds deleted file mode 100755 index 516b653..0000000 --- a/.config/river/keybinds +++ /dev/null @@ -1,174 +0,0 @@ -#!/bin/sh - -. "$XDG_CONFIG_HOME/river/functions.sh" - -export mod=Super - -# Note: the "$mod" modifier is also known as Logo, GUI, Windows, $mod, etc. -riverctl map normal $mod+Shift Q close -riverctl map normal $mod+Shift E exit - -# $mod+J and $mod+K to focus the next/previous view in the layout stack -riverctl map normal $mod J focus-view next -riverctl map normal $mod K focus-view previous -riverctl map normal $mod L focus-view right -riverctl map normal $mod H focus-view left - -# $mod+Shift+J and $mod+Shift+K to swap the focused view with the next/previous -# view in the layout stack -riverctl map normal $mod+Shift J swap next -riverctl map normal $mod+Shift K swap previous -riverctl map normal $mod+Shift L swap right -riverctl map normal $mod+Shift H swap left - -riverctl map normal $mod Backspace focus-previous-tags -riverctl map normal $mod+Shift Backspace move-previous-tags - -# $mod+Period and $mod+Comma to focus the next/previous output -riverctl map normal $mod Period focus-output next -riverctl map normal $mod Comma focus-output previous - -# $mod+Shift+{Period,Comma} to send the focused view to the next/previous output -riverctl map normal $mod+Shift Period spawn 'riverctl send-to-output next && riverctl focus-output next' -riverctl map normal $mod+Shift Comma spawn 'riverctl send-to-output previous && riverctl focus-output previous' - -# bump the focused view to the top of the layout stack -riverctl map normal $mod+Shift Return zoom - -# $mod++ and $mod+- to decrease/increase the main ratio of rivertile(1) -riverctl map normal $mod Equal send-layout-cmd rivertile "main-ratio +0.05" -riverctl map normal $mod Minus send-layout-cmd rivertile "main-ratio -0.05" - -# $mod+Shift+H and $mod+Shift+L to increment/decrement the main count of rivertile(1) -riverctl map normal $mod Plus send-layout-cmd rivertile "main-count +1" -riverctl map normal $mod Underscore send-layout-cmd rivertile "main-count -1" - -# snap views to screen edges -# riverctl map normal $mod+Control H snap left -# riverctl map normal $mod+Control J snap down -# riverctl map normal $mod+Control K snap up -# riverctl map normal $mod+Control L snap right - -declare_mode resize $mod R -map_mode -n resize None h resize horizontal 100 -map_mode -n resize None j resize vertical -100 -map_mode -n resize None k resize vertical 100 -map_mode -n resize None l resize horizontal -100 - -riverctl map-pointer normal $mod BTN_LEFT move-view -riverctl map-pointer normal $mod BTN_RIGHT resize-view - -riverctl focus-follows-cursor normal - -# tag management -for i in $(seq 1 9); do - tags=$((1 << (i - 1))) - - riverctl map normal $mod "$i" set-focused-tags "$tags" - riverctl map normal $mod+Shift "$i" set-view-tags "$tags" - riverctl map normal $mod+Control "$i" toggle-focused-tags "$tags" - riverctl map normal $mod+Shift+Control "$i" toggle-view-tags "$tags" -done - -# $mod+0 to focus all tags -# $mod+Shift+0 to tag focused view with all tags -all_tags=$(((1 << 32) - 1)) -riverctl map normal $mod 0 set-focused-tags $all_tags -riverctl map normal $mod+Shift 0 set-view-tags $all_tags -riverctl map normal $mod+Control 0 toggle-focused-tags "$all_tags" -riverctl map normal $mod+Control+Shift 0 toggle-view-tags $all_tags - -scratch_tag=$((1 << 31)) -riverctl spawn-tagmask $((all_tags ^ scratch_tag)) -riverctl map normal $mod Delete toggle-focused-tags "$scratch_tag" - -# $mod+Space to toggle float -riverctl map normal $mod+Shift Space toggle-float - -# $mod+F to toggle fullscreen -riverctl map normal $mod F toggle-fullscreen -# $mod+{Up,Right,Down,Left} to change layout orientation -riverctl map normal $mod Up send-layout-cmd rivertile "main-location top" -riverctl map normal $mod Right send-layout-cmd rivertile "main-location right" -riverctl map normal $mod Down send-layout-cmd rivertile "main-location bottom" -riverctl map normal $mod Left send-layout-cmd rivertile "main-location left" - -# Declare a passthrough mode. This mode has only a single mapping to return to -# normal mode. This makes it useful for testing a nested wayland compositor -riverctl declare-mode passthrough -# enter passthrough mode -riverctl map normal $mod F11 enter-mode passthrough -# return to normal mode -riverctl map passthrough $mod F11 enter-mode normal - -# run application launcher -# riverctl map normal $mod Return spawn foot -# riverctl map normal $mod Return spawn footclient -riverctl map normal $mod Return spawn ghostty -riverctl map normal $mod D spawn 'menu -run' -riverctl map normal $mod W spawn 'oguri-cycle' - -declare_mode menu $mod M -map_mode menu None A 'riverctl spawn soundswitch' -map_mode menu None B 'riverctl spawn bluemenu' -map_mode menu None C 'riverctl spawn connmenu' -map_mode menu None D 'riverctl spawn domenu' -map_mode menu None M 'riverctl spawn mnts' -map_mode menu None N 'riverctl spawn notifmenu' -map_mode menu None O 'riverctl spawn modemenu' -map_mode menu None P 'riverctl spawn passmenu2' -map_mode menu None R 'riverctl spawn rcmenu' -map_mode menu None V 'riverctl spawn vpnmenu' -map_mode menu None Delete 'riverctl spawn powermenu' - -# TODO: screenshot mode -declare_mode screenshot $mod+Shift S -map_mode screenshot None s 'grimshot copy area' -map_mode screenshot Shift s 'grimshot save area' -map_mode screenshot None o 'grimshot copy output' -map_mode screenshot Shift o 'grimshot save output' -map_mode screenshot Shift a 'grimshot copy win' -map_mode screenshot None a 'grimshot copy' -map_mode screenshot Shift a 'grimshot copy' - -riverctl map normal $mod X spawn 'wtype -P XF86Cut' -riverctl map normal $mod C spawn 'wtype -P XF86Copy' -riverctl map normal $mod V spawn 'wtype -P XF86Paste' -#riverctl map normal $mod+Shift V spawn 'wl-paste -p -n | wtype -d 10 -s 5 -' -riverctl map normal $mod B spawn 'pkill -USR1 waybar' - -riverctl map normal $mod G spawn 'wl-kbptr' -declare_mode mouse $mod+Shift G -map_mode mouse None t 'wl-kbptr -o modes=tile,bisect' -map_mode mouse None b 'wl-kbptr -o modes=bisect' -map_mode mouse None c 'wl-kbptr -o modes=click' -# TODO: wlrctl pointer ... - -# Various media key mapping examples for both normal and locked mode which do -# not have a modifier -for mode in normal locked; do - riverctl map $mode None XF86AudioRaiseVolume spawn 'soundswitch -V' - riverctl map $mode None XF86AudioLowerVolume spawn 'soundswitch -v' - riverctl map $mode None XF86AudioMute spawn 'soundswitch -m' - - # Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl) - riverctl map $mode None XF86AudioPlay spawn 'playerctl -p playerctld play-pause' - riverctl map $mode None XF86AudioPrev spawn 'playerctl -p playerctld previous' - riverctl map $mode None XF86AudioNext spawn 'playerctl -p playerctld next' - - riverctl map $mode None XF86MonBrightnessUp spawn 'light set +5%' - riverctl map $mode None XF86MonBrightnessDown spawn 'light set 5%-' - - # AudioMedia is F12/framework logo key - riverctl map $mode None XF86AudioMedia spawn 'kanshictl reload' - riverctl map $mode None XF86Keyboard spawn 'light set 0%' - riverctl map $mode None XF86Favorites spawn 'light set 100%' -done - -# suspend on lid closing -riverctl map-switch normal lid close spawn 'suspend-then-hibernate' - -declare_mode ocr $mod o -map_mode ocr None o 'transformers_ocr recognize' -map_mode ocr None h 'transformers_ocr hold' -map_mode ocr None x 'transformers_ocr stop' diff --git a/.config/river/layouts b/.config/river/layouts deleted file mode 100755 index 1a24852..0000000 --- a/.config/river/layouts +++ /dev/null @@ -1 +0,0 @@ -#!/bin/sh diff --git a/.config/river/mklayout.sh b/.config/river/mklayout.sh deleted file mode 100755 index a6151cd..0000000 --- a/.config/river/mklayout.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -set -eu - -case "${1:-}" in -reset) - riverctl send-layout-cmd rivertile "main-ratio 0.66" - riverctl send-layout-cmd rivertile "main-count 1" - riverctl send-layout-cmd rivertile "main-location left" - ;; -dev) - workspace=$( - zoxide query -l | - xargs zenity \ - --title 'river-mklayout' \ - --text 'Select a workspace to enter into' \ - --list \ - --column 1 - ) - # spawn 3 terminals in the workspace - riverctl spawn "foot -D $workspace" - riverctl spawn "foot -D $workspace" - riverctl spawn "foot -D $workspace" - # terminate the terminal that ran mklayout (if any) - test -t 0 && riverctl close - ;; -*) - exit 1 - ;; -esac diff --git a/.config/river/rules b/.config/river/rules deleted file mode 100755 index 7bfc8c6..0000000 --- a/.config/river/rules +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -riverctl rule-add -app-id 'io.mpv' float - -riverctl rule-add -app-id 'firefox' -title 'Picture-in-Picture' float -riverctl rule-add -app-id 'firefox' -title 'Picture-in-Picture' tags $(((1 << 32) - 1)) -riverctl rule-add -app-id 'firefox' -title 'Picture-in-Picture' position 9999 25 - -riverctl rule-add -app-id 'firefox' -title 'Extension: Bitwarden Password Manager*' float - -riverctl rule-add -app-id 'zen' -title 'Picture-in-Picture' float -riverctl rule-add -app-id 'zen' -title 'Picture-in-Picture' tags $(((1 << 32) - 1)) -riverctl rule-add -app-id 'zen' -title 'Picture-in-Picture' position 9999 25 - -riverctl rule-add -app-id 'wine' float -riverctl rule-add -app-id 'qmmp' float - -riverctl rule-add -app-id '*' ssd diff --git a/.config/river/wl-kbptr-river-active-output b/.config/river/wl-kbptr-river-active-output deleted file mode 100755 index 97febff..0000000 --- a/.config/river/wl-kbptr-river-active-output +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -active_area=$(swaymsg -t get_tree | jq --raw-output \ - '.. | (.nodes? + .floating_nodes? // empty)[] | select (.focused) | .rect | "\(.width)x\(.height)+\(.x)+\(.y)"') -exec wl-kbptr --restrict "$active_area" $@ diff --git a/.config/senpai/highlight b/.config/senpai/highlight deleted file mode 100755 index 810a145..0000000 --- a/.config/senpai/highlight +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -escape() { - printf "%s" "$1" | sed 's#\\#\\\\#g' -} -# FOCUS=$(swaymsg -t get_tree | jq '..|objects|select(.focused==true)|.app_id' | grep -c senpai) -# if [ "$HERE" -eq 0 ] || [ "$FOCUS" -eq 0 ]; then -# notify-send "[$BUFFER] $SENDER" "$(escape "$MESSAGE")" -# fi -notify-send \ - -a senpai \ - -i "$(iconez -n message-reply-text-outline)" \ - -c audible \ - "[$BUFFER] $SENDER" \ - "$(escape "$MESSAGE")" diff --git a/.config/senpai/senpai.scfg b/.config/senpai/senpai.scfg deleted file mode 100644 index 042c58d..0000000 --- a/.config/senpai/senpai.scfg +++ /dev/null @@ -1,9 +0,0 @@ -address chat.sr.ht - -username robertgzr@hibiki -nickname robertgzr -password-cmd pass show irc/chat.sr.ht - -pane-widths { - nicknames 12 -} diff --git a/.config/starship.toml b/.config/starship.toml deleted file mode 100644 index c649bc7..0000000 --- a/.config/starship.toml +++ /dev/null @@ -1,87 +0,0 @@ -format = """ -⋮ \ -$username\ -$hostname\ -$directory\ -\ -$git_branch\ -$git_commit\ -$git_state\ -\ -$python\ -$nodejs\ -$jobs\ -$shlvl\ -$status\ -$cmd_duration\ -\ -$container\ -$character\ -""" - -add_newline = false -command_timeout = 100 - -[username] -format = "[$user@]($style)" -style_user = "dimmed" -disabled = false - -[hostname] -format = "[$hostname]($style) " -style = "dimmed" -disabled = false - -[directory] -truncation_length = 0 -truncate_to_repo = false -style = "yellow" -disabled = false - -[git_branch] -format = '[$symbol$branch]($style) ' -disabled = false - -[git_commit] -disabled = true - -[git_state] -disabled = true - -[python] -symbol = " " -format = '[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style) ' -disabled = false - -[nodejs] -symbol = " " -format = '[$symbol($version)]($style) ' -disabled = false - -[jobs] -symbol = "∆" -disabled = false - -[shlvl] -symbol = "☰" -disabled = false - -[status] -symbol = " " -not_found_symbol = " " -sigint_symbol = " " -signal_symbol = " " -map_symbol = true -disabled = false - -[cmd_duration] -disabled = true - -[container] -symbol = " " -disabled = false - -[character] -format = '$symbol ' -success_symbol = "[❯](bold $style)" -error_symbol = "[❯](bold red)" diff --git a/.config/sway/config b/.config/sway/config deleted file mode 100644 index 452a079..0000000 --- a/.config/sway/config +++ /dev/null @@ -1,75 +0,0 @@ -# vim: ft=i3config fdm=marker - -exec /home/robert/.config/sway/marker.sh -exec_always { - dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP BEMENU_OPTS - light -S 80 - kanshictl reload -} - -xwayland enable - -gaps inner 0 - -output * { - adaptive_sync on - power on -} - -# for_window [app_id=Alacritty] max_render_time 2 -# for_window [app_id=firefox] max_render_time 3 -# seat * hide_cursor 2000 - -set $laptop eDP-1 -set $desk "Dell Inc. DELL U2518D 3C4YP87AAK3L" - -set $mod Mod4 -set $alt Mod1 - -set $left h -set $down j -set $up k -set $right l - -set $term footclient -set $floating_term floaterm -set $firefox nightly - -# workspaces {{{ -set $ws1 1 -set $ws2 2 -set $ws3 3 -set $ws4 4 -set $ws5 5 -set $ws6 6 -set $ws7 7 -set $ws8 8 -set $ws9 9 -set $ws0 0 -set $wsMusic m -set $wsVideo v -set $wsGame g -set $wsMail 2 -set $wsWork 3 -# }}} - -# gaps inner 5 -show_marks yes -floating_maximum_size 0 x 0 -floating_minimum_size 75 x 50 - -# style {{{ -seat * xcursor_theme WinSur -set $bpix 3 -set $fat_bpix 5 -default_border pixel $bpix -default_floating_border pixel $fat_bpix -# }}} - -include config.d/* - -# bar tasks { -# swaybar_command waybar -b tasks -c ~/.config/waybar/taskbar.jsonc -l off -# mode hide -# hidden_state show -# } diff --git a/.config/sway/config.d/auto.conf b/.config/sway/config.d/auto.conf deleted file mode 100644 index 1898e06..0000000 --- a/.config/sway/config.d/auto.conf +++ /dev/null @@ -1,52 +0,0 @@ -# vim: ft=i3config -# NOTE: never use assign, it crashes sway for some reason... - -# for_window [floating] border csd -for_window [app_id="[tT]elegram[-_][dD]esktop"] mark mail -for_window [app_id="[tT]elegram[-_][dD]esktop" title="Choose Files"] floating enable; exec centercon -w .6 -for_window [app_id="[tT]elegram[-_][dD]esktop" title="Media viewer"] floating enable -for_window [app_id="[tT]elegram[-_][dD]esktop" title="TelegramDesktop"] floating enable -for_window [app_id="^__floating-.*"] floating enable -for_window [app_id="com.github.wwmm.easyeffects"] floating enable; border none; exec centercon -w .4 -for_window [app_id="(fire|libre|work)fox" title="Picture-in-Picture"] floating enable, sticky enable, border none -for_window [app_id="(fire|libre|work)fox" title="Sharing Indicator$"] floating enable, border none, sticky enable; exec centercon 1 tr; focus mode_toggle -for_window [app_id="(fire|libre|work)fox" title="^About Mozilla Firefox$"] floating enable -for_window [app_id="(fire|libre|work)fox" title="^Close tabs?"] floating enable -# for_window [app_id="firefox" title="^Developer Tools"] floating enable -for_window [app_id="(fire|libre|work)fox" title="^Extension: (Yomichan)"] floating enable -for_window [app_id="(fire|libre|work)fox" title="^File Upload$"] floating enable -for_window [app_id="(fire|libre|work)fox" title="^Open Firefox in Troubleshoot Mode?$"] floating enable -for_window [app_id="(fire|libre|work)fox" title="^Save As$"] floating enable -for_window [app_id="(fire|libre|work)fox"] mark browser -for_window [app_id="imv"] floating enable; inhibit_idle open -for_window [app_id="launcher"] floating enable -for_window [app_id="mpv"] floating enable; inhibit_idle fullscreen -for_window [app_id="mpv"] max_render_time off -# for_window [app_id="mpv" title=".* - mvi$"] border pixel $bpix; -for_window [app_id="obs" title="^Local File$"] floating enable; exec centercon -w .6 -for_window [app_id="org.polymc.PolyMC" title="$Console"] floating enable -for_window [app_id="slack"] mark mail -for_window [app_id="zoom" title="Settings"] floating enable -for_window [app_id="zoom" title="^as_toolbar$"] floating enable -for_window [app_id="zoom" title="^zoom$"] floating enable -for_window [class="Chromium-browser"] mark browser -#for_window [class="discord"] mark mail -#for_window [class="parsecd"] inhibit_idle fullscreen -#for_window [class="pinentry"] floating enable; border normal -for_window [con_mark="browser"] inhibit_idle fullscreen -# fix primary clipboard paste not working -for_window [con_mark="browser"] bindsym Shift-Insert exec 'wl-paste -p -n | wtype -' -for_window [title="tridactyledit"] floating enable - -set $outputSide eDP-1 -for_window [con_mark="work"] move workspace $wsWork -for_window [con_mark="mail"] move workspace $wsMail, move workspace to output $outputSide, layout tabbed -#for_window [class="Spotify"] move workspace $wsMusic, move workspace to output $outputSide -#for_window [class="osu!"] move workspace $wsGame, layout tabbed, exec osu-mode on -for_window [app_id="org.keepassxc.KeePassXC"] move scratchpad; scratchpad show -#for_window [class="Gvncviewer"] move workspace __vnc; fullscreen -for_window [app_id="retroarch"] fullscreen -#for_window [class="^Minecraft"] fullscreen; sway output - scale 1 - -for_window [app_id="gramps"] floating disable -for_window [app_id="xdg-desktop-portal-gtk"] floating enable diff --git a/.config/sway/config.d/binds.conf b/.config/sway/config.d/binds.conf deleted file mode 100644 index 1e7c066..0000000 --- a/.config/sway/config.d/binds.conf +++ /dev/null @@ -1,304 +0,0 @@ -# vim: ft=i3config - -# Basics {{{ -bindsym --no-repeat { - $mod+Return exec $term - $mod+Shift+Return exec $floating_term - $mod+b exec pkill -USR1 waybar - - # bindsym $mod+w exec $firefox - # $mod+w exec firefox --private-window - - # start launcher - $mod+d exec menu -run -} - -# kill focused window -bindsym $mod+Shift+q kill - -# Drag floating windows by holding down $mod and left mouse button. -# Resize them with right mouse button + $mod. -# Despite the name, also works for non-floating windows. -# Change normal to inverse to use left mouse button for resizing and right -# mouse button for dragging. -floating_modifier $mod normal - -# reload the configuration file -bindsym $mod+Shift+c reload - -# exit sway (logs you out of your wayland session) -bindsym $mod+Shift+e exec swaynag \ - -t warning \ - -m 'exit: what now?' \ - -b 'exit' 'swaymsg exec -- doas s6-rc -d change desktop' \ - -b 'restart' 'swaymsg exec -- doas s6-rc -d change desktop && sleep 0.5 && doas s6-rc -u change desktop' \ - -b 'poweroff' 'swaymsg exec -- doas poweroff' \ - -b 'reboot' 'swaymsg exec -- doas reboot' - -bindsym $mod+Shift+backspace exec lock - -bindsym $mod+Shift+b border toggle - -# rotate the screen 90 degress to read books/manga -bindsym $mod+Shift+r mode "read"; output - transform 90 clockwise -mode "read" { - bindsym Escape mode "default"; output - transform 90 anticlockwise - bindsym Return mode "default"; output - transform 90 anticlockwise -} - -# }}} - -bindsym --no-repeat Print exec grimshot copy output -bindsym $mod+Shift+s mode "screengrab" -# {{{ -mode "screengrab" { - bindsym a exec grimshot save screen; mode "default" - bindsym o exec grimshot save output; mode "default" - bindsym s exec grimshot save area; mode "default" - bindsym w exec grimshot save win; mode "default" - bindsym c exec grimshot copy area; mode "default" - bindsym p exec colorpick; mode "default" - - bindsym r exec grimshot rec win; mode "default" - bindsym q exec pkill -INT wf-recorder; mode "default" - - bindsym m exec grimocr -m mangaocr; mode "default" - bindsym Shift+m exec grimocr -m tesseract; mode "default" - - bindsym Escape mode "default" - bindsym Return mode "default" -} -# }}} - -# Move your focus around -bindsym $mod+$left focus left -bindsym $mod+$down focus down -bindsym $mod+$up focus up -bindsym $mod+$right focus right -# or use $mod+[up|down|left|right] - -# _move_ the focused window with the same, but add Shift -bindsym $mod+Shift+$left move left -bindsym $mod+Shift+$down move down -bindsym $mod+Shift+$up move up -bindsym $mod+Shift+$right move right - -bindsym $mod+Next focus child -bindsym $mod+Prior focus parent - -bindsym $mod+Delete [urgent="latest"] focus - -# for_window [app_id="^firefox" title="^MAIN/main"] mark browser_main -# for_window [app_id="^firefox" title="^WORK/main"] mark browser_work -# bindsym $mod+Semicolon [con_mark="browser_main"] focus -# bindsym $mod+Apostrophe [con_mark="browser_work"] focus -bindsym $mod+Semicolon [app_id="^firefox" title="^MAIN/main"] focus -bindsym $mod+Apostrophe [app_id="^firefox" title="^WORK/main"] focus - -# Workspaces {{{ -# Note: workspaces can have any name you want, not just numbers. -# We just use 1-10 as the default. -bindsym $mod+Shift+n workspace next -bindsym $mod+Shift+p workspace prev - -# switch to workspace -bindsym $mod+1 workspace $ws1 -bindsym $mod+2 workspace $ws2 -bindsym $mod+3 workspace $ws3 -bindsym $mod+4 workspace $ws4 -bindsym $mod+5 workspace $ws5 -bindsym $mod+6 workspace $ws6 -bindsym $mod+7 workspace $ws7 -bindsym $mod+8 workspace $ws8 -bindsym $mod+9 workspace $ws9 -bindsym $mod+0 workspace $ws0 - -bindsym $mod+Ctrl+m workspace $wsMusic -bindsym $mod+Ctrl+v workspace $wsVideo -bindsym $mod+Ctrl+g workspace $wsGame -bindsym $mod+Tab workspace back_and_forth - -# move focused container to workspace -bindsym $mod+Shift+1 move container to workspace $ws1 -bindsym $mod+Shift+2 move container to workspace $ws2 -bindsym $mod+Shift+3 move container to workspace $ws3 -bindsym $mod+Shift+4 move container to workspace $ws4 -bindsym $mod+Shift+5 move container to workspace $ws5 -bindsym $mod+Shift+6 move container to workspace $ws6 -bindsym $mod+Shift+7 move container to workspace $ws7 -bindsym $mod+Shift+8 move container to workspace $ws8 -bindsym $mod+Shift+9 move container to workspace $ws9 -bindsym $mod+Shift+0 move container to workspace $ws0 - -# move focused workspce to output -bindsym $mod+Ctrl+$left move workspace to output left -bindsym $mod+Ctrl+$down move workspace to output down -bindsym $mod+Ctrl+$up move workspace to output up -bindsym $mod+Ctrl+$right move workspace to output right - -bindsym $mod+g mode "go" -mode "go" { - bindsym 1 workspace $ws1; mode "default" - bindsym 2 workspace $ws2; mode "default" - bindsym 3 workspace $ws3; mode "default" - bindsym 4 workspace $ws4; mode "default" - bindsym 5 workspace $ws5; mode "default" - bindsym 6 workspace $ws6; mode "default" - bindsym 7 workspace $ws7; mode "default" - bindsym 8 workspace $ws8; mode "default" - bindsym 9 workspace $ws9; mode "default" - bindsym 0 workspace $ws0; mode "default" - - bindsym m workspace $wsMusic; mode "default" - bindsym g workspace $wsGame; mode "default" - bindsym v workspace $wsVideo; mode "default" - - # return to default mode - bindsym Return mode "default" - bindsym Escape mode "default" -} - -# }}} - -bindsym $mod+Minus splitv -bindsym $mod+Equal splith -bindsym $mod+Shift+y layout toggle split - -bindsym $mod+f fullscreen -bindsym $mod+Shift+f fullscreen global -bindsym $mod+Shift+t bar mode toggle topbar; default_border pixel - -bindsym $mod+space focus mode_toggle -bindsym $mod+Ctrl+space floating toggle - -bindsym $mod+y mode "layout" -# {{{ -mode "layout" { - # Switch the current container between different layout styles - bindsym s layout stacking; mode "default" - bindsym w layout tabbed; mode "default" - bindsym e layout splitv; mode "default" - - # move focus to the parent container - bindsym p focus parent - bindsym Shift+p focus child - - # make a sticky container - bindsym t sticky toggle; mode "default"; exec notify-send sway "container pinned" - bindsym Shift+t \ - floating enable; \ - sticky enable; \ - exec sh -c 'centercon -w 0.3 tr && swaymsg move left 10px && swaymsg move down 10px && swaymsg focus mode_toggle'; \ - mode "default" - - # return to default mode - bindsym Return mode "default" - bindsym Escape mode "default" -} -# }}} - -bindsym $mod+Ctrl+backspace move scratchpad -bindsym $mod+backspace scratchpad show - -bindsym $mod+r mode "resize" -# {{{ -mode "resize" { - set $rate 25 - bindsym $left resize shrink width $rate - bindsym $down resize shrink height $rate - bindsym $up resize grow height $rate - bindsym $right resize grow width $rate - - bindsym Shift+$down resize shrink width $rate; resize shrink height $rate - bindsym Shift+$up resize grow width $rate; resize grow height $rate - - # make a centered container - bindsym c exec centercon -w 0.6; mode "default" - bindsym Shift+c exec centercon -w 1.0; mode "default" - - # return to default mode - bindsym Return mode "default" - bindsym Escape mode "default" -} -# }}} - -bindsym $mod+Shift+g mode "gaps" -# {{{ -mode "gaps" { - set $gapDefault 4 - bindsym g gaps inner all toggle $gapDefault - bindsym t gaps inner all toggle $gapDefault - bindsym r gaps outer all set 0; gaps inner all set 0 - - set $gapRate 2 - bindsym $up gaps inner all plus $gapRate - bindsym $down gaps inner all minus $gapRate - - # return to default mode - bindsym Return mode "default" - bindsym Escape mode "default" -} -# }}} - -bindsym $mod+m mode "menu" -# {{{ -mode "menu" { - bindsym a exec soundswitch; mode "default" - bindsym m exec mnts; mode "default" - bindsym n exec notifmenu; mode "default" - bindsym p exec secretmenu; mode "default" - bindsym r exec rcmenu; mode "default" - bindsym c exec connmenu; mode "default" - # bindsym x exec menu -drun; mode "default" - bindsym d exec swdo; mode "default" - - bindsym Return mode "default" - bindsym Escape mode "default" - bindsym q mode "default" -} -# }}} - -# Misc {{{ -bindsym $mod+Shift+i exec anthywl-toggle -# bindsym $mod+Shift+x mark --toggle "x" -# bindsym $mod+x [con_mark="x"] focus -# bindsym $mod+Ctrl+x swap container with mark "x" - -# https://whynothugo.nl/journal/2022/11/04/copying-with-super-c/ -bindsym $mod+x exec wtype -P XF86Cut -bindsym $mod+c exec wtype -P XF86Copy -bindsym $mod+v exec wtype -P XF86Paste - -# Media volume controls -bindsym XF86AudioMute exec soundswitch -m -#bindsym XF86AudioMicMute exec soundswitch -M -bindsym XF86AudioLowerVolume exec soundswitch -v -bindsym XF86AudioRaiseVolume exec soundswitch -V - -# Sreen brightness controls -bindsym XF86MonBrightnessDown exec light -U 10 -bindsym XF86MonBrightnessUp exec light -A 10 - -# Media player controls -bindsym XF86AudioPrev exec playerctl -p playerctld previous -bindsym XF86AudioPlay exec playerctl -p playerctld play-pause -bindsym XF86AudioNext exec playerctl -p playerctld next - -# fn + f10 -bindsym XF86RFKill exec notify-send "hello from rfkill" -# fn + f12 -bindsym XF86AudioMedia exec notify-send "hello from audio media" - -#bindsym XF86WakeUp exec true -#bindsym XF86Display output eDP-1 power off; output eDP-1 power on; exec kanshictl reload -#bindsym XF86Tools output eDP-1 power toggle -#bindsym XF86Keyboard exec true -#bindsym XF86Favorites exec s6-svc -r $HOME/.local/share/s6/wlsunset - -bindsym $mod+F1 exec notify-send "hello from F1" -bindsym $mod+F2 exec notify-send "hello from F2" -bindsym $mod+F3 exec notify-send "hello from F3" -# }}} - -# go to sleep when lid is closed -bindswitch --reload lid:on exec r2mem diff --git a/.config/sway/config.d/colors.conf b/.config/sway/config.d/colors.conf deleted file mode 100644 index 4a0f1f5..0000000 --- a/.config/sway/config.d/colors.conf +++ /dev/null @@ -1,18 +0,0 @@ -# vim: ft=swayconfig - -font pango:Iosevka Etoile 9 - -set $text #fffffb -set $text2 #bdc0ba -set $bg #1c1c1c -set $bg2 #69b0ac -set $main #70649a -set $main2 #8a6bbe -set $urgent #cb1b45 -set $urgent2 #db4d6d -set $indicator $text2 - -client.focused $main $main $text $indicator $main -client.focused_inactive $bg $bg $text2 $bg $bg -client.unfocused $bg $bg $text2 $bg $bg -client.urgent $urgent2 $urgent $text $urgent2 $urgent \ No newline at end of file diff --git a/.config/sway/config.d/gsettings.conf b/.config/sway/config.d/gsettings.conf deleted file mode 100644 index a55ba02..0000000 --- a/.config/sway/config.d/gsettings.conf +++ /dev/null @@ -1,16 +0,0 @@ -# vim: ft=swayconfig - -exec_always { - gsettings set org.gnome.desktop.interface gtk-theme Adwaita - gsettings set org.gnome.desktop.interface icon-theme Adwaita - gsettings set org.gnome.desktop.interface cursor-theme WinSur - # gsettings set org.gnome.desktop.interface font-name "Noto Sans" - gsettings set org.gnome.desktop.interface font-name $uifont - gsettings set org.gnome.desktop.interface enable-animations false - gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark - gsettings set org.gnome.desktop.interface color-scheme prefer-dark - gsettings set org.gnome.desktop.privacy remember-recent-files false - gsettings set org.gnome.desktop.privacy recent-files-max-age 0 - gsettings set org.gtk.Settings.FileChooser show-hidden false - gsettings set org.gtk.Settings.FileChooser startup-mode cwd -} diff --git a/.config/sway/config.d/input.conf b/.config/sway/config.d/input.conf deleted file mode 100644 index 67ee374..0000000 --- a/.config/sway/config.d/input.conf +++ /dev/null @@ -1,71 +0,0 @@ -# vim: ft=i3config fdm=marker fen - -seat * hide_cursor when-typing enable - -input type:keyboard { - # set via $HOME/.config/sway/env - # xkb_layout us - # xkb_variant mac - # xkb_options 'caps:hyper,lvl3:ralt_switch_multikey,eurosign:5' - # xkb_options 'caps:hyper,eurosign:5' - - repeat_rate 70 - repeat_delay 200 -} - -input type:pointer { - accel_profile adaptive - pointer_accel 0 - natural_scroll enabled -} - -input type:touchpad { - accel_profile adaptive - tap enabled - natural_scroll enabled - dwt enabled - #events disabled -} - -set { - $keyboard 1:1:AT_Translated_Set_2_keyboard - $trackpad 1739:0:Synaptics_TM3289-021 - $trackpoint 2:10:TPPS/2_Elan_TrackPoint - - $planck 12951:50895:ZSA_Technology_Labs_Planck_EZ_Glow - $slimblade 1149:8257:Kensington_Kensington_Slimblade_Trackball - $mouse 1133:16500:Logitech_G305 - $pen 10429:148:XP-PEN_STAR_G640_Pen - $penmouse 10429:148:XP-PEN_STAR_G640_Mouse - $virtpen 0:0:OpenTabletDriver_Virtual_Tablet -} - -input $trackpoint { - pointer_accel 1 -} - -# $slimblade: -# button layout: -# --------- -# | 2 | 8 | -# --------- -# | 1 | 3 | -# --------- -input $slimblade { - natural_scroll disabled - pointer_accel 1 -} -bindsym --input-device=$slimblade --whole-window button8 seat - cursor press button3, seat - cursor release button3 -bindsym --input-device=$slimblade --whole-window button3 seat - cursor press button8, seat - cursor release button8 - -# seat pen attach $pen -# seat pen hide_cursor 10000 -# seat pen idle_inhibit tablet_tool -# seat pen idle_wake tablet_tool - -# input $pen { -# accel_profile flat -# } -# input $penmouse { -# events disabled -# } diff --git a/.config/sway/contrib/swayidle.confd b/.config/sway/contrib/swayidle.confd deleted file mode 100644 index 236cb18..0000000 --- a/.config/sway/contrib/swayidle.confd +++ /dev/null @@ -1,8 +0,0 @@ - -SWAYIDLE_COMMAND=<<EOF -timeout 540 'notify-send swayidle "screen off in 60s"' -timeout 600 'sway output * power off' - resume 'sway output * power on' -timeout 800 suspend -before-sleep lock -EOF diff --git a/.config/sway/contrib/swayidle.initd b/.config/sway/contrib/swayidle.initd deleted file mode 100755 index 169e5cf..0000000 --- a/.config/sway/contrib/swayidle.initd +++ /dev/null @@ -1,6 +0,0 @@ -#!/sbin/openrc-run - -command=swayidle -command_args="${SWAYIDLE_COMMAND}" - -pidfile=/var/run/swayidle.pid diff --git a/.config/sway/env b/.config/sway/env deleted file mode 100644 index eb699af..0000000 --- a/.config/sway/env +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -export XKB_DEFAULT_OPTIONS='caps:hyper,eurosign:5,hibiki:intl_tr' -export XKB_DEFAULT_LAYOUT='us' -export XKB_DEFAULT_VARIANT='mac' - -export GDK_BACKEND=wayland -export CLUTTER_BACKEND=wayland -export QT_QPA_PLATFORM=wayland-egl -export SDL_VIDEODRIVER=wayland -export ECORE_EVAS_ENGINE=wayland-egl -export ELM_ENGINE=wayland_egl -export _JAVA_AWT_WM_NONREPARENTING=1 -export NO_AT_BRIDGE=1 -export MOZ_ENABLE_WAYLAND=1 -# force gnome apps to use gnome style -export DESKTOP_SESSION=gnome -export QT_QPA_PLATFORMTHEME=gnome -#export QT_STYLE_OVERRIDE=adwaita -#export QT_WAYLAND_FORCE_DPI=physical -export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 - -# export XMODIFIERS=@im=ibus -export QT_IM_MODULE=ibus -export GTK_IM_MODULE=wayland - -export GTK_CSD=0 - -export XDG_SESSION_TYPE=wayland -export XDG_SESSION_DESKTOP=sway -# export XDG_CURRENT_DESKTOP=Unity -export XDG_CURRENT_DESKTOP=sway - -export BEMENU_BACKEND=wayland diff --git a/.config/sway/simple.conf b/.config/sway/simple.conf deleted file mode 100644 index 7249433..0000000 --- a/.config/sway/simple.conf +++ /dev/null @@ -1,28 +0,0 @@ -# vim: ft=i3config -set $mod Mod4 -set $left h -set $right l -set $up k -set $down j -set $term foot -set $menu bemenu-run - -bindsym $mod+Return exec $term -bindsym $mod+Shift+q kill -bindsym $mod+d exec $menu -bindsym $mod+Shift+c reload -bindsym $mod+Shift+e exit -bindsym $mod+$left focus left -bindsym $mod+$down focus down -bindsym $mod+$up focus up -bindsym $mod+$right focus right -bindsym $mod+Shift+$left move left -bindsym $mod+Shift+$down move down -bindsym $mod+Shift+$up move up -bindsym $mod+Shift+$right move right -bindsym $mod+f fullscreen -bindsym $mod+Backspace seat - pointer_constraint disable -bindsym $mod+0 seat - pointer_constraint escape -bindswitch lid:toggle output eDP-1 toggle - -exec swaynag -m $(sway --get-socketpath) -b 'quit' 'swaymsg exit' diff --git a/.config/todoman/config.py b/.config/todoman/config.py deleted file mode 100644 index 3a982f8..0000000 --- a/.config/todoman/config.py +++ /dev/null @@ -1,6 +0,0 @@ -# A glob expression which matches all directories relevant. -path = "~/calendars/tasks/" -date_format = "%Y-%m-%d" -time_format = "%H:%M" -default_list = "tasks" -default_due = 48 diff --git a/.config/treestyletab.css b/.config/treestyletab.css deleted file mode 100644 index 8e62f48..0000000 --- a/.config/treestyletab.css +++ /dev/null @@ -1,51 +0,0 @@ -/* Show title of unread tabs with red and italic font */ -:root.sidebar tab-item.unread .label-content { - font-style: italic !important; -} - -/* Less visible tab dividers. - A black border with a very low alpha slightly darkens any color. */ -tab-item { - border: solid 1px #0000008e; -} - -/* Change styling of pending (unloaded) tabs */ -tab-item.discarded { - opacity: 0.5; -} - -tab-item.discarded .label-content { - opacity: 0.5; -} - -:root.right tab-item tab-twisty { - order: -1; -} -:root.right tab-item tab-closebox { - order: 10000; -} - -/* "#tabbar" is required for TST 3.4.0 and later! */ -#tabbar tab-item:not(:hover) tab-closebox { - display: none; -} - -/* As little space before the tab name as possible. - The fold/unfold icon is not affected. */ -tab-item:not(.pinned) { - padding-left: 6px !important; -} -tab-item:not(.pinned) .label-content { - padding-left: 2px; -} - -tab-item tab-twisty { - margin-right: -1em; - opacity: 0 !important; - position: relative; - z-index: 10000; -} - -:root[theme="photon"], #background { - background-color: #2a2a2e; -} \ No newline at end of file diff --git a/.config/tridactyl/themes/r.css b/.config/tridactyl/themes/r.css deleted file mode 100644 index 05b47a6..0000000 --- a/.config/tridactyl/themes/r.css +++ /dev/null @@ -1,84 +0,0 @@ -/* vim: fdm=marker - * */ -:root.TridactylThemeR { - --tridactyl-fg: #f9f9fa; - --tridactyl-bg: #2a2a2e; - - --tridactyl-scrollbar-color: var(--tridactyl-fg); - - --tridactyl-cmdl-fg: #d7d7db; - --tridactyl-cmdl-bg: var(--tridactyl-bg); - - --tridactyl-header-first-bg: #38383d; - --tridactyl-header-second-bg: #2a2a2e; - --tridactyl-header-third-bg: #0c0c0d; - - --tridactyl-cmplt-border-top: 1px solid #2a2a2e; - - --tridactyl-url-fg: #86de74; - --tridactyl-url-bg: var(--tridactyl-bg); - - --tridactyl-of-fg: #fce19f; - --tridactyl-of-bg: var(--tridactyl-bg); - - --tridactyl-hintspan-fg: #f9f9fa; - --tridactyl-hintspan-bg: rgb(185, 142, 255); - - --tridactyl-hint-fg: var(--tridactyl-hintspan-fg); - --tridactyl-hint-bg: rgba(185, 142, 255, 0.15); - --tridactyl-hint-outline: 1px solid var(--tridactyl-hintspan-bg); - - --tridactyl-hint-active-fg: var(--tridactyl-hint-fg); - --tridactyl-hint-active-bg: #fff89e; - --tridactyl-hint-active-outline: 2px solid #fff89e; - - - --tridactyl-highlight-box-fg: var(--tridactyl-bg); - --tridactyl-highlight-box-bg: var(--tridactyl-fg); -} - -:root.TridactylThemeR.TridactylOwnNamespace input[id^="spoiler"] ~ .spoiler { - border-color: var(--tridactyl-bg); -} - -:root.TridactylThemeR.TridactylOwnNamespace a { - color: var(--tridactyl-hintspan-bg); -} - -:root.TridactylThemeR #command-line-holder { - order: 1; -} - -:root.TridactylThemeR #completions { - order: 2; - border-top: 1px solid var(--tridactyl-complt-bg); -} - -:root.TridactylThemeR #completions .sectionHeader { - display: none; -} - -:root.TridactylThemeR #tridactyl-colon::before { - margin-left: 2px; - content: " > "; -} - -:root.TridactylThemeR #completions .focused, -:root.TridactylThemeR #completions .focused .url { - color: var(--tridactyl-hintspan-bg); - background: var(--tridactyl-hint-bg); - text-decoration: italic; -} - -:root.TridactylThemeR #cmdline_iframe { - position: fixed !important; - bottom: unset; - top: -1px !important; - left: 0% !important; - box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 15px !important; - /* opacity: 0.9; */ -} - -:root.TridactylThemeR.TridactylOwnNamespace input[id^="spoiler"] ~ .spoiler { - border-color: var(--tridactyl-hintspan-bg); -} diff --git a/.config/tridactyl/tridactylrc b/.config/tridactyl/tridactylrc deleted file mode 100644 index 3494540..0000000 --- a/.config/tridactyl/tridactylrc +++ /dev/null @@ -1,133 +0,0 @@ -" vim: ft=vim -sanitise tridactyllocal tridactylsync - -set browser firefox -set allowautofocus false -set searchengine duckduckgo -set tabopencontaineraware true -set editorcmd foot -a floaterm -T tridactyl-editor -- nvim -set historyresults 50 -" set newtab https://html.duckduckgo.com -set allowautofocus true -set newtabfocus page -set leavegithubalone false -" set blacklistkeys ["/","<Space>",";"] - -colors r - -" remove annoying binds -unbind s -unbind <C-f> -unbind <C-a> -unbind <F1> -unbind p - -bind J tabnext -bind K tabprev - -bind <Space>tw fillcmdline tabopen -c wee -bind <Space>tp fillcmdline tabopen -c pers -bind <Space>tb fillcmdline tabopen -c bank -bind <Space>ts fillcmdline tabopen -c shop - -bind <Space>s fillcmdline tabopen search -bind <Space>n fillcmdline nativeopen -bind <Space>c fillcmdline recontain - -bind <C-o> back -bind <C-i> forward -bind <C-n> tabnext -bind <C-p> tabprev - -bind / fillcmdline find -bind n findnext 1 -bind N findnext -1 -bind <Space>, nohlsearch - -" select all in cmdline -unbind --mode=ex <C-a> - -unbind --mode=browser <C-,> -unbind --mode=browser <C-6> -unbind --mode=browser <CS-6> - -bindurl news.ycombinator.com ;c hint -fr \d+\scomments -bindurl news.ycombinator.com f hint -c [class*="storylink"] - -" better result hinting on ddg -bindurl duckduckgo.com f hint -c a[class="result__url"] -bindurl duckduckgo.com F hint -b -c a[class="result__url"] - -" hint: mpv/video -bind gv js tri.native.run(`mpvplay ${document.location.href}`) -bind yv composite getclip | js -p tri.native.run(`mpvplay ${JS_ARG}`) -bind ;v hint -W js -p tri.native.run(`mpvplay ${JS_ARG}`) -" bind ;v hint -W !s mpv --profile=cache - -" hint: other -bind ;i hint -W js -p tri.native.run(`sh -c "notify-send 'tridactly > imv' '${JS_ARG}' && imv '${JS_ARG}'"`) -bind ;e hint -W js -p tri.native.run(`sh -c "notify-send 'tridactly > vim' '${JS_ARG}' && alacritty --class '__floating-tridactyledit' -e nvim '${JS_ARG}'"`) - -bind gp composite get_current_url | fillcmdline winopen -popup -bind g1 tab 2 -bind g2 tab 3 -bind g3 tab 4 -bind g4 tab 5 - -" some autocommands that rewrite URLs -" autocmd DocStart www.amazon.co.uk js tri.excmds.urlmodify("-t", "www", "smile") -" autocmd DocStart golang.org/pkg js tri.excmds.urlmodify("-t", "golang.org/pkg", "godoc.org") - -seturl overleaf.com mode ignore -seturl jel.ly.fish mode ignore - -seturl typeform.com superignore true -seturl gather.town superignore true -seturl typingclub.com superignore true -seturl monkeytype.com superignore true - -" fix youtube -seturl youtube.com noiframe true -unbindurl youtube.com f -unbindurl youtube.com 1 -unbindurl youtube.com 2 -unbindurl youtube.com 3 -unbindurl youtube.com 4 -unbindurl youtube.com 5 -unbindurl youtube.com 6 -unbindurl youtube.com 7 -unbindurl youtube.com 8 -unbindurl youtube.com 9 -unbindurl youtube.com <Space> -bindurl youtube.com h hint -bindurl youtube.com T tabopen ddg.gg -bindurl youtube.com C recontain personal - -" fix twitch -unbindurl twitch.tv <Space> - -" fix reddit -seturl reddit.com allowautofocus true -unbindurl reddit.com <Escape> -unbindurl reddit.com j -unbindurl reddit.com k -unbindurl reddit.com n -unbindurl reddit.com p -unbindurl reddit.com a -unbindurl reddit.com z -unbindurl reddit.com c -" unbindurl reddit.com r -unbindurl reddit.com s -unbindurl reddit.com h -unbindurl reddit.com x -unbindurl reddit.com l - -unbindurl boards.4chan.*.org x -unbindurl boards.4chan.*.org T -unbindurl boards.4chan.*.org B -unbindurl boards.4chan.*.org n -unbindurl boards.4chan.*.org p -unbindurl boards.4chan.*.org F -unbindurl boards.4chan.*.org W -unbindurl boards.4chan.*.org <C-j> -unbindurl boards.4chan.*.org <C-k> diff --git a/.config/vdirsyncer/config b/.config/vdirsyncer/config deleted file mode 100644 index 1210eb6..0000000 --- a/.config/vdirsyncer/config +++ /dev/null @@ -1,102 +0,0 @@ -[general] -# A folder where vdirsyncer can store some metadata about each pair. -status_path = "~/.local/state/vdirsyncer/status/" - -# STORAGE LOCAL -[storage calendar_local] -type = "filesystem" -path = "~/calendars/personal/" -fileext = ".ics" -[storage tasks_local] -type = "filesystem" -path = "~/calendars/tasks/" -fileext = ".ics" -[storage contacts_local] -type = "filesystem" -path = "~/contacts/" -fileext = ".vcf" - -# STORAGE GANDI -[storage gandi_tasks_remote] -type = "caldav" -item_types = ["VTODO"] -url = "https://webmail.gandi.net/SOGo/dav/robert@gnzler.io/Calendar/7F5F-63225280-C7-DF8F570/" -username = "robert@gnzler.io" -password.fetch = ["shell", "rbw get 67436053-fde1-43c3-9544-6a5289f08c76"] - -# STORAGE MAILFENCE -[storage mailfence_calendar_remote] -type = "caldav" -item_types = ["VEVENT"] -url = "https://mailfence.com/dav/robertgzr/private/events" -username = "robertgzr" -password.fetch = ["shell", "rbw get 68b0ea26-733a-43cd-b8f8-e8ecc98de072"] -[storage mailfence_contacts_remote] -type = "carddav" -url = "https://mailfence.com/dav/robertgzr/private/contacts" -username = "robertgzr" -password.fetch = ["shell", "rbw get 68b0ea26-733a-43cd-b8f8-e8ecc98de072"] - -# STORAGE NEXTCLOUD -[storage nx_calendar_remote] -type = "caldav" -item_types = ["VEVENT"] -url = "https://nx.gzr.im/remote.php/dav/calendars/robert/personal/" -username = "robert" -password.fetch = ["shell", "rbw get bd753459-7a32-4876-b2fa-c082d59f6845"] -[storage nx_tasks_remote] -type = "caldav" -item_types = ["VTODO"] -url = "https://nx.gzr.im/remote.php/dav/calendars/robert/tasks/" -username = "robert" -password.fetch = ["shell", "rbw get bd753459-7a32-4876-b2fa-c082d59f6845"] -[storage nx_contacts_remote] -type = "carddav" -url = "https://nx.gzr.im/" -username = "robert" -password.fetch = ["shell", "rbw get bd753459-7a32-4876-b2fa-c082d59f6845"] - -# PAIRS -[pair mailfence_calendars] -a = "calendar_local" -b = "mailfence_calendar_remote" -collections = null -metadata = ["displayname", "color"] -conflict_resolution = ["command", "nvim", "-d"] - -[pair gandi_tasks] -a = "tasks_local" -b = "gandi_tasks_remote" -collections = null -metadata = ["displayname", "color"] -conflict_resolution = ["command", "nvim", "-d"] - -[pair mailfence_contacts] -a = "contacts_local" -b = "mailfence_contacts_remote" -collections = [["personal", "personal", "contacts"]] -# Synchronize the "display name" property into a local file (~/.contacts/displayname). -metadata = ["displayname"] -conflict_resolution = ["command", "nvim", "-d"] - -# [pair nx_calendars] -# a = "calendar_local" -# b = "nx_calendar_remote" -# collections = null -# metadata = ["displayname", "color"] -# conflict_resolution = ["command", "nvim", "-d"] - -# [pair nx_tasks] -# a = "tasks_local" -# b = "nx_tasks_remote" -# collections = null -# metadata = ["displayname", "color"] -# conflict_resolution = ["command", "nvim", "-d"] - -# [pair nx_contacts] -# a = "contacts_local" -# b = "nx_contacts_remote" -# collections = [["personal", "personal", "contacts"]] -# # Synchronize the "display name" property into a local file (~/.contacts/displayname). -# metadata = ["displayname"] -# conflict_resolution = ["command", "nvim", "-d"] diff --git a/.config/vifm/colors/nihoncolors.vifm b/.config/vifm/colors/nihoncolors.vifm deleted file mode 100644 index 6a25bab..0000000 --- a/.config/vifm/colors/nihoncolors.vifm +++ /dev/null @@ -1,32 +0,0 @@ -" vim: ft=vim -highlight clear - -highlight Directory cterm=bold ctermfg=4 ctermbg=default -highlight Link cterm=bold ctermfg=6 ctermbg=default -highlight HardLink cterm=bold ctermfg=6 ctermbg=default -highlight BrokenLink cterm=bold ctermfg=1 ctermbg=default -highlight Socket cterm=bold ctermfg=13 ctermbg=default -highlight Device cterm=bold ctermfg=12 ctermbg=default -highlight Fifo cterm=bold ctermfg=3 ctermbg=default -highlight Executable cterm=bold ctermfg=10 ctermbg=default - -highlight CurrLine cterm=bold,reverse -highlight OtherLine cterm=italic ctermfg=15 ctermbg=none -highlight OddLine cterm=none ctermfg=none ctermbg=none -highlight Selected cterm=standout ctermfg=11 ctermbg=none - -highlight Win cterm=none ctermfg=15 ctermbg=none -highlight OtherWin cterm=italic ctermfg=8 ctermbg=none -highlight TopLine cterm=none ctermfg=default ctermbg=default -highlight TopLineSel cterm=bold ctermfg=default ctermbg=default -highlight TabLine cterm=none ctermfg=default ctermbg=default -highlight TabLineSel cterm=bold ctermfg=default ctermbg=default -highlight StatusLine cterm=bold ctermfg=7 ctermbg=4 -highlight WildMenu cterm=underline,reverse ctermfg=15 ctermbg=black -highlight CmdLine cterm=none ctermfg=default ctermbg=default -highlight ErrorMsg cterm=none ctermfg=1 ctermbg=default -highlight Border cterm=none ctermfg=default ctermbg=default -highlight JobLine cterm=bold,reverse ctermfg=default ctermbg=default -highlight SuggestBox cterm=bold ctermfg=default ctermbg=default -highlight CmpMismatch cterm=bold ctermfg=8 ctermbg=1 -highlight AuxWin cterm=bold,underline,reverse,standout ctermfg=default ctermbg=default diff --git a/.config/vifm/colors/papercolor_dark.vifm b/.config/vifm/colors/papercolor_dark.vifm deleted file mode 100644 index ec68d53..0000000 --- a/.config/vifm/colors/papercolor_dark.vifm +++ /dev/null @@ -1,49 +0,0 @@ -" Available attributes (some of them can be combined): -" bold -" underline -" reverse or inverse -" standout -" none - -" palette -let color00 = '#1c1c1c' -let color01 = '#e03c8a' -let color02 = '#90b44b' -let color03 = '#caad5f' -let color04 = '#58b2dc' -let color05 = '#828282' -let color06 = '#e3916e' -let color07 = '#bdc0ba' -let color08 = '#535953' -let color09 = '#86c166' -let color10 = '#ddd23b' -let color11 = '#b28fce' -let color12 = '#ffb11b' -let color13 = '#66bab7' -let color14 = '#77969a' -let color15 = '#fffffb' - -highlight clear - -highlight Win cterm=none ctermfg=252 ctermbg=none -highlight Directory cterm=bold ctermfg=32 ctermbg=default -highlight Link cterm=bold ctermfg=173 ctermbg=default -highlight BrokenLink cterm=bold ctermfg=240 ctermbg=default -highlight Socket cterm=bold ctermfg=205 ctermbg=default -highlight Device cterm=bold ctermfg=125 ctermbg=default -highlight Fifo cterm=bold ctermfg=148 ctermbg=default -highlight Executable cterm=bold ctermfg=70 ctermbg=default -highlight Selected cterm=standout ctermfg=140 ctermbg=default -highlight CurrLine cterm=bold,reverse - -highlight TopLine cterm=none ctermfg=default ctermbg=default -highlight TopLineSel cterm=bold ctermfg=default ctermbg=default -highlight StatusLine cterm=bold ctermfg=234 ctermbg=32 -highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black -highlight CmdLine cterm=none ctermfg=default ctermbg=default -highlight ErrorMsg cterm=none ctermfg=125 ctermbg=default -highlight Border cterm=none ctermfg=default ctermbg=default -highlight JobLine cterm=bold,reverse ctermfg=default ctermbg=default -highlight SuggestBox cterm=bold ctermfg=default ctermbg=default -highlight CmpMismatch cterm=bold ctermfg=252 ctermbg=125 -highlight AuxWin cterm=bold,underline,reverse,standout ctermfg=default ctermbg=default diff --git a/.config/vifm/scripts/vifm-show-sixel b/.config/vifm/scripts/vifm-show-sixel deleted file mode 100755 index 1644153..0000000 --- a/.config/vifm/scripts/vifm-show-sixel +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -set -e - -if [ "$#" -ne 3 ]; then - echo "Usage: $0 filename width height" - exit 1 -fi - -dim=( $(convert "$1" -format "%w %h" info:) ) -w=${dim[0]} -h=${dim[1]} - -pw=$(($2*8)) -ph=$(($3*14)) - -height=auto -width=auto -if [ $pw -lt $w ] && [ $ph -lt $h ]; then - newh=$(echo "($h*$pw)/$w" | bc) - neww=$(echo "($w*$ph)/$h" | bc) - - if [ $newh -le $ph ]; then - width=$pw - else - height=$ph - fi -elif [ $pw -lt $w ]; then - width=$pw -elif [ $ph -lt $h ]; then - height=$ph -fi - -# debugging stuff -# echo pw=$pw ph=$ph -# echo w=$w h=$h -# echo neww=$neww newh=$newh -# exec echo width=$width height=$height - -# account for GNU screen -if [ -n "$STY" ]; then - popt=-P -fi - -exec img2sixel $popt --width=$width --height=$height "$1" diff --git a/.config/vifm/vifmrc b/.config/vifm/vifmrc deleted file mode 100644 index c8429b1..0000000 --- a/.config/vifm/vifmrc +++ /dev/null @@ -1,286 +0,0 @@ -" vim: filetype=vim : - -colorscheme nihoncolors - -set vicmd=nvim -set trash -set history=100 -set nofollowlinks -set sortnumbers -set undolevels=100 -set vimhelp -set norunexec -set timefmt=%m/%d\ %H:%M -set wildmenu -set wildstyle=popup -set suggestoptions=normal,visual,view,otherpane,keys,marks,registers -set ignorecase -set smartcase -set nohlsearch -set incsearch -set scrolloff=4 - -" Don't do too many requests to slow file systems -if !has('win') - set slowfs=curlftpfs -endif - -set statusline=" Hint: %z%= %A %10u:%-7g %15s %20d " - -" ------------------------------------------------------------------------------ - -mark b ~/bin/ -mark h ~/ - -" ------------------------------------------------------------------------------ - -" :com[mand][!] command_name action -" The following macros can be used in a command -" %a is replaced with the user arguments. -" %c the current file under the cursor. -" %C the current file under the cursor in the other directory. -" %f the current selected file, or files. -" %F the current selected file, or files in the other directory. -" %b same as %f %F. -" %d the current directory name. -" %D the other window directory name. -" %m run the command in a menu window - -command! df df -h %m 2> /dev/null -command! diff vi -d %f %F -command! zip zip -r %f.zip %f -command! run !! ./%f -command! make !!make %a -command! mkcd :mkdir %a | cd %a -command! vgrep vi "+grep %a" -command! reload :write | restart - -" ------------------------------------------------------------------------------ - -" Pdf -filextype *.pdf - \ {View in zathura} - \ zathura --fork %c:p, - \ {View in mupdf} - \ mupdf %c &, -fileviewer *.pdf pdftotext -nopgbrk %c - - -filextype *.ps,*.eps,*.ps.gz,*.djvu,*.cbz - \ {View in zathura} - \ zathura --fork %c:p, - -" Audio -filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus - \ {Play using mpv} - \ mpv --no-video %c, - \ {Play using ffplay} - \ ffplay -nodisp %c, - \ {Enqueue using xap} - \ xap add %c:p, -fileviewer *.mp3 mp3info - -" Video -filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, - \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx, - \*.as[fx] - \ {View using mpv} - \ mpv %f, - \ {View using mpv (muted)} - \ mpv --mute %f, - \ {View using ffplay} - \ ffplay -fs %f, - \ {Enqueue using xap} - \ xap add %f, - \ {Open in LosslessCut} - \ lossless-cut.desktop %f, - \ {Chromecast} - \ go-chromecast --first --with-ui load %f, - -fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, - \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx, - \*.as[fx] - \ ffprobe -pretty %c 2>&1, - -fileviewer *.mp4,*.mkv,*.webm, - \*.m4a,*.mp3,*.opus, - \ mediainfo %c 2>&1, - -" Web -filextype *.html,*.htm - \ {Open with w3m} - \ w3m %f %i &, - \ {Open with firefox} - \ firefox %f &, - -" Object -filetype *.o nm %f | less - -" Man page -filetype *.[1-8] man ./%c -fileviewer *.[1-8] man ./%c | col -b - -" Images -filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm,*.webp,*.svg - \ {View in qimgv} - \ swaymsg exec -- qimgv '%f:p', - \ {View in swayimg} - \ swayimg %c, - \ {View in imv} - \ imv %c, - \ {View in mvi} - \ mvi %c, - \ {Edit with GIMP} - \ swaymsg exec -- $HOME/AppImages/gimp.AppImage %f:p, - \ {Edit with Darktable} - \ swaymsg exec -- darktable %f:p, - \ {View mediainfo} - \ mediainfo %c, -fileviewer *.jpg,*.jpeg,*.png,*.gif,*.svg - \ swaymsg exec -- swayimg %f:p >/dev/null 2>&1 ; mediainfo %c 2>&1, -" fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm -" \ vifm-show-sixel %c %pw %ph %pd 2>/dev/null || mediainfo %c 2>&1 - -" MD5 -filetype *.md5 - \ {Check MD5 hash sum} - \ md5sum -c %f %S, -" SHA1 -filetype *.sha1 - \ {Check SHA1 hash sum} - \ sha1sum -c %f %S, -" SHA256 -filetype *.sha256 - \ {Check SHA256 hash sum} - \ sha256sum -c %f %S, -" SHA512 -filetype *.sha512 - \ {Check SHA512 hash sum} - \ sha512sum -c %f %S, -" GPG signature -filetype *.asc - \ {Check signature} - \ !!gpg --verify %c, - -filetype *.zip,*.jar,*.war,*.ear,*.oxt,*.apkg - \ {Extract here} - \ tar -xf %c, -filetype *.zip - \ {Extract ZIP} - \ unzip %c -fileviewer *.zip,*.jar,*.war,*.ear,*.oxt unzip -l %c - -filetype *.7z - \ {Extract 7z} - \ 7z x %c, -fileviewer *.7z 7z l %c - -filetype *.rar - \ {Extract RAR} - \ unrar x %c, -fileviewer *.rar unrar v %c - -" ArchiveMount -fileviewer *.tgz,*.tar.gz tar -tzf %c -fileviewer *.tar.bz2,*.tbz2 tar -tjf %c -fileviewer *.tar.xz,*.txz tar -tJf %c -fileviewer *.tar tar -tf %c - -filetype *.ove - \ {Open with Olive} - \ swx olive.desktop %d/%c, - -filetype * - \ {Open with nuke} - \ nuke %f, - \ {Open with nvim} - \ nvim %f, - \ {Copy file path} - \ url-launcher "%c:p", - \ {Check size} - \ ncdu -rx %c:p, - -" ------------------------------------------------------------------------------ -" FUSE - -command ssh -\ : let $SSH_FILE = system('mktemp /tmp/vifm-XXXX.ssh') -\ | execute '!echo ''%a'' > $SSH_FILE; ls $SSH_FILE %%U' -" \ | execute 'normal <cr>' -" \ | execute '!rm $SSH_FILE' - -fileviewer *.ssh cat %c -filetype *.ssh - \ {Mount with sshfs} - \ FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR, - -filetype *.encfs - \ {Mount with encfs} - \ FUSE_MOUNT2|encfs %PARAM %DESTINATION_DIR, - -" ------------------------------------------------------------------------------ - -" What should be saved automatically between vifm runs -" Like in previous versions of vifm -" set vifminfo=options,filetypes,commands,bookmarks,dhistory,state,cs -" Like in vi -set vifminfo=dhistory,savedirs,chistory,state,tui,shistory, - \phistory,fhistory,dirstack,registers,bookmarks,bmarks - -" ------------------------------------------------------------------------------ - -" Examples of configuring both panels - -" Customize view columns a bit (enable ellipsis for truncated file names) -" -" set viewcolumns=-{name}..,6{}. - -" Filter-out build and temporary files -" -" filter! /^.*\.(lo|o|d|class|py[co])$|.*~$/ - -" ------------------------------------------------------------------------------ - -" Start shell in current directory -nnoremap s :shell<cr> -" Display sorting dialog -nnoremap S :sort<cr> - -" Toggle visibility of preview window -nnoremap w :view<cr> -vnoremap w :view<cr>gv - -" Choose fileviewer to use -nnoremap gs :file<cr> -" Open file in the background using its default program -nnoremap gb :file &<cr>l - -" Yanking... -nnoremap yf :!echo -n %c:p | wl-copy %i<cr> -nnoremap yn :!echo -n %c | wl-copy %i<cr> -nnoremap yd :!echo -n %d | wl-copy %i<cr> -nnoremap yff :!cat -n %c:p | wl-copy %i<cr> - -" Mappings for faster renaming -nnoremap I cw<c-a> -nnoremap cc cw<c-u> -nnoremap A cw - -" Open console in current directory -nnoremap ;t :!swaymsg exec -- foot<cr> -" Open editor to edit vifmrc and apply settings after returning to vifm -nnoremap ;c :write | edit $MYVIFMRC | restart<cr> -" Toggle wrap setting on ,w key -" nnoremap ;w :if system(expand("awk 'BEGIN{print (%pw > %ph)}'")) | split! | else | vsplit! | endif<cr> - -nnoremap ;F :!fd -t f -e jpg -e png . %c:p:h | shuf | flipr -q -i - -nnoremap ;I :!fd -t f -e jpg -e png -e gif . %c:p:h | shuf | imv -b 000000 -t 0.8 -nnoremap ;P :!~/bin/photosort/photosort -n -s -d /photos/ %c:p -nnoremap ;w :!go-chromecast load --with-ui %f -nnoremap ;R :!~/bin/rsyncez %f ? -nnoremap ;t :!tailscale file cp --verbose %f DEST: - -nnoremap q :quit<cr> -nnoremap - :goto ..<cr> -nnoremap <esc> :hideui<cr> - -nnoremap diff --git a/.config/vimiv/keys.conf b/.config/vimiv/keys.conf deleted file mode 100644 index c23fa8f..0000000 --- a/.config/vimiv/keys.conf +++ /dev/null @@ -1,124 +0,0 @@ -[GLOBAL] -<colon> : command -o : command --text='open ' -yi : copy-image -yI : copy-image --primary -yy : copy-name -ya : copy-name --abspath -yA : copy-name --abspath --primary -yY : copy-name --primary -x : delete %% -gi : enter image -gl : enter library -gm : enter manipulate -gt : enter thumbnail -f : fullscreen -G : goto -1 -gg : goto 1 -m : mark %% -Q : quit -q : nop -. : repeat-command -j : scroll down -h : scroll left -l : scroll right -k : scroll up -/ : search -? : search --reverse -N : search-next -P : search-prev -zh : set library.show_hidden! -b : set statusbar.show! -tl : toggle library -tm : toggle manipulate -tt : toggle thumbnail -gv : !mpv --keep-open=no %% - -[IMAGE] -q : enter thumbnail -M : center -<button-right> : nop -<button-middle> : nop -| : flip -_ : flip --vertical -<end> : goto -1 -<home> : goto 1 -<button-forward> : next -<page-down> : next -n : next -<ctrl>n : next --keep-zoom -<button-back> : prev -<page-up> : prev -p : prev -<ctrl>p : prev --keep-zoom -> : rotate -< : rotate --counter-clockwise -W : scale --level=1 -<equal> : scale --level=fit -w : scale --level=fit -E : scale --level=fit-height -e : scale --level=fit-width -J : scroll-edge down -H : scroll-edge left -L : scroll-edge right -K : scroll-edge up -sl : set slideshow.delay +0.5 -sh : set slideshow.delay -0.5 -ss : slideshow -+ : zoom in -- : zoom out -gv : !mpv --keep-open=no %% -<space> : !mpv --keep-open=no %% - -[LIBRARY] -q : enter thumbnail -<button-middle> : nop -go : goto 1 --open-selected -<button-forward> : scroll down --open-selected -n : scroll down --open-selected -<ctrl>d : scroll half-page-down -<ctrl>u : scroll half-page-up -<button-right> : nop -<ctrl>f : scroll page-down -<ctrl>b : scroll page-up -<button-back> : scroll up --open-selected -p : scroll up --open-selected -L : set library.width +0.05 -H : set library.width -0.05 -- : scroll left -gT : !swaymsg exec -- foot -D %% -gv : !mpv --keep-open=no %% -<space> : !mpv --keep-open=no %% - -[THUMBNAIL] -q : enter library -$ : end-of-line -<button-right> : nop # enter library -^ : first-of-line -<ctrl>d : scroll half-page-down -<ctrl>u : scroll half-page-up -<button-back> : scroll left -<ctrl>f : scroll page-down -<ctrl>b : scroll page-up -<button-forward> : scroll right -<ctrl>+ : zoom in -<ctrl>- : zoom out -- : enter library -gv : !mpv --keep-open=no %% -<space> : !mpv --keep-open=no %% - -[COMMAND] -<tab> : complete -<shift><tab> : complete --inverse -<ctrl>p : complete -<ctrl>n : complete --inverse -<up> : history-substr-search next -<down> : history-substr-search prev -<escape> : leave-commandline - -[MANIPULATE] -q : enter library -<colon> : command -f : fullscreen -b : set statusbar.show! - diff --git a/.config/vimiv/styles/base16 b/.config/vimiv/styles/base16 deleted file mode 100644 index c842864..0000000 --- a/.config/vimiv/styles/base16 +++ /dev/null @@ -1,96 +0,0 @@ -; This file is a reference for creating own styles. It will never be read. -; To change values, copy this file using a new name and set the style setting -; in vimiv.conf to that name. -[STYLE] -; start flavours -font = 10pt Iosevka Etoile -base00 = #0c0c0c -base01 = #db4d6d -base02 = #5dac81 -base03 = #fad689 -base04 = #58b2dc -base05 = #69b0ac -base06 = #70649a -base07 = #bdc0ba -base08 = #1c1c1c -base09 = #cb1b45 -base0a = #86c166 -base0b = #f7d94c -base0c = #2ea9df -base0d = #81c7d4 -base0e = #8a6bbe -base0f = #fffffb -; end flavours -font = 10pt Iosevka Aile -image.bg = {base00} -image.scrollbar.width = 8px -image.scrollbar.bg = {base00} -image.scrollbar.fg = {base05} -image.scrollbar.padding = 2px -library.font = 10pt Iosevka Aile -library.fg = {base07} -library.padding = 2px -library.directory.fg = {base0d} -library.even.bg = {base03} -library.odd.bg = {base03} -library.selected.bg = {base0e} -library.selected.fg = {base07} -library.selected.bg.unfocus = {base05} -library.search.highlighted.fg = {base00} -library.search.highlighted.bg = {base0a} -library.scrollbar.width = 8px -library.scrollbar.bg = {base00} -library.scrollbar.fg = {base05} -library.scrollbar.padding = 2px -library.border = 0px solid -statusbar.font = 10pt Iosevka Aile -statusbar.bg = {base00} -statusbar.fg = {base07} -statusbar.error = {base08} -statusbar.warning = {base0a} -statusbar.info = {base0b} -statusbar.message_border = 2px solid -statusbar.padding = 4 -thumbnail.font = 10pt Iosevka Aile -thumbnail.fg = {base07} -thumbnail.bg = {base00} -thumbnail.padding = 20 -thumbnail.selected.bg = {base0e} -thumbnail.selected.bg.unfocus = {base03} -thumbnail.search.highlighted.bg = {base0a} -thumbnail.default.bg = {base0e} -thumbnail.error.bg = {base08} -thumbnail.frame.fg = {base03} -completion.height = 16em -completion.fg = {base07} -completion.even.bg = {base03} -completion.odd.bg = {base03} -completion.selected.fg = {base07} -completion.selected.bg = {base0e} -keyhint.padding = 2px -keyhint.border_radius = 10px -keyhint.suffix_color = {base0d} -manipulate.fg = {base07} -manipulate.focused.fg = {base0d} -manipulate.bg = {base00} -manipulate.slider.left = {base0f} -manipulate.slider.handle = {base05} -manipulate.slider.right = {base07} -manipulate.image.border = 2px solid -manipulate.image.border.color = {base0d} -mark.color = {base0e} -keybindings.bindings.color = {base0d} -keybindings.highlight.color = {base0e} -metadata.padding = 2px -metadata.border_radius = 10px -image.straighten.color = {base02} -prompt.font = 10pt Iosevka Aile -prompt.fg = {base03} -prompt.bg = {base07} -prompt.padding = 2px -prompt.border_radius = 10px -prompt.border = 2px solid -prompt.border.color = {base0e} -metadata.bg = {base0e} - -; vim:ft=dosini diff --git a/.config/vimiv/vimiv.conf b/.config/vimiv/vimiv.conf deleted file mode 100644 index 202b03f..0000000 --- a/.config/vimiv/vimiv.conf +++ /dev/null @@ -1,68 +0,0 @@ -[GENERAL] -monitor_filesystem = True -shuffle = False -startup_library = True -style = base16 -read_only = True - -[COMMAND] -history_limit = 100 - -[COMPLETION] -fuzzy = True - -[SEARCH] -ignore_case = True -incremental = True - -[IMAGE] -autoplay = True -autowrite = ask -overzoom = 1.0 -zoom_wheel_ctrl = True - -[LIBRARY] -width = 0.6 -show_hidden = True - -[THUMBNAIL] -size = 128 - -[SLIDESHOW] -delay = 2.0 -indicator = slideshow: - -[STATUSBAR] -collapse_home = True -show = True -message_timeout = 60000 -mark_indicator = <b>*</b> -left = {pwd}{read-only} -left_image = {index}/{total} {basename}{read-only} [{zoomlevel}] -left_thumbnail = {thumbnail-index}/{thumbnail-total} {thumbnail-basename}{read-only} -left_manipulate = {basename} {image-size} Modified: {modified} {processing} -center_thumbnail = {thumbnail-size} -center = {slideshow-indicator} {slideshow-delay} {transformation-info} -right = {keys} {mark-count} {mode} -right_image = {keys} {mark-indicator} {mark-count} {mode} - -[KEYHINT] -delay = 500 -timeout = 5000 - -[TITLE] -fallback = vimiv -image = vimiv - {basename} - -[METADATA] -keys1 = Exif.Image.Make,Exif.Image.Model,Exif.Photo.LensModel,Exif.Image.DateTime,Exif.Image.Artist,Exif.Image.Copyright -keys2 = Exif.Photo.ExposureTime,Exif.Photo.FNumber,Exif.Photo.ISOSpeedRatings,Exif.Photo.ApertureValue,Exif.Photo.ExposureBiasValue,Exif.Photo.FocalLength,Exif.Photo.ExposureProgram -keys3 = Exif.GPSInfo.GPSLatitudeRef,Exif.GPSInfo.GPSLatitude,Exif.GPSInfo.GPSLongitudeRef,Exif.GPSInfo.GPSLongitude,Exif.GPSInfo.GPSAltitudeRef,Exif.GPSInfo.GPSAltitude -keys4 = Iptc.Application2.Caption,Iptc.Application2.Keywords,Iptc.Application2.City,Iptc.Application2.SubLocation,Iptc.Application2.ProvinceState,Iptc.Application2.CountryName,Iptc.Application2.Source,Iptc.Application2.Credit,Iptc.Application2.Copyright,Iptc.Application2.Contact -keys5 = Exif.Image.ImageWidth,Exif.Image.ImageLength,Exif.Photo.PixelXDimension,Exif.Photo.PixelYDimension,Exif.Image.BitsPerSample,Exif.Image.Compression,Exif.Photo.ColorSpace - -[PLUGINS] -video = - -[ALIASES] - diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc deleted file mode 100644 index 70ab60f..0000000 --- a/.config/waybar/config.jsonc +++ /dev/null @@ -1,257 +0,0 @@ -{ - "modules-left": ["sway/mode", "sway/workspaces", "mpris"], - - "sway/workspaces": { - "format": "{icon}", - "format-icons": { - "1": "", - "2": "", - "3": "", - "m": "", - "v": "", - "g": "", - "__vnc": "" - } - }, - - "river/tags": { - "format": ":{}", - "num-tags": 9 - }, - - "mpris": { - "max-width": 60, - "format": "{player_icon} {dynamic}", - "format-paused": "{status_icon} <i>{dynamic}</i>", - "player-icons": { - "default": "", - // "firefox": "X", - // "mpv": "XX", - }, - "status-icons": { - "paused": "", - "playing": "", - "stopped": "", - } - }, - - // ------------------------------------------------------------------------ // - - "modules-center": ["custom/weather", "clock#local", "clock#utc", "clock#extra", "custom/timetracked", "custom/hotspots"], - - "custom/weather": { - "format": "{icon} {percentage}℃", - "format-icons": { - "sunny": "", - "partlycloudy": "", - "cloudy": "", - "verycloudy": "", - "fog": "", - "lightrain": "", - "heavyrain": "", - "hail": "", - "thunder": "", - "lightsnow": "", - "heavysnow": "", - "snowrain": "" - }, - "exec": "$HOME/.config/waybar/modules/weather.sh", - "interval": 600, - "return-type": "json", - "tooltip": true, - "on-click": "swx -t env REPORT=1 $HOME/.config/waybar/modules/weather.sh" - }, - - "clock#local": { - "format": "{:<i>%a</i> %d %b <b>%H:%M</b>}", - "tooltip-format": "TZ: {:%Z %z}\n\n{calendar}", - // "locale": "ja_JP.utf-8" - // "locale": "en_US.utf-8" - }, - - "clock#utc": { - "timezone": "UTC", - "format": "{:<small>%Z</small> %H:%M}", - "tooltip-format": "{:%Z %z}" - }, - "clock#extra": { - "timezone": "Asia/Kolkata", - "format": "{:<small>%Z</small> %H:%M}", - "tooltip-format": "{:%Z %z}" - }, - - "custom/todo": { - "format": "{icon} {}", - "format-icons": { - "off": "", - "on": "" - }, - "exec": "env WAYBAR_TODO_FILE=$HOME/.zk/todo.md $HOME/.config/waybar/modules/waybar-todo", - "on-click": "pkill -x -USR1 waybar-todo", - "on-click-right": "pkill -x -USR2 waybar-todo", - "escape": true, - "return-type": "json" - }, - - "custom/timetracked": { - "format": "{}", - "exec": "$HOME/.config/waybar/modules/timetracked.sh", - "on-click": "$HOME/.config/waybar/modules/timetracked.sh on-click", - "escape": true, - "return-type": "json" - }, - - "custom/hotspots": { - "format": "{}", - "exec": "$HOME/.config/waybar/modules/hotspots.sh", - "on-click": "$HOME/.config/waybar/modules/hotspots.sh click", - "escape": true, - "interval": 600, - "return-type": "json" - }, - - // ------------------------------------------------------------------------ // - "modules-right": ["tray", "cpu", "memory", "disk#root", "disk#home", "temperature", "idle_inhibitor", "backlight", "pulseaudio", "custom/vpn", "network#tailscale", "network", "battery"], - - "tray": { - "icon-size": 15, - "spacing": 5 - }, - - "custom/covid": { - "format": "{icon} {}", - "format-icons": { - "": "x", - "gray": "", - "green": "", - "yellow": "", - "orange": "", - "red": "", - "darkred": "", - "darkdarkred": "" - }, - "exec": "$HOME/.config/waybar/modules/covid.sh", - "interval": 86400, - "return-type": "json" - }, - - "disk#root": { - "path": "/", - "format": " <small>/ </small>{percentage_used}%" - }, - - "disk#home": { - "path": "/home", - "format": "<small>/home </small>{percentage_used}%" - }, - - "cpu": { - "format": "{icon} {usage}%", - "format-icons": ["", ""], - "on-click": "$HOME/bin/swx -t -- btop" - }, - - "memory": { - "format": "{icon} {percentage}%", - "format-icons": ["", ""], // - "on-click": "$HOME/bin/swx -t -- btop" - }, - - "temperature": { - "critical-threshold": 100, - "format": "{icon} {temperatureC}℃", - "format-icons": ["", "", "", ""] - }, - - "idle_inhibitor": { - "format": "{icon}", - "format-icons": { - "activated": "", - "deactivated": "" - } - }, - - "backlight": { - "device": "auto", - "format": "{icon}", - "format-icons": ["", "", "", ""], - "on-scroll-down": "light -A 5", - "on-scroll-up": "light -U 5", - // save current level - // then set to minimum brightness - "on-click-right": "light -O; light -S $(light -P)", - // revert to previously saved brightness - "on-click-middle": "light -I" - }, - - "custom/gamma": { - "format": "{icon}", - "format-icons": { - "dawn": "", - "day": "", - "dusk": "", - "night": "", - }, - "exec": "env GAMMA_COMMAND='wlsunset -l $HOME_LAT -L $HOME_LON -p' YAEGI_SYSCALL=1 YAEGI_UNRESTRICTED=1 ${HOME}/.config/waybar/modules/gamma.go", - "return-type": "json" - }, - - "pulseaudio": { - "format": "{icon} {volume}%", - "format-bluetooth": "{icon} {volume}%", - "format-muted": " {volume}%", - "format-icons": { - "easyeffects_sink": "", - "headphones": "", - "handsfree": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": ["", "", ""] - }, - "on-click-right": "soundswitch -m", - "on-click-middle": "swx easyeffects", - "on-click": "swx -t -F '0.4' pulsemixer" - }, - - "custom/vpn": { - "exec": "${HOME}/.config/waybar/modules/vpn.sh", - "interval": 600, - "return-type": "json", - "on-click": "${HOME}/.config/waybar/modules/vpn.sh toggle", - }, - - "network#tailscale": { - "interface": "tailscale0", - "format": "", - "format-disconnected": "", - "tooltip-format": "{ifname}: {bandwidthUpBits} {bandwidthDownBits}", - "tooltip-format-disconnected": "disconnected", - "on-click": "${HOME}/.config/waybar/modules/tailscale.sh toggle", - }, - - "network": { - "format-wifi": "{icon} {signalStrength}%", - "format-icons": ["", "", "", "", ""], - "format-ethernet": "", - "format-linked": " {ifname}", - "format-disconnected": " ", - "tooltip-format": "{ifname}: {ipaddr}/{cidr}\ngateway: {gwaddr}\nssid: {essid}\nsignal: {signaldBm} dbm\ndown: {bandwidthDownBits}\nup: {bandwidthUpBits}", - "tooltip-format-disconnected": "disconnected", - // cycles through wifi/ethernet/off - // "on-click": "${HOME}/.config/waybar/modules/network.sh toggle", - }, - - "battery": { - "states": { - "good": 90, - "warning": 30, - "critical": 15 - }, - "format": "{icon} {capacity}%", - "format-charging": " {capacity}%", - "format-full-charging": "", - "format-icons": ["", "", "", ""] - }, -} diff --git a/.config/waybar/modules/covid.sh b/.config/waybar/modules/covid.sh deleted file mode 100755 index 46727d7..0000000 --- a/.config/waybar/modules/covid.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh - -set -e -[ -n "$DEBUG" ] && { - set -x - curl_args='-v' -} - -# check requirements -for tool in awk curl jq flock; do - if ! command -v "$tool" >/dev/null; then - printf "%s: %s not installed but required\n" "$(basename "$0")" "$tool" >&2 - exit 1 - fi -done - -# incidence = (sumCasesLast7Days / EWZ) * 100000 -lat=${HOME_LAT:?} -lon=${HOME_LON:?} -# fields='GEN,RS,EWZ,EWZ_BL,BL_ID,cases,cases_per_100k,cases7_per_100k,cases7_bl_per_100k,last_update,BL,IBZ' -fields='GEN,cases7_bl_per_100k' -# see https://experience.arcgis.com/experience/478220a4c454480e823b17327b2bf1d4 -uri="https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=${fields}&geometry=${lon}%2C${lat}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json" - -_data=$(curl -sSL -H 'Accept: application/json' ${curl_args} "${uri}" | jq -r '.features[0].attributes') -if [ "${_data}" = "null" ]; then - printf "{}\n" - exit 0 -fi - -historical_data=${HOME}/covid-history.csv -loc=$(printf "%s" "${_data}" | jq -r '.GEN') -last_update=$(printf "%s" "${_data}" | jq -r '.last_update') -# printf "${_data}" | jq -r '.' -incidence_f=$(printf "%.1f" "$(printf "%s" "${_data}" | jq -r '.cases7_bl_per_100k')") -incidence_i=$(printf "%.0f" "${incidence_f}") - -# store -if [ -n "${last_update}" ] && [ -n "${incidence_f}" ]; then - tmp_HISTFILE=$(mktemp -u --tmpdir waybar-module-covid.XXXXX) - ( - cat "${historical_data}" - ts=$(printf "%s" "${last_update}" | cut -d',' -f1 | tr '.' '-') - printf "%s,%s\n" "${ts}" "${incidence_f}" - ) | uniq | tee "${tmp_HISTFILE}" >/dev/null - flock -x "${historical_data}" mv "${tmp_HISTFILE}" "${historical_data}" -fi - -mxy=$(tail -n 7 "${historical_data}" | awk -F',' '{y=y+$2} END{print ((NR*(NR+1))/2)/NR, y/NR}') -trend=$(awk -F',' --assign="mx=$(printf "%s" "$mxy" | cut -d' ' -f1)" --assign="my=$(printf "%s" "$mxy" | cut -d' ' -f2)" '{up= up+(NR-mx)*($2-my); down= down+(NR-mx)**2} END{if(down==0){print 0}else{print up/down};}' "${historical_data}") -trend_arrow="" -[ "$(printf "%.0f" "${trend}")" -gt 0 ] && trend_arrow="" -[ "$(printf "%.0f" "${trend}")" -lt 0 ] && trend_arrow="" - -color='green' -if [ "${incidence_i}" -eq "0" ]; then - color='gray' -fi -if [ "${incidence_i}" -gt "1" ]; then - color='green' -fi -if [ "${incidence_i}" -gt "25" ]; then - color='yellow' -fi -if [ "${incidence_i}" -gt "35" ]; then - color='orange' -fi -if [ "${incidence_i}" -gt "50" ]; then - color='red' -fi -if [ "${incidence_i}" -gt "100" ]; then - color='darkred' -fi -if [ "${incidence_i}" -gt "250" ]; then - color='darkdarkred' -fi - -tooltip="7 Tage Inzidenz für ${loc} -last update: ${last_update} - -history (${trend_arrow}): -$(awk -F, '{print $1 " " $2}' "${historical_data}" | tail -n10 | tac)" - -jq -nr \ - "{ text: \"${trend_arrow}${incidence_f}\", percentage: \"${incidence_i}\", class: \"${color}\", alt: \"${color}\", tooltip: \"${tooltip}\" } | @text" diff --git a/.config/waybar/modules/gamma.go b/.config/waybar/modules/gamma.go deleted file mode 100755 index 9813cc8..0000000 --- a/.config/waybar/modules/gamma.go +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env yaegi - -package main - -import ( - "encoding/json" - "log" - "os" - "os/exec" - "os/signal" - "runtime" - "strings" - . "syscall" -) - -func main() { - runtime.GOMAXPROCS(1) - - var ( - update = make(chan os.Signal, 1) - cancel = make(chan os.Signal, 1) - ) - signal.Notify(update, SIGUSR1, SIGUSR2, SIGHUP) - signal.Notify(cancel, SIGTERM, SIGINT) - - // could use golang.org/x/sys/unix.Prctl here - // but I want to avoid the dependency - if _, _, e := Syscall6(uintptr(SYS_PRCTL), - uintptr(PR_SET_PDEATHSIG), - uintptr(SIGTERM), - 0, 0, 0, 0); e != 0 { - log.Fatalf("error: %v", e) - } - - lookup() - for { - select { - case sig := <-update: - switch sig { - case SIGUSR1: - printJson("day") - // TODO(robert): toggle wlsunset off? - case SIGUSR2: - printJson("night") - // TODO(robert): toggle wlsunset on? - case SIGHUP: - lookup() - } - case <-cancel: - log.Printf("%v exiting\n", os.Args[0]) - os.Exit(0) - } - } -} - -func printJson(phase string) { - _ = json.NewEncoder(os.Stdout).Encode(map[string]interface{}{ - "class": phase, - "alt": phase, - "tooltip": "gamma: " + phase, - "text": phase, - }) -} - -func lookup() { - cmdEnv, ok := os.LookupEnv("GAMMA_COMMAND") - if !ok { - printJson("unknown") - return - } - b, err := exec.Command("bash", "-c", cmdEnv).Output() - if err != nil { - log.Fatalf("error: %v", err) - return - } - phase := strings.TrimSpace(string(b)) - printJson(phase) -} diff --git a/.config/waybar/modules/go.mod b/.config/waybar/modules/go.mod deleted file mode 100644 index fdeae95..0000000 --- a/.config/waybar/modules/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module git.sr.ht/~robertgzr/dotfiles/.config/waybar/modules - -go 1.15 - -require github.com/fsnotify/fsnotify v1.4.9 // indirect diff --git a/.config/waybar/modules/go.sum b/.config/waybar/modules/go.sum deleted file mode 100644 index b12c1ed..0000000 --- a/.config/waybar/modules/go.sum +++ /dev/null @@ -1,4 +0,0 @@ -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9 h1:L2auWcuQIvxz9xSEqzESnV/QN/gNRXNApHi3fYwl2w0= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/.config/waybar/modules/hotspots.sh b/.config/waybar/modules/hotspots.sh deleted file mode 100755 index fe2ff65..0000000 --- a/.config/waybar/modules/hotspots.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -set -e - -case "$1" in -click) - uri=$(hspl -u) - xdg-open "http://$uri" - ;; -*) - output=$(hspl || echo "none") - if [ "$output" != "none" ]; then - jq -nc \ - --arg text " $(head -n1 <<<"$output")" \ - --arg tooltip "$(tail -n+2 <<<"$output")" \ - --arg class "$(if [ "$(hspl -d)" -lt 100 ]; then echo "soon"; else echo ""; fi)" \ - '{text:$text,tooltip:$tooltip,class:$class}' - else - jq -nc '{}' - fi - ;; -esac diff --git a/.config/waybar/modules/mediaplayer.py b/.config/waybar/modules/mediaplayer.py deleted file mode 100755 index 8082825..0000000 --- a/.config/waybar/modules/mediaplayer.py +++ /dev/null @@ -1,171 +0,0 @@ -#!/usr/bin/env python3 - -import argparse -import json -import logging -import signal -import sys -from datetime import timedelta -from math import floor -import prctl - -# yapf: disable -import gi -gi.require_version('Playerctl', '2.0') -from gi.repository import GLib, Playerctl -# yapf: enable - -logger = logging.getLogger(__name__) -loop = GLib.MainLoop() - -def write_output(text, player): - logger.info('Writing output') - - output = { - 'text': text, - 'class': player.props.player_name, - 'alt': player.props.player_name - } - sys.stdout.write(json.dumps(output) + '\n') - sys.stdout.flush() - - -def on_play(player, status, manager): - logger.info('Received new playback status') - on_metadata(player, player.props.metadata, manager) - - -def on_metadata(player, metadata, manager): - logger.info('Received new metadata') - track_info = '' - - if player.props.player_name == 'spotify' and \ - 'mpris:trackid' in metadata.keys() and \ - ':ad:' in player.props.metadata['mpris:trackid']: - track_info = 'AD PLAYING' - - if player.get_title() and player.get_title() != '': - track_info = f"{player.get_title()}" - if player.get_artist() and player.get_artist() != '': - track_info = f"{player.get_artist()} - {track_info}" - - if 'mpris:length' in player.props.metadata.keys(): - dur_td = timedelta(microseconds=player.props.metadata['mpris:length']) - dur_h, remainder = divmod(dur_td.total_seconds(), 3600) - dur_m, dur_s = divmod(remainder, 60) - dur = f"{floor(dur_m)}:{floor(dur_s):02}" - if dur_h > 0: - dur = f"{floor(dur_h)}:{dur}" - track_info = '{} ({})'.format(track_info, str(dur)) - - if player.props.status == 'Paused' and track_info: - track_info = '<i>'+track_info+'</i>' - - if player.props.status == 'Stopped': - return - - if track_info == '': - logger.warning('TrackInfo was empty after parsing') - return - - write_output(track_info, player) - - -def on_player_appeared(manager, player, selected_player=None, ignored_players=None): - if player is not None \ - and (selected_player is None or player.name == selected_player) \ - and not (player.name in ignored_players): - init_player(manager, player) - else: - logger.debug( - "New player appeared, but it's not the selected player, skipping") - - -def on_player_vanished(manager, player): - logger.info('Player has vanished') - sys.stdout.write('\n') - sys.stdout.flush() - - -def init_player(manager, name): - logger.debug('Initialize player: {player}'.format(player=name.name)) - player = Playerctl.Player.new_from_name(name) - player.connect('playback-status', on_play, manager) - player.connect('metadata', on_metadata, manager) - manager.manage_player(player) - on_metadata(player, player.props.metadata, manager) - - -def signal_handler(sig, frame): - logger.warning('Received signal to stop, exiting') - sys.stdout.write('\n') - sys.stdout.flush() - loop.quit() - sys.exit(0) - - -def parse_arguments(): - parser = argparse.ArgumentParser() - - # Increase verbosity with every occurance of -v - parser.add_argument('-v', '--verbose', action='count', default=0) - - # Define for which player we're listening - parser.add_argument('--player', - help='player to listen for') - - # Define which players to ignore entirely - parser.add_argument('-I', '--ignore', - action='append', - help='players to ignore') - - return parser.parse_args() - - -def main(): - arguments = parse_arguments() - - # Initialize logging - logging.basicConfig(stream=sys.stderr, - level=logging.DEBUG, - format='%(name)s %(levelname)s %(message)s') - - # Logging is set by default to WARN and higher. - # With every occurrence of -v it's lowered by one - logger.setLevel(max((3 - arguments.verbose) * 10, 0)) - - # Log the sent command line arguments - logger.debug('Arguments received {}'.format(vars(arguments))) - - manager = Playerctl.PlayerManager() - manager.connect('name-appeared', - lambda *args: on_player_appeared(*args, arguments.player, arguments.ignore)) - manager.connect('player-vanished', on_player_vanished) - - # set the process up to die when the parent exits - prctl.set_pdeathsig(signal.SIGTERM) - - signal.signal(signal.SIGINT, signal_handler) - signal.signal(signal.SIGTERM, signal_handler) - signal.signal(signal.SIGHUP, signal_handler) - - for player in manager.props.player_names: - if arguments.player is not None and arguments.player != player.name: - logger.debug( - '{player} is not the filtered player, skipping it'.format( - player=player.name)) - continue - - if arguments.ignore is not None and player.name in arguments.ignore: - logger.debug( - '{player} is ignored, skipping it'.format( - player=player.name)) - continue - - init_player(manager, player) - - loop.run() - - -if __name__ == '__main__': - main() diff --git a/.config/waybar/modules/mpris.awk b/.config/waybar/modules/mpris.awk deleted file mode 100644 index 194aa73..0000000 --- a/.config/waybar/modules/mpris.awk +++ /dev/null @@ -1,54 +0,0 @@ -{ - gsub(/"/,"") - gsub(/'/,"\047") - # print "DEBUG: " $0 - - artist=$1 - album=$2 - title=$3 - position=$4 - player=$5 - status=$6 -} - -($0 == "") || (status ~ /stopped/) { - system("jq -Mnc {}") - next -} - -(status ~ /playing/) { - icon="" -} -(status ~ /paused/) { - icon="" -} -(artist != "") && (album != "") { - text=sprintf("%s - %s - %s (%s)", artist, album, title, position) - tooltip=sprintf("%s\nby %s\nfrom %s\n(%s)", title, artist, album, player) -} -(artist == "") { - text=sprintf("%s - %s (%s)", album, title, position) - tooltip=sprintf("%s\nfrom %s\n(%s)", title, album, player) -} -(album == "") { - text=sprintf("%s - %s (%s)", artist, title, position) - tooltip=sprintf("%s\nby %s\n(%s)", title, artist, player) -} -(artist == "") && (album == "") { - text=sprintf("%s (%s)", title, position) - tooltip=sprintf("%s\n(%s)", title, player) -} -# edge cases to beautify the output -(player == "tdesktop") && (title ~ /Unknown Track/) { - text="telegram voice message" -} - -{ - system(sprintf("jq -rMnc --arg class \"%s\" --arg text \"%s %s\" --arg tt \"%s\" '{ class: $class, text: $text|@html, tooltip: $tt|@html }'", \ - status, - icon, - text, - tooltip)) -} - -END {} diff --git a/.config/waybar/modules/mpris.sh b/.config/waybar/modules/mpris.sh deleted file mode 100755 index 5f5d5c6..0000000 --- a/.config/waybar/modules/mpris.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -set -e -[ -n "$DEBUG" ] && set -x - -playerctl -sF metadata -f '"{{artist}}","{{album}}","{{title}}","{{duration(position)}}","{{playerName}}","{{lc(status)}}"' | awk -F',' -f "${HOME}/.config/waybar/modules/mpris.awk" diff --git a/.config/waybar/modules/timetracked.sh b/.config/waybar/modules/timetracked.sh deleted file mode 100755 index 4e384bf..0000000 --- a/.config/waybar/modules/timetracked.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -set -e -[ -n "$DEBUG" ] && set -x - -if ! command -v timetrace >/dev/null 2>&1; then - exit 0 -fi - -case "$1" in -on-click) - timetrace status >/dev/null && timetrace stop - exit 0 - ;; - -*) ;; -esac - -while true; do - timetrace status -o json | - jq -c 'if .project == "---" then {} else { text: (["▶", .trackedTimeToday] | join(" ")), class: "timetracked", alt: "timetracked" } end' 2>/dev/null - sleep 30 -done diff --git a/.config/waybar/modules/todo.go b/.config/waybar/modules/todo.go deleted file mode 100755 index 2692ec9..0000000 --- a/.config/waybar/modules/todo.go +++ /dev/null @@ -1,229 +0,0 @@ -#!/usr/bin/env yaegi - -// # Documentation -// we try to read a file pointed to by WAYBAR_TODO_FILE. -// While no particular format is assumed, we recommend -// Markdown. -// We extract the todos from the top-level list items -// (listings start with a `*` character). -// -// # Usage: -// go build -o waybar-todo todo.go -package main - -import ( - "bufio" - "encoding/json" - "log" - "os" - "os/signal" - "regexp" - "runtime" - "strings" - "time" - - "github.com/fsnotify/fsnotify" - "golang.org/x/sys/unix" -) - -const ( - TODO_INACTIVE_STRING string = "" - TODO_LABEL_REGEX string = `\[\[!(.*)\]\]` -) - -var ( - active = true - todofile = os.Getenv("WAYBAR_TODO_FILE") - cookiefile = os.ExpandEnv("${XDG_RUNTIME_DIR}/waybar-todo.cookie") - labelFilter = os.Getenv("WAYBAR_TODO_FILTER") -) - -func printJson(text, tooltip string, class []string, alt string, percentage int) error { - return json.NewEncoder(os.Stdout).Encode(map[string]interface{}{ - "text": text, - "tooltip": tooltip, - "class": class, - "alt": alt, - "percentage": percentage, - }) -} - -type todoItem struct { - text string - label string -} - -func readTodofile2(path string) ([]todoItem, error) { - f, err := os.Open(path) - if err != nil { - return nil, err - } - var todos []todoItem - for lr := bufio.NewScanner(f); lr.Scan(); { - skip := 0 - switch { - case strings.HasPrefix(lr.Text(), "*"): - skip = 2 - case strings.HasPrefix(lr.Text(), "- [ ]"): - skip = 6 - case strings.HasPrefix(lr.Text(), "- [x]"): - fallthrough - default: - continue - } - ti := todoItem{text: lr.Text()[skip:]} - matches := labelre.FindAllStringSubmatch(ti.text, -1) - if matches != nil && len(matches) > 0 { - ti.label = matches[0][1] - ti.text = strings.TrimSpace( - strings.Replace(ti.text, matches[0][0], "", 1)) - } - todos = append(todos, ti) - } - return todos, nil -} - -func setCookie(active bool) error { - if !active { - _, err := os.Create(cookiefile) - return err - } - return os.Remove(cookiefile) -} - -func update() error { - if _, err := os.Stat(cookiefile); err == nil { - log.Printf("cookie set, we're inactive") - active = false - } - if !active { - return printJson(TODO_INACTIVE_STRING, "* inactive *", []string{"off"}, "off", 0) - } - todos, err := readTodofile2(todofile) - if err != nil { - return err - } - var ( - text string - tooltip []string - extraClass string - ) - for _, item := range todos { - if labelFilter != "" && strings.Contains(labelFilter, item.label) { - continue - } - if text == "" { - text = item.text - extraClass = item.label - continue - } - // render out the rest of the todos into the tooltip - tooltip = append(tooltip, item.text) - } - return printJson(text, strings.Join(tooltip, "\n"), []string{"on", extraClass}, "on", 1) -} - -var labelre *regexp.Regexp - -func init() { - labelre = regexp.MustCompile(TODO_LABEL_REGEX) -} - -func main() { - runtime.GOMAXPROCS(1) - - var ( - updateC = make(chan os.Signal, 1) - cancelC = make(chan os.Signal, 1) - ) - signal.Notify(updateC, unix.SIGUSR1, unix.SIGUSR2, unix.SIGHUP) - signal.Notify(cancelC, unix.SIGTERM, unix.SIGINT) - - var err error - // we will receive a SIGTERM if our parent dies - err = unix.Prctl(unix.PR_SET_PDEATHSIG, uintptr(unix.SIGTERM), 0, 0, 0) - if err != nil { - log.Fatalf("error: setting prctl: %v", err) - } - - if todofile == "" { - panic("missing TODO file") - // // get from nb(1) - // nb := exec.Command("sh", "-c", "nb show --no-color --path todo") - // nb_output, err := nb.Output() - // if err != nil { - // e := err.(*exec.ExitError) - // log.Fatalf("error: finding todofile via nb: %s", e.Stderr) - // } - // todofile = strings.TrimSpace(string(nb_output)) - } - - log.Printf("watching %q", todofile) - - w, err := fsnotify.NewWatcher() - if err != nil { - log.Fatalf("error: creating watcher: %v", err) - } - defer w.Close() - - if err := w.Add(todofile); err != nil { - log.Fatalf("error: adding watch: %v", err) - } - - if err := update(); err != nil { - // fail here because it's the first time we - // try to read the todofile. - log.Fatalf("error: %v", err) - } - for { - select { - case evt, ok := <-w.Events: - if !ok { - return - } - // see https://github.com/fsnotify/fsnotify/issues/94 - // https://github.com/gohugoio/hugo/pull/4720 - if evt.Op&fsnotify.Remove == fsnotify.Remove { - counter := 0 - for w.Add(todofile) != nil { - counter++ - if counter >= 1000 { - log.Panic("error: unable to add file watcher") - } - time.Sleep(100 * time.Millisecond) - } - } - goto force_update - case err, ok := <-w.Errors: - if !ok { - return - } - log.Printf("error: from watcher: %v", err) - - case sig := <-updateC: - switch sig { - case unix.SIGUSR1: // on - active = !active - if err := setCookie(active); err != nil { - log.Printf("err: %v", err) - } - goto force_update - case unix.SIGUSR2: // - if strings.Contains(labelFilter, "work") { - labelFilter = strings.Trim(strings.ReplaceAll(labelFilter, "work", ""), ",") - } else { - labelFilter = strings.Join([]string{labelFilter, "work"}, ",") - } - continue - case unix.SIGHUP: // force update - log.Println("force update") - goto force_update - } - case <-cancelC: - log.Printf("%s exiting", os.Args[0]) - os.Exit(0) - } - force_update: - _ = update() - } -} diff --git a/.config/waybar/modules/toggl.lua b/.config/waybar/modules/toggl.lua deleted file mode 100755 index 7c9f0b9..0000000 --- a/.config/waybar/modules/toggl.lua +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env luajit - -TOKEN = os.getenv("TOGGL_TOKEN") -if not TOKEN then - io.stderr:write("need TOGGL_TOKEN\n") - os.exit(1) -end - -function timer_duration() - cmd = string.format('toggl -t %s -j timer ls | jq -r ".[0].duration"', TOKEN) - local f = assert(io.popen(cmd, 'r')) - local s = assert(f:read('*a')) - f:close() - if not (s == '') then - return tonumber(s) - end -end - -unix_time = os.time() - -diff = timer_duration() -if not diff then - os.exit(0) -end - -d = unix_time + diff - -print(string.format('%dh %.2dm', d/(60*60), d/60%60)) diff --git a/.config/waybar/modules/vpn.sh b/.config/waybar/modules/vpn.sh deleted file mode 100755 index c4d50fa..0000000 --- a/.config/waybar/modules/vpn.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -set -e -[ -n "$DEBUG" ] && set -x - -case "$1" in -toggle) exit 1 ;; -esac - -extern_ip=$(curl -SsfL http://api.ipify.org/?format=text) - -vpn_is_up() { - case "$extern_ip" in - 138.201.245.159) return 0 ;; # hetzner node - esac - return 1 -} - -if vpn_is_up; then - printf '{"text": "", "tooltip": "external ip is %s"}\n' "$extern_ip" -else - # printf '{"text": "", "tooltip": "disconnected"}\n' - printf '{}\n' -fi diff --git a/.config/waybar/modules/weather.sh b/.config/waybar/modules/weather.sh deleted file mode 100755 index 929732b..0000000 --- a/.config/waybar/modules/weather.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -set -e -[ -n "$DEBUG" ] && set -x - -loc=$1 -if [ -z "${loc}" ]; then - # use /etc/localtime - # loc=$(basename "$(readlink -f /etc/localtime)") - loc="${HOME_LAT},${HOME_LON}" -fi - -if [ -n "$REPORT" ]; then - curl -s v2.wttr.in/"${loc}"?F | less - exit 0 -fi - -data="$(curl -s wttr.in/"${loc}"?format=j1)" - -class= -case "$(echo "${data}" | jq -r '.current_condition[].weatherCode')" in -113) class="sunny" ;; -116) class="partlycloudy" ;; -119) class="cloudy" ;; -122) class="verycloudy" ;; -143|248|260) class="fog" ;; -176|263|266|293|296|353) class="lightrain" ;; -179|182|185|281|284|311|314|317|350|362|365|374|377) class="hail" ;; -200|386|389|392) class="thunder" ;; -227|320) class="lightsnow" ;; -230|329|332|335|338|371|395) class="heavysnow" ;; -299|302|305|308|356|359): class="heavyrain" ;; -323|326|368) class="snowrain" ;; -esac - -echo "${data}" | jq \ - --raw-output \ - --unbuffered \ - --compact-output \ - --arg class "${class}" \ - --arg tooltip "$(curl -s v2.wttr.in/"${loc}"?ATFQ | tail -n5)" \ - '.current_condition[] | { text: .weatherDesc[0].value, percentage: (.temp_C | tonumber), class: $class, alt: $class, tooltip: ($tooltip) }' - diff --git a/.config/waybar/style.css b/.config/waybar/style.css deleted file mode 100644 index 01a0084..0000000 --- a/.config/waybar/style.css +++ /dev/null @@ -1,390 +0,0 @@ -/* - * vim: fdm=marker fdl=1 - * */ - -/* start flavours */ -@define-color base00 #0c0c0c; -@define-color base01 #db4d6d; -@define-color base02 #5dac81; -@define-color base03 #fad689; -@define-color base04 #58b2dc; -@define-color base05 #69b0ac; -@define-color base06 #70649a; -@define-color base07 #bdc0ba; -@define-color base08 #1c1c1c; -@define-color base09 #cb1b45; -@define-color base0A #86c166; -@define-color base0B #f7d94c; -@define-color base0C #2ea9df; -@define-color base0D #81c7d4; -@define-color base0E #8a6bbe; -@define-color base0F #fffffb; - -* { - font-family: Iosevka Etoile, Sarasa Fixed J, Material Design Icons; - font-size: 9pt; -} -/* end flavours */ - -@define-color accent @base06; -@define-color accentdarker @base0E; -@define-color foreground @base07; -@define-color background @base00; -/* @define-color background rgba(12, 12, 12, 0.96); */ -@define-color dimmed #5e5e5e; -@define-color dimmeddarker #434343; -@define-color urgent @base09; - -* { - border: none; - border-radius: 0; -} - -window#waybar { - background: @background; - color: @foreground; - /* padding: 0 0.3rem; */ -} - -window#waybar.hidden { - opacity: 0; -} - - -#window, -#mode, -#clock, -#battery, -#cpu, -#memory, -#disk, -#temperature, -#backlight, -#idle_inhibitor, -#network, -#pulseaudio, -#wireplumber, -#custom-toggl, -#custom-gammastep, -#custom-weather, -#custom-mpris, -#custom-todo, -#custom-covid, -#custom-timetracked, -#tray { - /* border-top: 1px solid @dimmeddarker; */ - padding: 0 0.1rem; - margin: 0 0.2rem; - color: @dimmed; -} - -#cpu:hover, -#memory:hover, -#backlight:hover, -#idle_inhibitor:hover, -#network:hover, -#network.tailscale:hover, -#pulseaudio:hover, -#wireplumber:hover, -#custom-mpris:hover, -#custom-gammastep:hover, -#custom-todo:hover { - color: @foreground; - transition-property: background; - transition-duration: 0.1s; -} - -#tags button, -#workspaces button { - padding: 0 5px; - background: transparent; - color: @dimmed; - /* border-bottom: 3px solid transparent; */ -} - -#tags button { - color: @dimmeddarker; -} - -#tags button.occupied { - color: @dimmed; -} - -#workspaces button.visible { - color: @dimmeddarker; - background: @accentdarker; -} - -#tags button.focused, -#workspaces button.focused { - font-weight: bold; - color: @foreground; - background: @accent; - transition-property: background; - transition-duration: 0.01s; -} - -#tags button.urgent, -#workspaces button.urgent { - color: @background; - background: @urgent; -} - -#tags button:hover, -#tags button.focused:hover, -#workspaces button:hover, -#workspaces button.focused:hover { - background: @accent; - color: @foreground; - transition-property: background, color; - transition-duration: 0.01s; - - /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ - box-shadow: inherit; - text-shadow: inherit; -} - -#tags button.urgent:hover, -#workspaces button.urgent:hover { - background: @foreground; - transition-property: background; - transition-duration: 0.01s; -} - -#mode { - /* font-style: italic; */ - color: @background; - background: @base03; - margin: 3px 6px; - border-radius: 2px; -} - -#clock {} - -#clock.local { - color: @foreground; -} - -#clock.utc {} - -#disk.root {} - -#disk.home { - /* margin-left: 0; */ - /* padding-left: 0; */ -} - -#battery {} - -#battery.charging { - color: @background; - background: @base0A; -} - -@keyframes blink { - to { - background: @foreground; - color: @background; - } -} - -#battery.critical:not(.charging) { - color: @foreground; - background: @urgent; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; -} - -label:focus { - background: @background; -} - -#cpu {} - -#memory {} - -#backlight {} - -#backlight.off { - color: @dimmed; -} - -#network {} - -#network.disconnected { - border-top: 1px solid @urgent; - color: @dimmed; -} - -#network.tailscale.disabled, -#network.tailscale.disconnected, -#network.mullvad.disabled, -#network.mullvad.disconnected { - border-top: 1px solid @dimmeddarker; -} - -#network.tailscale.ethernet, -#network.tailscale.linked, -#network.mullvad.ethernet, -#network.mullvad.linked { - color: @foreground; - border-top: 1px solid @base0E; -} - -#pulseaudio {} - -#pulseaudio.muted { - border-top: 1px solid @urgent; - color: @dimmed; -} - -#pulseaudio.bluetooth { - border-top: 1px solid @base04; -} - -#wireplumber {} - -#wireplumber.muted { - border-top: 1px solid @urgent; - color: @dimmed; -} - -#wireplumber.bluetooth { - border-top: 1px solid @base04; -} - -#temperature {} - -#temperature.critical { - color: @foreground; - background: @urgent; - border-top: none; -} - -#tray {} - -#idle_inhibitor {} - -#idle_inhibitor.activated { - color: @foreground; - border-top: 1px solid @base02; -} - -#mpris { - color: @foreground; -} - -#mpris.playing, -#mpris.paused { - border-top: 1px solid @base04; -} - -#mpris.paused { - font-style: italic; -} - -#mpris.spotify { - border-top: 1px solid #1db954; -} - -#mpris.mpv { - border-top: 1px solid #8f008f; -} - -#custom-toggl { - color: @foreground; - border-top: 1px solid @urgent; -} - -#custom-todo.off { - color: @dimmed; - border-top: 1px solid @dimmeddarker; - padding: 0 0 0 0.4rem; -} - -#custom-todo.on { - color: @foreground; - border-top: 1px solid @urgent; - font-weight: bold; - padding: 0 0.6rem 0 0.4rem; -} - -#custom-todo.work { - background: @urgent; -} - -#custom-timetracked { - color: @urgent; - border-top: 1px solid @urgent; -} - -@keyframes flash { - 50% { - background: rgba(255, 174, 66, 0.7); - color: @background; - } -} - -#custom-gamma.night { - border-top: 1px solid @base0C; - color: @foreground; - animation-name: flash; - animation-duration: 0.3s; - animation-timing-function: linear; - animation-iteration-count: 1; -} - -#custom-gamma.day { - color: @dimmed; -} - -#custom-gamma.off { - border-top: 1px solid @urgent; - color: @dimmed; -} - -#custom-weather { - color: @dimmed; -} - -#custom-covid.green { - /* border-top: 1px solid #00cc00; */ - /* color: #00cc00; */ -} - -#custom-covid.yellow { - /* border-top: 1px solid #f7dd31; */ - /* color: #f7dd31; */ -} - -#custom-covid.orange { - /* border-top: 1px solid #faa31b; */ - /* color: #faa31b; */ -} - -#custom-covid.red { - /* border-top: 1px solid #f92206; */ - /* color: #f92206; */ -} - -#custom-covid.darkred { - /* border-top: 1px solid #c01a00; */ - /* color: #c01a00; */ -} - -#custom-covid.darkdarkred { - /* border-top: 1px solid #941100; */ - /* color: #941100; */ -} - -#custom-hotspots { - border-top: 1px solid @urgent; - color: @dimmed; -} - -#custom-hotspots.soon { - color: @urgent; -} diff --git a/.config/xdg-desktop-portal-wlr/config b/.config/xdg-desktop-portal-wlr/config deleted file mode 100644 index 5c61177..0000000 --- a/.config/xdg-desktop-portal-wlr/config +++ /dev/null @@ -1,11 +0,0 @@ -[logger] -level=ERROR - -[screencast] -max_fps=30 -chooser_cmd=slurp -f '%o' -o -b '#000000aa' -c '#4E437188' -w 50 -chooser_type=simple -# chooser_cmd=menu -l3 -p xdpw -# chooser_type=dmenu -exec_before=notify-send -a xdpw -i $HOME/Pictures/portal_icon.32x32.svg xdg-desktop-portal 'screencast starting' -exec_after=notify-send -a xdpw -i $HOME/Pictures/portal_icon.32x32.svg xdg-desktop-portal 'screencast ended' diff --git a/.config/xkb/rules/evdev b/.config/xkb/rules/evdev deleted file mode 100644 index 9a403ee..0000000 --- a/.config/xkb/rules/evdev +++ /dev/null @@ -1,5 +0,0 @@ - -! option = symbols - hibiki:intl_tr = +hibiki(intl_tr) - -! include %S/evdev diff --git a/.config/xkb/symbols/hibiki b/.config/xkb/symbols/hibiki deleted file mode 100644 index 23edd64..0000000 --- a/.config/xkb/symbols/hibiki +++ /dev/null @@ -1,10 +0,0 @@ -// https://xkbcommon.org/doc/current/md_doc_user_configuration.html -// https://wiki.archlinux.org/title/X_keyboard_extension - -xkb_symbols "intl_tr" { - key <AC05> { [ g , G , dead_breve ] } ; - key <AB09> { [ period , greater , dead_abovedot ] } ; - key <AC02> { [ s , S , ssharp , dead_cedilla ] } ; - - include "level3(ralt_switch)" -}; diff --git a/.config/yamlfs/.gitattributes b/.config/yamlfs/.gitattributes deleted file mode 100644 index c2e46b3..0000000 --- a/.config/yamlfs/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.yml -whitespace diff --git a/.config/yamlfs/balena.yml b/.config/yamlfs/balena.yml deleted file mode 100644 index 73c39a8..0000000 --- a/.config/yamlfs/balena.yml +++ /dev/null @@ -1,20 +0,0 @@ -docker-compose.yml: |- - version: '2.1' - - services: - build: . - - volumes: - ctr-data: - -Dockerfile.template: |- - # vim: ft=dockerfile - FROM balenalib/%%BALENA_MACHINE_NAME%%-alpine:run - - COPY ./start.sh /usr/local/bin/ - CMD [ "start.sh" ] - -start.sh: |- - #!/bin/sh - set -e - while true; do echo "nothing" && sleep 20s; done diff --git a/.config/yamlfs/generic.yml b/.config/yamlfs/generic.yml deleted file mode 100644 index e097652..0000000 --- a/.config/yamlfs/generic.yml +++ /dev/null @@ -1,75 +0,0 @@ -{% $inbox := default "~robertgzr/public-inbox@lists.sr.ht" .inbox %} -README.md: |- - # {% .name %} - - ## Usage - - ``` - # how do I use it? - ``` - - {% if $inbox -%} - ## Bugs, help, patches? - - Send them to {% printf "[%s](mailto:%s?Subject=[%s]%%20)" $inbox $inbox .name %} - {%- end -%} - -{% if .license %} -LICENSE: |- - {% if eq .license "mit" %} - {% .name %} - Copyright (c) {% .license_year %} {% .license_author %} - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - {% end -%} - {% if eq .license "gpl" -%} - {% .name %} - Copyright © {% .license_year %} {% .license_author %} - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <https://www.gnu.org/licenses/>. - {% end -%} - {% if eq .license "agpl" -%} - {% .name %} - Copyright © {% .license_year %} {% .license_author %} - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - {% end -%} -{% end %} diff --git a/.config/yamlfs/go-full.yaml b/.config/yamlfs/go-full.yaml deleted file mode 100644 index 5728877..0000000 --- a/.config/yamlfs/go-full.yaml +++ /dev/null @@ -1,193 +0,0 @@ -{% $goversion := 1.15 %} -cmd: - {% .name %}: - main.go: | - package main - - func main() { - println("hello world") - } - -version: - version.go: | - package version - - var ( - Package = "{% .gopkg %}" - Revision = "" - Version = "0.0.0+unknown" - ) - -go.mod: | - module {% .gopkg %} - - go {% $goversion %} - -Dockerfile: | - # syntax=docker/dockerfile:1.2 - # vim: ft=dockerfile - - ARG GO_VERSION={% $goversion %} - - FROM --platform=${BUILDPLATFORM:?err} docker.io/tonistiigi/xx:golang AS xx - FROM --platform=${BUILDPLATFORM:?err} docker.io/library/golang:${GO_VERSION:?err}-alpine AS buildenv - COPY --from=xx / / - ARG TARGETPLATFORM - WORKDIR /src - RUN apk --update-cache --no-cache add make - - FROM buildenv AS gotestsum - RUN go get gotest.tools/gotestsum@0.6.0 - - FROM buildenv AS golangcilint - RUN go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.27.0 - - FROM buildenv AS test - COPY --from=gotestsum /go/bin/gotestsum /usr/local/bin/ - COPY --from=golangcilint /go/bin/golangci-lint /usr/local/bin/ - RUN --mount=target=/src,rw \ - --mount=type=cache,target=/go/pkg \ - --mount=type=cache,target=/root/.cache \ - make DESTDIR=/out clean validate test - - FROM buildenv AS build - RUN --mount=target=/src,rw \ - --mount=type=cache,target=/go/pkg \ - --mount=type=cache,target=/root/.cache \ - make DESTDIR=/out clean build - - FROM scratch AS final - COPY --from=build /out/{% .name %} / - - FROM --platform=${TARGETPLATFORM:?err} docker.io/library/alpine:3.11 AS runtime-base - RUN apk --update-cache --no-cache add ca-certificates - - FROM runtime-base AS run - COPY --from=build /out/{% .name %} /usr/local/bin/ - ENTRYPOINT [ "{% .name %}" ] - -Makefile: | - .POSIX: - - all: validate test {% .name %} - - DESTDIR ?= . - PREFIX ?= - VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='+dev' --always --tags) - REVISION ?= $(shell git rev-parse HEAD) - - GO ?= go - GO_PKG ?= {% .gopkg %} - GO_BUILDTAGS ?= netgo osusergo static_build - GO_LDFLAGS ?= -s -w -extldflags "-static" - GO_VERSIONFLAGS = -X $(GO_PKG)/version.Version=$(VERSION) -X $(GO_PKG)/version.Revision=$(REVISION) - - .PHONY: build - build: {% .name %} - {% .name %}: - $(GO) build \ - -tags '$(GO_BUILDTAGS)' -ldflags '$(GO_LDFLAGS) $(GO_VERSIONFLAGS)' \ - -o $(DESTDIR)$(PREFIX)/{% .name %} \ - ./cmd/{% .name %} - - PLATFORM ?= linux/amd64 - REPO ?= {% .name %} - TAG ?= $(VERSION) - - .PHONY: container-build - container-build: - DOCKER_BUILDKIT=1 \ - docker build --platform $(PLATFORM) --target final -o . . - - .PHONY: container-test - container-test: - DOCKER_BUILDKIT=1 \ - docker build --platform $(PLATFORM) --target test -o type=tar,dest=/dev/null . - - .PHONY: container-image - container-image: - DOCKER_BUILDKIT=1 \ - docker build --platform $(PLATFORM) --target run -t $(REPO):$(TAG) . - - .PHONY: cross - cross: - docker run --rm -it --privileged \ - --mount type=bind,src=$(PWD),dst=/src \ - --entrypoint buildctl-daemonless.sh \ - moby/buildkit:latest \ - buildctl build --frontend=dockerfile.v0 \ - --local context=/src --local dockerfile=/src \ - --opt filename=Dockerfile \ - --opt platform=$(PLATFORM) \ - --opt target=run \ - --output type=image,name=$(REPO):$(TAG),push=true - - GOLANGCI_LINT ?= golangci-lint - - .PHONY: validate - validate: - $(GOLANGCI_LINT) run --build-tags "$(GO_BUILDTAGS)" - - GOTEST_FLAGS ?= - ifneq ($(shell which gotestsum),) - GOTEST ?= gotestsum --format=testname -- - else - GOTEST ?= go test - endif - - .PHONY: test - test: - $(GOTEST) \ - -tags '$(GO_BUILDTAGS)' \ - -cover \ - -covermode=atomic \ - $(GOTEST_FLAGS) - - RM ?= rm -f - - .PHONY: clean - clean: - $(RM) {% .name %} - - .PHONY: help - help: - @printf "usage:\n" - @printf "\n" - @printf " build local build\n" - @printf " validate linter\n" - @printf " test tests\n" - @printf " container-build build w/ docker\n" - @printf " container-image image build\n" - @printf " cross build w/ buildkit (multi-platform support)\n" - @printf "\n" - @printf " DESTDIR, PREFIX output location (default: $(DESTDIR)/$(PREFIX))\n" - @printf " PLATFORM output platform (default: $(PLATFORM))\n" - @printf " REPO, TAG image repository:tag (default: $(REPO):$(TAG))\n" - @printf "\n" - -.editorconfig: | - ; http://editorconfig.org/ - - root = true - - [*] - insert_final_newline = true - charset = utf-8 - trim_trailing_whitespace = true - indent_style = space - indent_size = 2 - - [{Makefile,go.mod,go.sum,*go}] - indent_style = tab - indent_size = 8 - - [*.md] - trim_trailing_whitespace = false - - [Dockerfile] - indent_size = 4 - -README.md: | - # {% .name %} - - TODO diff --git a/.config/yamlfs/go.yaml b/.config/yamlfs/go.yaml deleted file mode 100644 index 96f6599..0000000 --- a/.config/yamlfs/go.yaml +++ /dev/null @@ -1,169 +0,0 @@ -{% $man := .man %} -cmd: - {% .name %}: - main.go: | - package main - - func main() { - println("hello world") - } - -version: - version.go: | - package version - - var ( - Package = "{% .pkg %}" - Revision = "-" - Version = "0.0.0+unknown" - ) - -go.mod: | -{% exec "sh" "-c" (printf "cd /tmp/;go mod init %s;cat go.mod;rm go.mod;" .pkg) | indent 4 %} - -Makefile: | - .POSIX: - - DESTDIR ?= . - BINDIR ?= $(PREFIX)/bin - MANDIR ?= $(PREFIX)/share/man - VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='+dev' --always --tags || printf "0.0.0+unknown") - REVISION ?= $(shell git rev-parse HEAD || printf "-") - - GO ?= go - GOLINT ?= $(GO) vet # golangci-lint run --build-tags "$(GO_BUILDTAGS)" - GOTEST ?= $(GO) test # gotestsum --format=testname -- - {% if $man -%} - SCDOC ?= scdoc - {%- end %} - - GO_BUILDTAGS ?= netgo osusergo static_build - GO_LDFLAGS ?= -s -w -extldflags -static - GOTEST_FLAGS ?= - GOLINT_FLAGS ?= - - all: lint test build {% if $man %}man{% end %} - - .PHONY: build - build: {% .name %} - - {% .name %}: GO_PKG = {% .pkg %} - {% .name %}: GO_VERSIONFLAGS += -X $(GO_PKG)/version.Version=$(VERSION) - {% .name %}: GO_VERSIONFLAGS += -X $(GO_PKG)/version.Revision=$(REVISION) - {% .name %}: GO_VERSIONFLAGS += -X $(GO_PKG)/version.Package=$(GO_PKG) - {% .name %}: $(shell find . -name '*.go') - $(GO) build -o $(DESTDIR)$(PREFIX)/$@ -tags '$(GO_BUILDTAGS)' -ldflags '$(GO_LDFLAGS) $(GO_VERSIONFLAGS)' ./cmd/$@ - - .PHONY: lint - lint: - $(GOLINT) $(GOLINT_FLAGS) ./... - .PHONY: validate - validate: lint - - .PHONY: test - test: - $(GOTEST) $(GOTEST_FLAGS) -tags '$(GO_BUILDTAGS)' -cover -covermode=atomic ./... - .PHONY: check - check: test - - {% if $man %} - manpages = doc/{% .name %}.1 - $(manpages): %: %.scd - $(manpages): - $(SCDOC) <$^ >$@ - .PHONY: - man: $(manpages) - - {% end %} - .PHONY: clean - clean: RM ?= rm -f - clean: - $(RM) {% .name %} - - .PHONY: install - install: - mkdir -p $(DESTDIR)$(BINDIR) - {% if $man -%} - mkdir -p $(DESTDIR)$(MANDIR)/man1 - {%- end %} - cp -f {% .name %} $(DESTDIR)$(BINDIR) - {% if $man -%} - cp -f doc/{% .name %}.1 $(DESTDIR)$(MANDIR)/man1 - {%- end %} - - .PHONY: uninstall - uninstall: - rm -v $(DESTDIR)$(BINDIR)/{% .name %} - {% if $man -%} - rm -v $(DESTDIR)$(MANDIR)/man1/{% .name %}.1 - {%- end %} - - .PHONY: help - help: - @printf "Usage:\n" - @printf " build build\n" - @printf " validate linter\n" - @printf " test tests\n" - @printf " (un)install install into system directories\n" - @printf "\n" - @printf " DESTDIR, PREFIX install location\n" - @printf "\n" - -.editorconfig: | - ; http://editorconfig.org/ - - root = true - - [*] - insert_final_newline = true - charset = utf-8 - trim_trailing_whitespace = true - indent_style = space - indent_size = 2 - - [{Makefile,go.mod,go.sum,*go}] - indent_style = tab - indent_size = 4 - - [*.md] - trim_trailing_whitespace = false - - [Dockerfile] - indent_size = 4 - -README.md: | - # {% .name %} - - TODO - -{% if $man %} -doc: - {% .name %}.1.scd: | - {% .name %}(1) - - # NAME - - {% .name %} - TODO - - # SYNOPSIS - - *{% .name %}* [options...] - - # DESCRIPTION - - TODO - - # OPTIONS - - *-h, -help* - Show help message and quit. - - # SEE ALSO - - *{% .name %}*(5) - - # AUTHORS - - Maintained by TODO author <mail>. - For more information, see {% .pkg %}. -{% end %} diff --git a/.config/yamlfs/helm.yml b/.config/yamlfs/helm.yml deleted file mode 100644 index 26a3ac9..0000000 --- a/.config/yamlfs/helm.yml +++ /dev/null @@ -1,397 +0,0 @@ -README.md: |- - # {% .name %} - - ## Configuration - - | Parameter | Default | Description - |-----------|---------|------------ - | replicas | 1 | - | image.repository | | - | image.tag | latest | - | image.pullPolicy | Always | - | service.port | 8080 | - | service.type | ClusterIP | - | service.loadBalancerIP | "" | - | service.annotations | [] | -{%- if .configmap %} - | configmap.config | "" | -{%- end %} - | nodeSelector | {} | - | affinity | {} | - | podAnnotations | {} | - | prometheus.enabled | false | -{%- if .ingress %} - | ingress.enabled | false | - | ingress.annotations | {} | - | ingress.hosts | false | - | ingress.path | / | - | ingress.tls | {} | -{%- end %} -{%- if .pvc %} - | persistence.enabled | false | - | persistence.accessModes | [ReadOnlyOnce] | - | persistence.size | 500Mi | - | persistence.storageClass | "-" | - | persistence.existingClaim | "" | - | persistence.subPath | "" | - | persistence.hostPath | "" | this skips setting up any PVs/PVCs -{%- end %} - | resources.requests.memory | | - | resources.requests.cpu | | - | resources.limits.memory | | - | resources.limits.cpu | | - -.editorconfig: |- - ; http://editorconfig.org/ - - root = true - - [*] - charset = utf-8 - end_of_line = lf - indent_style = space - - [*.yaml] - indent_size = 2 - - [*.md] - trim_trailing_whitespace = false - -Chart.yaml: |- - apiVersion: v1 - name: {% .name %} - version: {% default "0.1.0" .version %} - description: {% default "TODO" .desc %} - home: TODO - icon: TODO - sources: - - TODO - maintainers: - - name: TODO - email: TODO - engine: gotpl - -values.yaml: |- - replicas: 1 - - image: - repository: docker.io/TODO/TODO - tag: latest - pullPolicy: Always - - additionalArgs: [] - - service: - annotations: - # port: 8080 - -{% if .configmap %} - # configmap: - # config: |- - # # TODO -{%- end %} - - nodeSelector: {} - affinity: {} - - podAnnotations: {} - - prometheus: - enabled: false - -{% if .ingress %} - ingress: - enabled: false - # annotations: - # - TODO - # path: / - # hosts: - # - TODO - # tls: -{%- end %} - -{% if .pvc %} - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - enabled: true - - accessModes: - - ReadWriteOnce - - ## Persistent Volume Size - size: 5Gi - - ## Persistent Volume Storage Class - ## If defined, storageClassName: <storageClass> - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - - ## PersistentVolume existing claim name - ## If defined, PVC must be created manually before volume will be bound - ## - existingClaim: "" - - ## Subdirectory of Persistent Volume to mount - ## Useful if the volume's root directory is not empty - ## - subPath: "" - - ## Host directory to mount in to the pod - ## Only use with nodeSelector! - # hostPath: "" -{%- end %} - - ## Configure resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - # resources: - # requests: - # memory: 512Mi - # cpu: 300m - # limits: - # memory: 2Gi - # cpu: 1.0 - -templates: - _helpers.tpl: |- - {{/* vim: set filetype=mustache: */}} - - {{/* - Expand the name of the chart. - */}} - {{- define "{% .name %}.name" -}} - {{- printf "%s" .Chart.Name | trunc 63 | trimSuffix "-" -}} - {{- end -}} - - {{/* - Create a default fully qulified app name. - We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). - */}} - {{- define "{% .name %}.fullname" -}} - {{- $name := default .Chart.Name .Values.nameOverride -}} - {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} - {{- end -}} - - {{/* - Create chart name and version as used by the chart label. - */}} - {{- define "{% .name %}.chart" -}} - {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} - {{- end -}} - - deployment.yaml: |- - apiVersion: apps/v1 - kind: Deployment - metadata: - name: {{ template "{% .name %}.name" . }} - labels: - app.kubernetes.io/name: {{ template "{% .name %}.name" . }} - app: {{ template "{% .name %}.name" . }} - chart: {{ template "{% .name %}.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - spec: - replicas: {{ default 1 .Values.replicas }} - selector: - matchLabels: - app: {{ template "{% .name %}.name" . }} - release: "{{ .Release.Name }}" - template: - metadata: - labels: - app.kubernetes.io/name: {{ template "{% .name %}.name" . }} - app: {{ template "{% .name %}.name" . }} - annotations: - {{- if .Values.prometheus.enabled }} - prometheus.io/scrape: "true" - {{- end }} - {{- if .Values.podAnnotations }} - {{- .Values.podAnnotations | toYaml | indent 8 }} - {{- end }} - spec: - {{- if .Values.nodeSelector }} - nodeSelector: - {{- .Values.nodeSelector | toYaml | trimSuffix "\n" | nindent 8 }} - {{- end }} - {{- if .Values.affinity }} - affinity: - {{- .Values.affinity | toYaml | trimSuffix "\n" | nindent 8 }} - {{- end }} - containers: - - name: {{ template "{% .name %}.fullname" . }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }} - args: - {{- range .Values.additionalArgs }} - - {{ . | quote }} - {{- end }} - ports: - - name: http - containerPort: TODO - # livenessProbe: - # readinessProbe: - env: [] - volumeMounts: -{%- if .pvc %} - - name: {% .name %}-data - mountPath: /data -{%- end %} - {{- if .Values.configmap }} - - name: {% .name %}-config - mountPath: /config - {{- end }} - volumes: -{%- if .pvc %} - - name: {% .name %}-data - {{- if .Values.persistence.enabled }} - {{- if .Values.persistence.hostPath }} - hostPath: - path: {{ .Values.persistence.hostPath | quote }} - type: Directory - {{- else }} - persistentVolumeClaim: - claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "{% .name %}.name" . }}{{- end }} - {{- end }} - {{- else }} - emptyDir: {} - {{- end }} -{%- end %} -{%- if .configmap %} - {{- if .Values.configmap }} - - name: {% .name %}-config - configMap: - name: {{ template "{% .name %}.name" . }}-config - {{- end }} -{%- end %} - resources: - {{- toYaml .Values.resources | indent 10 }} - - svc.yaml: |- - apiVersion: v1 - kind: Service - metadata: - name: {{ template "{% .name %}.name" . }} - labels: - app.kubernetes.io/name: {{ template "{% .name %}.name" . }} - app: {{ template "{% .name %}.name" . }} - chart: {{ template "{% .name %}.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- if .Values.service.annotations }} - annotations: - {{- .Values.service.annotations | toYaml | trimSuffix "\n" | nindent 4 }} - {{- end }} - spec: - {{ $serviceType := default "ClusterIP" .Values.service.type }} - type: {{ $serviceType }} - {{- if eq $serviceType "LoadBalancer" }} - loadBalancerIP: {{ default "" .Values.service.loadBalancerIP }} - {{- end }} - ports: - - name: http - port: {{ default "80" .Values.service.Port }} - targetPort: http - selector: - app: {{ template "{% .name %}.name" . }} - release: "{{ .Release.Name }}" - -{%- if .ingress %} - ingress.yaml: |- - {{- if .Values.ingress.enabled -}} - {{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} - apiVersion: networking.k8s.io/v1beta1 - {{- else -}} - apiVersion: extensions/v1beta1 - {{- end }} - kind: Ingress - metadata: - name: {{ template "{% .name %}.name" . }} - labels: - app.kubernetes.io/name: {{ template "{% .name %}.name" . }} - app: {{ template "{% .name %}.name" . }} - chart: {{ template "{% .name %}.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- if .Values.ingress.annotations }} - annotations: - {{- .Values.ingress.annotations | toYaml | trimSuffix "\n" | nindent 4 }} - {{- end }} - spec: - {{- with .Values.ingress.tls }} - tls: - {{- toYaml . | indent 4 }} - {{- end }} - rules: - {{ $ingressPath := default "/" .Values.ingress.path }} - {{ $fullname := template "{% .name %}.name" . }} - {{- range .Values.ingress.hosts }} - - host: {{ . | quote }} - http: - paths: - - path: {{ $ingressPath }} - backend: - serviceName: {{ $fullname }} - servicePort: http - {{- end }} - {{- end -}} -{%- end %} - -{%- if .pvc %} - pvc.yaml: |- - {{- if .Values.persistence.enabled -}} - {{- if not .Values.persistence.hostPath -}} - {{- if not .Values.persistence.existingClaim -}} - kind: PersistentVolumeClaim - apiVersion: v1 - metadata: - name: {{ template "{% .name %}.name" . }} - labels: - app.kubernetes.io/name: {{ template "{% .name %}.name" . }} - app: {{ template "{% .name %}.name" . }} - chart: {{ template "{% .name %}.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - spec: - accessModes: - {{- range .Values.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - {{- if .Values.persistence.storageClass }} - {{- if (eq "-" .Values.persistence.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ .Values.persistence.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ .Values.persistence.size }} - {{- end -}} - {{- end -}} - {{- end -}} -{%- end %} - -{%- if .configmap %} - configmap.yaml: |- - {{- if .Values.configmap }} - apiVersion: v1 - kind: ConfigMap - metadata: - name: {{ template "{% .name %}.name" . }} - labels: - app.kubernetes.io/name: {{ template "{% .name %}.name" . }} - app: {{ template "{% .name %}.name" . }} - chart: {{ template "{% .name %}.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - data: - {{- .Values.configmap | indent 2 }} - {{- end -}} -{%- end %} - diff --git a/.config/yamlfs/hugo.yml b/.config/yamlfs/hugo.yml deleted file mode 100644 index 8c08066..0000000 --- a/.config/yamlfs/hugo.yml +++ /dev/null @@ -1,194 +0,0 @@ -{% exec git init %} -{% exec hugo new site -f toml %} - -Makefile: |- - repo ?= {% default "TODO" .repo %} - rev ?= $(shell git describe --tags --always --abbrev=7) - - all: clean public/index.html - - public/index.html: - DOCKER_BUILDKIT=1 docker build --platform=linux/amd64 \ - --output=./public \ - --target=final . - - clean: - rm -rf ./public/* - - .PHONY: - all clean - dev - container container-clean push - - dev: - docker image inspect hugo:server >/dev/null || \ - docker build --target=server --tag=hugo:server . - docker run --rm -it \ - --mount type=bind,src=$(PWD),dst=/src,ro \ - --mount type=tmpfs,dst=/src/public \ - --publish 1313:1313 \ - hugo:server - - container: - img build --platform=linux/amd64 --tag=$(repo):$(rev) \ - --target=deploy \ - --no-console . - img tag $(repo):$(rev) $(repo):latest - - container-clean: - img rm $(repo):latest || true - img rm $(repo):$(rev) || true - - push: - img push $(repo):$(rev) - img push $(repo):latest - -Caddyfile: |- - :2015 - root * /public - @index { - path_regexp .*/$ - } - uri_replace @index {path} {path}index.html - try_files {uri} 404.html /404.html - respond /healthz 200 - respond /readyz 200 - encode zstd gzip - file_server - -Dockerfile: |- - FROM docker.io/library/alpine AS hugo - RUN apk add git hugo - - FROM hugo AS dev - WORKDIR /src - ENTRYPOINT [ "hugo" ] - - FROM dev AS build - COPY . . - ARG HUGO_BUILD_ARGS="--cleanDestinationDir" - RUN hugo ${HUGO_BUILD_ARGS} - - FROM scratch AS final - COPY --from=build /src/public /public - - FROM dev AS server - CMD ["server", "--bind=0.0.0.0"] - - FROM scratch AS final - COPY --from=build /src/public/* / - - FROM docker.io/robertgzr/caddy:v2.0.0-beta13 AS caddy - FROM scratch AS deploy - COPY --from=caddy /usr/bin/caddy /caddy - COPY --from=build /src/public /public - COPY ./Caddyfile /Caddyfile - WORKDIR /public - EXPOSE 2015 - ENTRYPOINT ["/caddy", "run", "--config=/Caddyfile"] - -assets: - scss: - main.scss: |- - @import "reset"; - - @import "modules/all"; - - @import "partials/content"; - @import "partials/header"; - @import "partials/footer"; - @import "partials/typo"; - - _reset.scss: |- - html { - font-size: $fs-normal; - } - - * { - box-sizing: border-box; - text-rendering: geometricPrecision; - } - - body { - font-size: $fs-normal; - line-height: 1.5rem; - margin: 0; - font-family: serif; - word-wrap: break-word; - } - - h1, h2, h3, h4, h5, h6 { - line-height: 1.3em; - } - - fieldset { - border: none; - padding: 0; - margin: 0; - } - - pre { - padding: 2rem; - margin: 1.75rem 0; - background-color: white; - border: 1px solid #ccc; - overflow: auto; - } - - pre code, - code[class*="language-"], pre[class*="language-"] { - font-weight: 100; - text-shadow: none; - margin: 1.75rem 0; - } - - a { - cursor: pointer; - text-decoration: none; - } - - modules: - _all.scss: |- - // mixins go here - - @mixin invert() { - filter: hue-rotate(180deg) contrast(100%) invert(100%); - -webkit-filter: hue-rotate(180deg) contrast(100%) invert(100%); - } - @mixin invert_img() { - filter: invert(100%) hue-rotate(180deg) brightness(105%) contrast(85%); - -webkit-filter: invert(100%) hue-rotate(180deg) brightness(105%) contrast(85%); - } - - partials: - _content.scss: |- - // TODO content style - _header.scss: |- - // TODO header style - _footer.scss: |- - // TODO footer style - _typo.scss: |- - // TODO typography style - -layouts/humans.txt: |- - User-agent: * - {{ if (getenv "HUGO_ENV") "production" }} - Disallow: - {{ else }} - Disallow: / - {{ end }} - -static/humans.txt: |- - /* WHAT IS THIS? */ - https://humanstxt.org - - /* AUTHOR */ - Standard: TODO - Email: TODO - - /* SITE */ - Last update:{% printf "%s" time.Now().Format("2006/01/02") %} - Language: English - Doctype:HTML5 - IDE: vim, alacritty - Technologies: hugo, scss, yamlfs, docker diff --git a/.config/yamlfs/meson.yml b/.config/yamlfs/meson.yml deleted file mode 100644 index 4204c86..0000000 --- a/.config/yamlfs/meson.yml +++ /dev/null @@ -1,198 +0,0 @@ -README.md: |- - # {% .name %} - - TODO - -meson.build: |- - project( - '{% .name %}', - 'c', - version: '0.0.0+unknown', - license: 'MIT', - meson_version: '>=0.50.0', - default_options: [ - 'c_std=c99', - 'warning_level=2', - 'werror=true', - ], - ) - - cc = meson.get_compiler('c') - add_project_arguments(cc.get_supported_arguments([ - '-D_POSIX_C_SOURCE 200112L', - - '-Wundef', - '-Wlogical-op', - '-Wmissing-include-dirs', - '-Wold-style-definition', - '-Wpointer-arith', - '-Winit-self', - '-Wfloat-equal', - '-Wstrict-prototypes', - '-Wredundant-decls', - '-Wimplicit-fallthrough=2', - '-Wendif-labels', - '-Wstrict-aliasing=2', - '-Woverflow', - '-Wformat=2', - - '-Wno-missing-braces', - '-Wno-missing-field-initializers', - '-Wno-unused-parameter', - ]), language: 'c') - - version = '"@0@ (" __DATE__ ")"'.format(meson.project_version()) - # embed version sourced from git ref - git = find_program('git', native: true, required: false) - if git.found() - git_commit_hash = run_command([ - git, 'describe', '--always', '--tags' - ]) - git_branch = run_command([ - git, 'rev-parse', '--abbrev-ref', 'HEAD' - ]) - if git_commit_hash.returncode() == 0 and git_branch.returncode() == 0 - version = '"@0@ (" __DATE__ ", branch \'@1@\')"'.format( - git_commit_hash.stdout().strip(), - git_branch.stdout().strip(), - ) - endif - endif - add_project_arguments('-DVERSION=@0@'.format(version), language: 'c') - - {%- if .man %} - - scdoc = dependency( - 'scdoc', - version: '>=1.9.2', - native: true, - required: get_option('man-pages'), - ) - if scdoc.found() - scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true) - sh = find_program('sh', native: true) - mandir = get_option('mandir') - man_files = [ - '{% .name %}.1.scd', - ] - foreach fn : man_files - topic = fn.split('.')[-3].split('/')[-1] - section = fn.split('.')[-2] - output = '@0@.@1@'.format(topic, section) - - custom_target( - output, - input: fn, - output: output, - command: [ - sh, '-c', '@0@ < @INPUT@ > @1@'.format(scdoc_prog.path(), output) - ], - install: true, - install_dir: '@0@/man@1@'.format(mandir, section), - ) - endforeach - endif - {%- end %} - - src_inc = include_directories('include') - src_files = [ - 'src/main.c', - ] - - executable( - meson.project_name(), - files(src_files), - dependencies: [], - include_directories: [src_inc], - install: true, - ) - -{% if (eq .man "true") %} -meson_options.txt: | - option('man-pages', type: 'feature', value: 'auto', description: 'Generate man pages using scdoc') - -{% .name %}.1.scd: | - {% .name %}(1) - - # NAME - - {% .name %} - TODO - - # SYNOPSIS - - *{% .name %}* [options...] - - # DESCRIPTION - - TODO - - # OPTIONS - - *-h, -help* - Show help message and quit. - - # SEE ALSO - - *{% .name %}*(5) - - # AUTHORS - - Maintained by TODO author <mail>. - For more information, see <website>. -{% end %} - -src: - main.c: |- - #define _POSIX_C_SOURCE 200112L - - #include <stdlib.h> - #include <stdio.h> - - #include "{% .name %}.h" - - int main(int argc, char **argv) { - printf("%s version %s\n\n", *argv, VERSION); - - printf("args (len: %d)", argc-1); - for (int i=1; i < argc; ++i) { - printf(" '%s'", argv[i]); - } - printf("\n"); - - return 0; - } - -include: - {% .name | lower %}.h: |- - #ifndef {% .name | upper %}_H - #define {% .name | upper %}_H - - #ifndef VERSION - #define VERSION "0.0.0+unknown" - #endif - - /* TODO */ - - #endif - -.gitignore: |- - build/ - -.editorconfig: |- - ; http://editorconfig.org/ - root = true - - [*] - charset = utf-8 - end_of_line = lf - indent_style = tab - insert_final_newline = true - trim_trailing_whitespace = true - - [*.md] - trim_trailing_whitespace = false - -{% if (eq .docker "true") %} -Dockerfile: |- - TODO -{% end %} diff --git a/.config/youtube-dl.conf b/.config/youtube-dl.conf deleted file mode 100644 index cce5509..0000000 --- a/.config/youtube-dl.conf +++ /dev/null @@ -1,3 +0,0 @@ -#--external-downloader=aria2c -#--external-downloader-args=aria2c:'-c -j 3 -x 3 -s 3 -k 1M' ---output='u_%(uploader)s-%(title)s__%(id)s_%(format)s.%(ext)s' diff --git a/.config/yt-dlp.conf b/.config/yt-dlp.conf deleted file mode 120000 index 6eadbe8..0000000 --- a/.config/yt-dlp.conf +++ /dev/null @@ -1 +0,0 @@ -youtube-dl.conf \ No newline at end of file diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc deleted file mode 100644 index 58ae1e6..0000000 --- a/.config/zathura/zathurarc +++ /dev/null @@ -1,34 +0,0 @@ -set window-title-home-tilde true -set statusbar-basename true -set selection-clipboard clipboard -# set recolor "true" - -set completion-bg "#1c1c1c" -set completion-fg "#d0d0d0" - -set completion-highlight-bg "#5faf00" -set completion-highlight-fg "#1c1c1c" - -set inputbar-bg "#1c1c1c" -set inputbar-fg "#d0d0d0" - -set statusbar-bg "#1c1c1c" -set statusbar-fg "#d0d0d0" - -set recolor-lightcolor "#1c1c1c" -set recolor-darkcolor "#d0d0d0" -set default-bg "#1c1c1c" - -set index-bg "#585858" -set index-fg "#d0d0d0" -set index-active-bg "#1c1c1c" -set index-active-fg "#d0d0d0" - -map P print -map c set recolor -map r reload -map R rotate rotate-ccw -#map n zoom in -#map p zoom out -map M mark_add -map m mark_evaluate |