dotfiles.git

commit 6a1e70400db525146a49f2a1b7a7fd9edb321909

Author: Adam <git@apiote.xyz>

various updates

 .config/kak/autoload/syntax/dirty.kak | 0 
 .config/kak/kakrc | 10 
 .config/khal/config | 2 
 .config/khard/khard.conf | 2 
 .config/luakit/userconf.lua | 2 
 .config/sh/functions | 21 ---
 .config/sway/config | 2 
 .config/sway/sway_startup.sh | 7 
 .config/todoman/todoman.conf | 2 
 .config/vdirsyncer/config | 8 
 .config/wezterm/wezterm.lua | 1 
 .local/bin/backup | 56 +++++++--
 .local/bin/pass | 6 +
 .local/share/luakit/forms.lua | 35 ++++++
 .local/share/luakit/styles/dark.css | 2 
 .local/share/qalculate/definitions/datasets.xml | 2 
 .local/share/qalculate/definitions/functions.xml | 2 
 .local/share/qalculate/definitions/units.xml | 103 +++++++++--------
 .local/share/qalculate/definitions/variables.xml | 15 ++
 .ssh/config | 3 


diff --git a/.config/kak/autoload/syntax/dirty.kak b/.config/kak/autoload/syntax/dirty.kak
old mode 100755
new mode 100644




diff --git a/.config/kak/kakrc b/.config/kak/kakrc
index e1e66b054479336723efc4adb7327dd4472098e6..0e42510507608c5df48a9d2aac2d4fe151b77287 100644
--- a/.config/kak/kakrc
+++ b/.config/kak/kakrc
@@ -10,11 +10,11 @@ } defer fzf-file %{
 	set-option global fzf_file_command "fd"
 }
 plug "alexherbo2/prelude.kak"
-#plug "alexherbo2/auto-pairs.kak" defer auto-pairs %{
-#	hook global WinCreate .* %{
-#		auto-pairs-enable
-#	}
-#} demand
+plug "alexherbo2/auto-pairs.kak" defer auto-pairs %{
+	hook global WinCreate .* %{
+		auto-pairs-enable
+	}
+} demand
 plug "TeddyDD/kakoune-edit-or-dir" %{
 	unalias global e edit
 	alias global e edit-or-dir




diff --git a/.config/khal/config b/.config/khal/config
index 483c8ae4cd31f9c63b7e8199bbf6dde5c2f9d733..fcee441d048ff6796340b9a9a1b2b40b3eabad98 100644
--- a/.config/khal/config
+++ b/.config/khal/config
@@ -1,7 +1,7 @@
 [calendars]
 
 [[marvin]]
-path = ~/.calendars/*
+path = ~/.dav/calendars/*
 type = discover
 
 [locale]




diff --git a/.config/khard/khard.conf b/.config/khard/khard.conf
index 58d516ec493a1c3fef223dbf66784835a3921ebd..7241aedddabafbf9b450daec31d30c6302f97b01 100644
--- a/.config/khard/khard.conf
+++ b/.config/khard/khard.conf
@@ -1,6 +1,6 @@
 [addressbooks]
 [[personal]]
-path = ~/.contacts/contacts/
+path = ~/.dav/contacts/4acfb5ff-2f38-add1-7609-d711336c3522/
 
 [general]
 debug = no




diff --git a/.config/luakit/userconf.lua b/.config/luakit/userconf.lua
index d51cc7c499be5298eccb5ec9a0ffc4dd6ba1a493..6d25b22d44451de9ba0affbeb72a5d5a16cabeaf 100644
--- a/.config/luakit/userconf.lua
+++ b/.config/luakit/userconf.lua
@@ -74,7 +74,7 @@ 			v.uri = uri:gsub("www.reddit.com", "libredd.it")
 			return false
 		end
 		if string.match(uri, "twitter.com") then
-			v.uri = uri:gsub("twitter.com", "nitter.skrep.in")
+			v.uri = uri:gsub("twitter.com", "nitter.42l.fr")
 			return false
 		end
 	end




diff --git a/.config/sh/functions b/.config/sh/functions
index 6c8bd98390af8fbd973145a36e5432bf288b8dd2..9ec94ac1a94f9309da23fac569179965a98b5484 100644
--- a/.config/sh/functions
+++ b/.config/sh/functions
@@ -367,32 +367,17 @@ 	fi
 }
 
 backlight() {
-	if [ "$1" = 't' ]
-	then
-		screenOnOff
-		exit 0
-	elif [ "$1" = '-' ]
+	if [ "$1" = '-' ]
 	then
 		cmd='-U'
 	elif [ "$1" = '+' ]
 	then
 		cmd='-A'
 	fi
-	light "$cmd" -s sysfs/backlight/acpi_video0 10
-	light "$cmd" -s sysfs/backlight/acpi_video1 5
-	light -s sysfs/backlight/acpi_video1 -G | cut -d'.' -f1 > /tmp/wob.sock
+	light "$cmd" -s sysfs/backlight/auto 5
+	light -s sysfs/backlight/auto -G | cut -d'.' -f1 > /tmp/wob.sock
 	sleep 1
 	printf '' > /tmp/wob.sock
-}
-
-screenOnOff() {
-	v=$(light -s sysfs/backlight/intel_backlight -G)
-	if [ "$v" = "100.00" ]
-	then
-		light -s sysfs/backlight/intel_backlight -S 0
-	else
-		light -s sysfs/backlight/intel_backlight -S 100
-	fi
 }
 
 streamDwd() {




diff --git a/.config/sway/config b/.config/sway/config
index 910eac01003bd91bf5722357e18ebd0a3f4a23e3..efabdc1b82dde19699904d8217a3d888e024cbc0 100644
--- a/.config/sway/config
+++ b/.config/sway/config
@@ -85,7 +85,7 @@ bindsym XF86AudioMute exec sh -c '. ~/.config/sh/functions; volume t'
 
 bindsym XF86AudioPrev exec playerctl -p $(playerctl -l | tail -n1) previous
 bindsym $mod+p exec playerctl -p $(playerctl -l | tail -n1) previous
-bindsym XF86AudioPlay exec playerctl -p $(playerctl -l | tail -n1) play-pause 
+bindsym XF86AudioPlay exec playerctl -p $(playerctl -l | tail -n1) play-pause
 bindsym $mod+space exec playerctl -p $(playerctl -l | tail -n1) play-pause
 bindsym XF86AudioNext exec playerctl -p $(playerctl -l | tail -n1) next
 bindsym $mod+n exec playerctl -p $(playerctl -l | tail -n1) next




diff --git a/.config/sway/sway_startup.sh b/.config/sway/sway_startup.sh
index cec79579e3f378c1b8def9d4a06c35663dd719ed..6c90bc888326c340ba4d069c0d3c49ee9643341a 100755
--- a/.config/sway/sway_startup.sh
+++ b/.config/sway/sway_startup.sh
@@ -5,7 +5,7 @@ . ~/.config/sh/variables.wayland
 . ~/.config/sh/aliases
 . ~/.config/sh/functions
 
-pgrep lock_listen || ~/.local/bin/lock_listen &
+# pgrep lock_listen || ~/.local/bin/lock_listen &
 pgrep battery_notify || ~/.local/bin/battery_notify &
 
 swaybg -i "$HOME/Pictures/wallpapers/$(hostname).webp" -m fill &
@@ -16,10 +16,8 @@ then
 	while true
 	do
 		cat -u /tmp/wob.sock
-	done | wob -a bottom &
+	done | wob &
 fi) &
-
-# pgrep gammastep || gammastep &
 
 import_gsettings \
     gtk-theme:gtk-theme-name \
@@ -58,3 +56,4 @@ ~/.local/bin/bar_all_once
 
 pipewire &
 pipewire-pulse &
+wireplumber &




diff --git a/.config/todoman/todoman.conf b/.config/todoman/todoman.conf
index b0c980912598d490e2cc43406f4cb03bcb95fc34..edcf55dd915d36db25d122fbf52a1055ccb9f3e9 100644
--- a/.config/todoman/todoman.conf
+++ b/.config/todoman/todoman.conf
@@ -3,4 +3,4 @@ date_format = %F
 time_format = %R
 default_list = Personal
 humanize = True
-path = ~/.calendars/*
+path = ~/.dav/calendars/*




diff --git a/.config/vdirsyncer/config b/.config/vdirsyncer/config
index 63f53fed631fb577352c0c8ad43e62c7b2df143f..b85c107b74df36e100ab25927908e28eb60a4fbb 100644
--- a/.config/vdirsyncer/config
+++ b/.config/vdirsyncer/config
@@ -16,9 +16,9 @@ fileext = ".ics"
 
 [storage mycroft_calendars_remote]
 type = "caldav"
-url = "https://cloud.apiote.xyz/remote.php/dav/"
+url = "https://dav.apiote.xyz/radicale"
 username = "me"
-password.fetch = ["command", "~/.config/vdirsyncer/getpass.sh"]
+password.fetch = ["command", "eeze", "-GlDav", "-f", "password"]
 
 # CARDDAV
 [pair mycroft_contacts]
@@ -33,6 +33,6 @@ fileext = ".vcf"
 
 [storage mycroft_contacts_remote]
 type = "carddav"
-url = "https://cloud.apiote.xyz/remote.php/dav/"
+url = "https://dav.apiote.xyz/radicale"
 username = "me"
-password.fetch = ["command", "~/.config/vdirsyncer/getpass.sh"]
+password.fetch = ["command", "eeze", "-GlDav", "-f", "password"]




diff --git a/.config/wezterm/wezterm.lua b/.config/wezterm/wezterm.lua
index 211683343f5765805bab6f4f24d7d811d8f79114..27455364785cc052d27c78978669814012eacb68 100644
--- a/.config/wezterm/wezterm.lua
+++ b/.config/wezterm/wezterm.lua
@@ -2,6 +2,7 @@ local wezterm = require 'wezterm';
 
 return {
 	font = wezterm.font("Iosevka"),
+	check_for_updates = false,
 	use_fancy_tab_bar = false,
 	tab_bar_at_bottom = true,
 	window_background_opacity = 0.95,




diff --git a/.local/bin/backup b/.local/bin/backup
index 8403f67d1164251e24b8c3f57c9065aaab892174..56496950e7af1e2f78bb8b71d20d7bbc20b59b56 100755
--- a/.local/bin/backup
+++ b/.local/bin/backup
@@ -15,22 +15,52 @@ fi
 
 if [ "$1" = 'daily' ]
 then
-	if [ "$(id -u)" -eq 0 ]
-	then
-		printf "don’t run as root"
-		exit 1
-	fi
 	case "$(hostname)" in
 		Mycroft)
-			[ -f /run/user/1000/keybase/keybased.pid ] || keybase service &
-			[ -d /keybase/ ] || kbfsfuse &
-			sleep 10
+			if [ "$(id -nu)" != 'adam' ]
+			then
+				printf "run as adam"
+				exit 1
+			fi
 
-			cp -PpRu ~/Code/ /keybase/private/bquiet/backup/mycroft/
-			cp -PpRu ~/Documents/ /keybase/private/bquiet/backup/mycroft/
-			cp -PpRu ~/Downloads/ /keybase/private/bquiet/backup/mycroft/
-			cp -PpRu ~/Pictures/ /keybase/private/bquiet/backup/mycroft/
-			cp -PpRu ~/Templates/ /keybase/private/bquiet/backup/mycroft/
+			name="backup_$(date '+%Y%m%dT%H%M')"
+
+			[ -f /run/user/1000/keybase/keybased.pid ] || keybase service >/dev/null 2>&1 &
+			[ -d /keybase/ ] || kbfsfuse >/dev/null 2>&1 &
+			while ! cd /keybase 2>/dev/null
+			do
+				sleep 2
+			done
+			cd
+
+			find /keybase/private/bquiet/backup/mycroft/ -type f -iname 'backup_*.tar' -mtime '+6' -exec rm {} \;
+
+			# git-remotes in ~/Code/dwd
+			xbps-query -m >/tmp/world
+			tar cPlf "/keybase/private/bquiet/backup/mycroft/${name}.tar" --exclude dwd ~/Code/ ~/Documents/ ~/Downloads/ ~/Pictures/ ~/Templates/ /var/service/ /etc/sv/ /etc/connman/ /etc/doas.conf /etc/doh /etc/elogind/ /etc/fido_keys /etc/udev /etc/udisks2/ /etc/sysctl.conf /etc/hostname /tmp/world
+		;;
+		DeepThought)
+			if [ "$(id -nu)" != 'backup' ]
+			then
+				printf "run as backup"
+				exit 1
+			fi
+
+			set -x
+			date
+			name="backup_$(date '+%Y%m%dT%H%M')"
+			cmd="$1"
+
+			infraFiles=$(doas -u infra /home/infra/backup "$cmd")
+			wwwFiles=$(doas -u www /var/www/backup "$cmd")
+
+			if [ -z "$cmd" ]
+			then
+				find /keybase/private/bquiet/backup/deepthought/ -type f -iname 'backup_*.tar' -mtime '+6' -exec rm {} \;
+
+				#shellcheck disable=SC2086
+				tar -cPlf "/keybase/private/bquiet/backup/deepthought/${name}.tar" backup $infraFiles $wwwFiles
+			fi
 		;;
 	esac
 	exit 0




diff --git a/.local/bin/pass b/.local/bin/pass
old mode 100644
new mode 100755
index 6dbbae035dd088bebb6066d4671536f6753b792a..8a96890ca628ab4df76a7faf88164f85de82d8ee
--- a/.local/bin/pass
+++ b/.local/bin/pass
@@ -42,6 +42,9 @@ 		git push
 		cd ~/Code/current/joeblack || exit 0
 		echo '# syncing Joe Black'
 		./encode
+		git add payload
+		git commit -m "$(date '+%Y%m%dT%H%M')"
+		git push
 		;;
 	'new')
 		shift
@@ -78,6 +81,9 @@
 		cd ~/Code/current/joeblack || exit 0
 		echo '# syncing Joe Black'
 		./encode
+		git add payload
+		git commit -m "$(date '+%Y%m%dT%H%M')"
+		git push
 		;;
 	*)
 		echo 'pass (sync|new) [options]'




diff --git a/.local/share/luakit/forms.lua b/.local/share/luakit/forms.lua
index e2db1ef7cfad2c31daf7289fcee6207f536e4ae9..39f04ccc2d36ee23c2ef07a34338a61e6219b9d2 100644
--- a/.local/share/luakit/forms.lua
+++ b/.local/share/luakit/forms.lua
@@ -183,3 +183,38 @@     autofill = true,
   },
 }
 
+on 'https://money%.apiote%.xyz/login' {
+  form {
+    method = 'post',
+    action = 'https://money.apiote.xyz/login',
+    input {
+      name = 'email', type = 'email', 
+      value = 'firefly@apiote.xyz',
+    },
+    input {
+      name = 'password', type = 'password', 
+      value = nextpass('Firefly III', 'firefly@apiote.xyz'),
+    },
+    input {
+      name = 'remember', type = 'checkbox', 
+      checked = false,
+    },
+    submit = true,
+    autofill = true,
+  },
+}
+on 'https://monitoring%.apiote%.xyz/login' {
+  form {
+    input {
+      name = 'user', 
+      value = 'me',
+    },
+    input {
+      id = 'current-password', name = 'password', type = 'password', 
+      value = nextpass('Grafana', 'me'),
+    },
+    submit = true,
+    autofill = true,
+  },
+}
+




diff --git a/.local/share/luakit/styles/dark.css b/.local/share/luakit/styles/dark.css
index 7d3ff57a177f3e44a4f048106972dadef119b9dc..f54793d842cc36aa4543f8045d9bd308c1fa5c21 100644
--- a/.local/share/luakit/styles/dark.css
+++ b/.local/share/luakit/styles/dark.css
@@ -8,7 +8,7 @@ */
 
 @namespace url(http://www.w3.org/1999/xhtml);
 
-@-moz-document regexp("https?://(?!(lists.sr.ht|git.sr.ht|sr.ht|webmail.migadu.com|apiote.xyz|rss.apiote.xyz|honk.apiote.xyz|amuse.apiote.xyz|funk.apiote.xyz|cloud.apiote.xyz|asgard.apiote.xyz|monitoring.apiote.xyz|docs.apiote.xyz|house.apiote.xyz|rain.apiote.xyz|ci.apiote.xyz|deepthought)).*"), url-prefix(ftp://), url-prefix(file://), url-prefix(about:), url-prefix(javascript), url(about:blank), url-prefix("about:neterror") {
+@-moz-document regexp("https?://(?!(lists.sr.ht|git.sr.ht|sr.ht|webmail.migadu.com|apiote.xyz|rss.apiote.xyz|honk.apiote.xyz|amuse.apiote.xyz|funk.apiote.xyz|cloud.apiote.xyz|asgard.apiote.xyz|monitoring.apiote.xyz|docs.apiote.xyz|house.apiote.xyz|rain.apiote.xyz|ci.apiote.xyz|kine.apiote.xyz|deepthought)).*"), url-prefix(ftp://), url-prefix(file://), url-prefix(about:), url-prefix(javascript), url(about:blank), url-prefix("about:neterror") {
 
 /* Firefox Scrollbars */
 scrollbar {opacity: .75 !important;}




diff --git a/.local/share/qalculate/definitions/datasets.xml b/.local/share/qalculate/definitions/datasets.xml
index 87bb5263d95078f5ddb0e8ecc601b13ab47d4129..343933705343562d1a69fce5465ea6106a5e2ddf 100644
--- a/.local/share/qalculate/definitions/datasets.xml
+++ b/.local/share/qalculate/definitions/datasets.xml
@@ -1,2 +1,2 @@
 <?xml version="1.0"?>
-<QALCULATE version="3.20.1"/>
+<QALCULATE version="4.5.1"/>




diff --git a/.local/share/qalculate/definitions/functions.xml b/.local/share/qalculate/definitions/functions.xml
index 87bb5263d95078f5ddb0e8ecc601b13ab47d4129..343933705343562d1a69fce5465ea6106a5e2ddf 100644
--- a/.local/share/qalculate/definitions/functions.xml
+++ b/.local/share/qalculate/definitions/functions.xml
@@ -1,2 +1,2 @@
 <?xml version="1.0"?>
-<QALCULATE version="3.20.1"/>
+<QALCULATE version="4.5.1"/>




diff --git a/.local/share/qalculate/definitions/units.xml b/.local/share/qalculate/definitions/units.xml
index 3c60762bb7c4e7a475462d1879196fc872c7046c..3bc4eb85957da24894284463b6f1bc88eb16a58d 100644
--- a/.local/share/qalculate/definitions/units.xml
+++ b/.local/share/qalculate/definitions/units.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<QALCULATE version="3.20.1">
+<QALCULATE version="4.5.1">
   <category>
     <title>Temperature</title>
     <deactivate>oC</deactivate>
@@ -46,6 +46,30 @@       ar:°V,ar:oV,conveniens,p:convenienses
       <base>
         <unit>Cg</unit>
         <relation>(\x * 720) + 393984</relation>
+        <exponent>1</exponent>
+      </base>
+    </unit>
+  </category>
+  <category>
+    <title>Area</title>
+    <activate>a</activate>
+    <unit type="composite">
+      <system>TGM</system>
+      <use_with_prefixes>false</use_with_prefixes>
+      <title>Square Grafut</title>
+      <names>r:sqg</names>
+      <part>
+        <unit>Gf</unit>
+        <exponent>2</exponent>
+      </part>
+    </unit>
+    <unit type="alias">
+      <system>TGM</system>
+      <use_with_prefixes>false</use_with_prefixes>
+      <names>Surf,p:Surfs,ar:Sf</names>
+      <base>
+        <unit>sqg</unit>
+        <relation>1</relation>
         <exponent>1</exponent>
       </base>
     </unit>
@@ -412,29 +436,6 @@       
     </unit>
   </category>
   <category>
-    <title>Area</title>
-    <unit type="composite">
-      <system>TGM</system>
-      <use_with_prefixes>false</use_with_prefixes>
-      <title>Square Grafut</title>
-      <names>r:sqg</names>
-      <part>
-        <unit>Gf</unit>
-        <exponent>2</exponent>
-      </part>
-    </unit>
-    <unit type="alias">
-      <system>TGM</system>
-      <use_with_prefixes>false</use_with_prefixes>
-      <names>Surf,p:Surfs,ar:Sf</names>
-      <base>
-        <unit>sqg</unit>
-        <relation>1</relation>
-        <exponent>1</exponent>
-      </base>
-    </unit>
-  </category>
-  <category>
     <title>Force</title>
     <unit type="composite">
       <system>TGM</system>
@@ -750,6 +751,33 @@         1
         <exponent>1</exponent>
       </base>
     </unit>
+    <category>
+      <title>Luminous Intensity</title>
+      <unit type="composite">
+        <system>TGM</system>
+        <use_with_prefixes>false</use_with_prefixes>
+        <title>Lypov per QuariSurf</title>
+        <names>r:LppqSf</names>
+        <part>
+          <unit>Lp</unit>
+          <exponent>1</exponent>
+        </part>
+        <part>
+          <unit>qSf</unit>
+          <exponent>-1</exponent>
+        </part>
+      </unit>
+      <unit type="alias">
+        <system>TGM</system>
+        <use_with_prefixes>false</use_with_prefixes>
+        <names>QuaraLyde,p:QuaraLydes,ar:QLd</names>
+        <base>
+          <unit>LppqSf</unit>
+          <relation>1</relation>
+          <exponent>1</exponent>
+        </base>
+      </unit>
+    </category>
     <unit type="composite">
       <system>TGM</system>
       <use_with_prefixes>false</use_with_prefixes>
@@ -796,33 +824,6 @@         false
         <names>Lyde,p:Lydes,ar:Ld</names>
         <base>
           <unit>LppSf</unit>
-          <relation>1</relation>
-          <exponent>1</exponent>
-        </base>
-      </unit>
-    </category>
-    <category>
-      <title>Luminous Intensity</title>
-      <unit type="composite">
-        <system>TGM</system>
-        <use_with_prefixes>false</use_with_prefixes>
-        <title>Lypov per QuariSurf</title>
-        <names>r:LppqSf</names>
-        <part>
-          <unit>Lp</unit>
-          <exponent>1</exponent>
-        </part>
-        <part>
-          <unit>qSf</unit>
-          <exponent>-1</exponent>
-        </part>
-      </unit>
-      <unit type="alias">
-        <system>TGM</system>
-        <use_with_prefixes>false</use_with_prefixes>
-        <names>QuaraLyde,p:QuaraLydes,ar:QLd</names>
-        <base>
-          <unit>LppqSf</unit>
           <relation>1</relation>
           <exponent>1</exponent>
         </base>




diff --git a/.local/share/qalculate/definitions/variables.xml b/.local/share/qalculate/definitions/variables.xml
index 87bb5263d95078f5ddb0e8ecc601b13ab47d4129..a75a42100ce214315dd57902612c281ed4520605 100644
--- a/.local/share/qalculate/definitions/variables.xml
+++ b/.local/share/qalculate/definitions/variables.xml
@@ -1,2 +1,15 @@
 <?xml version="1.0"?>
-<QALCULATE version="3.20.1"/>
+<QALCULATE version="4.5.1">
+  <category>
+    <title>Unknowns</title>
+    <deactivate>x</deactivate>
+  </category>
+  <category>
+    <title>Temporar</title>
+    <variable>
+      <title>""</title>
+      <names>a:x</names>
+      <value>1</value>
+    </variable>
+  </category>
+</QALCULATE>




diff --git a/.ssh/config b/.ssh/config
index 83ce3b1237572e71e32602f18b8ee08735ba783c..8ad39b173701124d25da291f22efe136d94e544f 100644
--- a/.ssh/config
+++ b/.ssh/config
@@ -10,6 +10,9 @@ 	IdentityFile ~/.ssh/glados
 Host deepthought
 	User adam
 	IdentityFile ~/.ssh/deepthought
+Host polluks.cs.put.poznan.pl
+	User inf122446
+	IdentityFile ~/.ssh/polluks
 Host apiote.xyz
 	User adam
 	IdentityFile ~/.ssh/deepthought