aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connie.config-waybar-local.conf39
-rw-r--r--crait.config-sway-local.conf2
-rw-r--r--crait.config-waybar-local.conf51
-rw-r--r--dot.config-sway-config37
-rw-r--r--dot.config-swaylock-config2
-rw-r--r--dot.config-systemd-user-wlsunset.service11
-rw-r--r--dot.config-waybar-config65
-rw-r--r--dot.config-waybar-style.css85
-rw-r--r--dot.config-xkb-symbols-de23
-rw-r--r--dot.emacs.d/.gitignore2
-rw-r--r--dot.emacs.d/init.el169
-rw-r--r--dot.gitconfig13
-rw-r--r--dot.gitconfig.delta12
-rwxr-xr-xdot.local-bin-batt2
-rwxr-xr-xdot.local-bin-bt--toggle.sh15
-rwxr-xr-xdot.local-bin-emacsclient--cscope2
-rwxr-xr-xdot.local-bin-nm--tagger93
-rwxr-xr-xdot.local-bin-sm10
-rw-r--r--dot.zshenv2
-rw-r--r--dot.zshrc.from_grml18
-rw-r--r--dot.zshrc.local23
-rw-r--r--naboo.config-sway-local.conf7
22 files changed, 544 insertions, 139 deletions
diff --git a/connie.config-waybar-local.conf b/connie.config-waybar-local.conf
new file mode 100644
index 0000000..8834174
--- /dev/null
+++ b/connie.config-waybar-local.conf
@@ -0,0 +1,39 @@
+{
+ "height": 12,
+ "tray": {
+ "icon-size": 10
+ },
+ "clock": {
+ "format": "{:%Y-%m-%d %T}",
+ "format-alt": "{:%T}"
+ },
+ "modules-right": [
+ "idle_inhibitor",
+ "pulseaudio",
+ "network",
+ "cpu",
+ "memory",
+ "temperature",
+ "backlight",
+ "upower",
+ "clock",
+ "tray",
+ "custom/notification"
+ ],
+ "custom/notification": {
+ "tooltip": false,
+ "format": "{icon}",
+ "format-icons": {
+ "notification": "<span foreground='red'><sup></sup></span>",
+ "none": "",
+ "dnd-notification": "<span foreground='red'><sup></sup></span>",
+ "dnd-none": ""
+ },
+ "return-type": "json",
+ "exec-if": "which swaync-client",
+ "exec": "swaync-client -swb",
+ "on-click": "swaync-client -t -sw",
+ "on-click-right": "swaync-client -d -sw",
+ "escape": true
+ }
+}
diff --git a/crait.config-sway-local.conf b/crait.config-sway-local.conf
new file mode 100644
index 0000000..55d4ab3
--- /dev/null
+++ b/crait.config-sway-local.conf
@@ -0,0 +1,2 @@
+output eDP-1 scale 1.5
+input type:touchpad tap enabled
diff --git a/crait.config-waybar-local.conf b/crait.config-waybar-local.conf
new file mode 100644
index 0000000..3f25620
--- /dev/null
+++ b/crait.config-waybar-local.conf
@@ -0,0 +1,51 @@
+// -*- jsonc -*-
+{
+ "height": 16,
+ "tray": {
+ "icon-size": 14
+ },
+ "clock": {
+ "format-alt": "{:%a %Y-%m-%d %T}",
+ "format": "{:%T}"
+ },
+ "modules-center": [
+ "privacy",
+ "systemd-failed-units",
+ ],
+ "modules-right": [
+ "idle_inhibitor",
+ "power-profiles-daemon",
+ "pulseaudio",
+ "bluetooth",
+ "network",
+ "cpu",
+ "memory",
+ "temperature",
+ "backlight",
+ "battery",
+ "clock",
+ "tray",
+ "custom/notification"
+ ],
+ "custom/notification": {
+ "tooltip": false,
+ "format": "{icon}",
+ "format-icons": {
+ "notification": "<span foreground='red'><sup></sup></span>",
+ "none": "",
+ "dnd-notification": "<span foreground='red'><sup></sup></span>",
+ "dnd-none": ""
+ },
+ "return-type": "json",
+ "exec-if": "which swaync-client",
+ "exec": "swaync-client -swb",
+ "on-click": "swaync-client -t -sw",
+ "on-click-right": "swaync-client -d -sw",
+ "escape": true
+ }
+}
+
+// Local Variables:
+// indent-tabs-mode: nil
+// js-indent-level: 2
+// End:
diff --git a/dot.config-sway-config b/dot.config-sway-config
index 368e866..a7c1dd1 100644
--- a/dot.config-sway-config
+++ b/dot.config-sway-config
@@ -18,7 +18,7 @@ workspace_layout tabbed
floating_modifier $mod
# start a terminal
-bindsym $mod+Return exec kitty-1
+bindsym $mod+Return exec alacritty
# kill focused window
bindsym $mod+Shift+c kill
@@ -26,6 +26,7 @@ bindsym $mod+Shift+c kill
# start rofi (a program launcher)
bindsym $mod+Shift+p exec rofi -show run
bindsym $mod+p exec rofi -show drun
+bindsym $mod+e exec rofimoji
# change focus
bindsym $mod+n focus left
@@ -164,24 +165,16 @@ bar {
}
}
-bindsym XF86MonBrightnessUp exec xbacklight -inc 10
-bindsym XF86MonBrightnessDown exec xbacklight -dec 10
bindsym $mod+Escape exec loginctl lock-session
-bindsym $mod+Shift+Escape exec pkill -u $(id -u) -USR1 swayidle
-#bindsym XF86Sleep exec $lockcommand, exec systemctl suspend
-bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
-bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
-bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
-bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
-#bindsym $mod+F1 exec setxkbmap de bone
-#bindsym $mod+Shift+F1 exec setxkbmap de
-#bindsym $mod+F2 exec setxkbmap de ru
-#bindsym $mod+F3 exec setxkbmap gr
-#bindsym $mod+F4 exec setxkbmap us
+bindsym $mod+Shift+Escape exec sleep 1 && pkill -u $(id -u) -USR1 swayidle
input * {
xkb_layout de,us,de,gr
- xkb_variant bone,,ru,
+ xkb_variant bone_qsx,,ru,
+}
+input "1529:9730:Datalogic_Scanning,_Inc._Point_of_Sale_Handable_Scanner" {
+ xkb_layout de
+ xkb_variant nodeadkeys
}
bindsym $mod+Mod1+space input * xkb_switch_layout next
bindsym $mod+F1 input * xkb_switch_layout 0
@@ -189,15 +182,17 @@ bindsym $mod+F2 input * xkb_switch_layout 1
bindsym $mod+F3 input * xkb_switch_layout 2
bindsym $mod+F4 input * xkb_switch_layout 3
+bindgesture swipe:3:right workspace next
+bindgesture swipe:3:left workspace prev
+bindgesture swipe:4:left exec swaync-client --open-panel
+bindgesture swipe:4:right exec swaync-client --close-panel
+
output * {
- bg ~/Pictures/rainbow_colorful_background_lines_patterns_66008_2560x1440.png fill
+ bg ~/.bg.jpg fill
}
seat * xcursor_theme "Adwaita"
-exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
-exec mako
-exec swayidle -w lock "swaylock -f" before-sleep "loginctl lock-session" timeout 600 'swaymsg "output * dpms off"; loginctl lock-session' resume 'swaymsg "output * dpms on"'
-# Lat/Lon for Aachen
-exec wlsunset -l 50.8 -L 6.1
exec nm-applet --indicator
+
+include '$(/usr/libexec/sway/layered-include "/usr/share/sway/config.d/*.conf" "/etc/sway/config.d/*.conf" "${XDG_CONFIG_HOME:-$HOME/.config}/sway/config.d/*.conf")'
diff --git a/dot.config-swaylock-config b/dot.config-swaylock-config
index dfd94d1..58b3ad5 100644
--- a/dot.config-swaylock-config
+++ b/dot.config-swaylock-config
@@ -1,4 +1,4 @@
-image=~/.i3lock.png
+image=~/.bg.jpg
show-keyboard-layout
indicator-caps-lock
show-failed-attempts
diff --git a/dot.config-systemd-user-wlsunset.service b/dot.config-systemd-user-wlsunset.service
new file mode 100644
index 0000000..e372306
--- /dev/null
+++ b/dot.config-systemd-user-wlsunset.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Day/night gamma adjustments for Sway
+PartOf=graphical-session.target
+After=graphical-session.target
+
+[Service]
+ExecStart=wlsunset -l 50.8 -L 6.1
+Restart=always
+
+[Install]
+WantedBy=graphical-session.target
diff --git a/dot.config-waybar-config b/dot.config-waybar-config
index c5287fc..463b8bc 100644
--- a/dot.config-waybar-config
+++ b/dot.config-waybar-config
@@ -1,17 +1,19 @@
-// -*- javascript -*- vim:ft=javascript sw=4 et
+// -*- jsonc -*- vim:ft=javascript sw=4 et
{
"include": ".config/waybar/local.conf",
+ "reload_style_on_change": true,
"layer": "top", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right)
// "width": 1280, // Waybar width
// Choose the order of the modules
+ "fixed-center": false,
"modules-left": [
"sway/workspaces",
"sway/mode"
// ,
// "custom/media"
],
- "modules-center": ["sway/window"],
+ //"modules-center": ["sway/window"],
// Modules configuration
// "sway/workspaces": {
// "disable-scroll": true,
@@ -65,15 +67,38 @@
}
},
"tray": {
- "spacing": 10
+ "spacing": 10,
+ "show-passive-items": true,
},
"clock": {
"interval": 1,
- "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
+ //"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
+ "tooltip-format": "<tt><small>{calendar}</small></tt>",
+ "calendar": {
+ "mode" : "year",
+ "mode-mon-col" : 3,
+ "weeks-pos" : "right",
+ "on-scroll" : 1,
+ "format": {
+ "months": "<span color='#ffead3'><b>{}</b></span>",
+ "days": "<span color='#ecc6d9'><b>{}</b></span>",
+ "weeks": "<span color='#99ffdd'><b>W{}</b></span>",
+ "weekdays": "<span color='#ffcc66'><b>{}</b></span>",
+ "today": "<span color='#ff6699'><b><u>{}</u></b></span>"
+ }
+ },
+ "actions": {
+ "on-click-right": "mode",
+ "on-scroll-up": "tz_up",
+ "on-scroll-down": "tz_down",
+ "on-scroll-up": "shift_up",
+ "on-scroll-down": "shift_down"
+ },
},
"cpu": {
"format": "{usage}% ",
- "tooltip": false
+ "format-alt": "{load} ",
+ "interval": 5,
},
"memory": {
"format": "{}% "
@@ -143,7 +168,35 @@
"escape": true,
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
// "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
- }
+ },
+ "bluetooth": {
+ "on-click": "blueman-manager",
+ "on-click-right": "$HOME/.local/bin/bt-toggle.sh",
+ "format": "{status} <span style=\"normal\"></span>",
+ "format-on": "{status} <sub>{num_connections}</sub>",
+ "format-connected": "{device_alias} <sub>{num_connections}</sub>",
+ "format-connected-battery": "{device_alias} ({device_battery_percentage}%) <sub>{num_connections}</sub>",
+ "format-device-preference": ["qsx 35", "OpenRun by Shokz"],
+ "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected",
+ "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
+ "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
+ "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%",
+ },
+ "power-profiles-daemon": {
+ "format": "{icon}",
+ "format-icons": {
+ "default": "",
+ "performance": "",
+ "balanced": "",
+ "power-saver": "",
+ },
+ },
+ "privacy": {
+ "icon-size": 14,
+ },
+ "systemd-failed-units": {
+ "format": "✗ {nr_failed}",
+ },
}
// Local Variables:
diff --git a/dot.config-waybar-style.css b/dot.config-waybar-style.css
index 994b09f..403293d 100644
--- a/dot.config-waybar-style.css
+++ b/dot.config-waybar-style.css
@@ -1,8 +1,8 @@
-* {
+button, .module {
border: none;
border-radius: 0;
/* `otf-font-awesome` is required to be installed for icons */
- font-family: "Source Code Pro", "Font Awesome 5 Free";
+ font-family: "Source Code Pro", "Font Awesome 6 Free";
font-size: 12px;
min-height: 0;
}
@@ -68,6 +68,8 @@ window#waybar.chromium {
#clock,
#battery,
+#bluetooth,
+#upower,
#cpu,
#memory,
#disk,
@@ -79,6 +81,9 @@ window#waybar.chromium {
#tray,
#mode,
#idle_inhibitor,
+#power-profiles-daemon,
+#systemd-failed-units,
+#privacy,
#mpd {
padding: 0 10px;
margin: 0 4px;
@@ -104,12 +109,12 @@ window#waybar.chromium {
background-color: #64727D;
}
-#battery {
+#battery, #upower {
background-color: #ffffff;
color: #000000;
}
-#battery.charging, #battery.plugged {
+#battery.charging, #battery.plugged, #upower.charging {
color: #ffffff;
background-color: #26A65B;
}
@@ -126,7 +131,7 @@ window#waybar.chromium {
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
- animation-timing-function: linear;
+ animation-timing-function: steps(12);
animation-iteration-count: infinite;
animation-direction: alternate;
}
@@ -160,6 +165,35 @@ label:focus {
background-color: #f53c3c;
}
+#bluetooth {
+ background-color: rgb(0, 51, 171);
+}
+
+#bluetooth.on {
+ background-color: rgba(0, 51, 171, 0.7);
+}
+
+#bluetooth.disabled, #bluetooth.off {
+ font-style: italic;
+ background-color: rgba(0, 51, 171, 0.4);
+}
+
+#bluetooth.discoverable {
+ animation-name: blink;
+ animation-duration: 0.5s;
+ animation-timing-function: linear;
+ animation-iteration-count: infinite;
+ animation-direction: alternate;
+}
+
+#bluetooth.discovering {
+ animation-name: blink;
+ animation-duration: 2s;
+ animation-timing-function: linear;
+ animation-iteration-count: infinite;
+ animation-direction: alternate;
+}
+
#pulseaudio {
background-color: #f1c40f;
color: #000000;
@@ -196,6 +230,19 @@ label:focus {
background-color: #2980b9;
}
+#tray > .passive {
+ -gtk-icon-effect: dim;
+}
+
+#tray > .needs-attention {
+ -gtk-icon-effect: highlight;
+ background-color: #eb4d4b;
+}
+
+#tray menu * {
+ font: initial;
+}
+
#idle_inhibitor {
background-color: #2d3436;
}
@@ -205,6 +252,21 @@ label:focus {
color: #2d3436;
}
+#power-profiles-daemon.performance {
+ background-color: #f53c3c;
+ color: #ffffff;
+}
+
+#power-profiles-daemon.balanced {
+ background-color: #2980b9;
+ color: #ffffff;
+}
+
+#power-profiles-daemon.power-saver {
+ background-color: #2ecc71;
+ color: #000000;
+}
+
#mpd {
background-color: #66cc99;
color: #2a5c45;
@@ -229,3 +291,16 @@ label:focus {
margin: 0 5px;
min-width: 16px;
}
+
+#privacy {
+ background: white;
+ color: #eb4d4b;
+}
+
+#systemd-failed-units.degraded {
+ background-color: #f53c3c;
+}
+
+#custom-notification {
+ font-family: "Symbols Nerd Font Mono";
+}
diff --git a/dot.config-xkb-symbols-de b/dot.config-xkb-symbols-de
new file mode 100644
index 0000000..e2f7270
--- /dev/null
+++ b/dot.config-xkb-symbols-de
@@ -0,0 +1,23 @@
+// vim:ft=xkb
+
+partial alphanumeric_keys
+xkb_symbols "bone_qsx_base" {
+ include "de(bone_base)"
+
+ key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_WITH_LEVEL5_LOCK";
+ key <KPDL> { [ period, KP_Separator, comma, minutes, KP_Delete, KP_Delete, seconds, NoSymbol ] };
+};
+
+partial alphanumeric_keys modifier_keys keypad_keys
+xkb_symbols "bone_qsx" {
+
+ include "de(bone_qsx_base)"
+
+ name[Group1]= "German (Bone, qsx custom)";
+
+ include "shift(both_capslock)"
+ include "level3(caps_switch)"
+ include "level3(bksl_switch)"
+ include "level5(lsgt_switch_lock)"
+ include "level5(ralt_switch_lock)"
+};
diff --git a/dot.emacs.d/.gitignore b/dot.emacs.d/.gitignore
index 124687e..f7abe26 100644
--- a/dot.emacs.d/.gitignore
+++ b/dot.emacs.d/.gitignore
@@ -18,3 +18,5 @@
/.cask
/projects
/tree-sitter
+/geben
+.dap-breakpoints
diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el
index 992421f..41508c6 100644
--- a/dot.emacs.d/init.el
+++ b/dot.emacs.d/init.el
@@ -52,20 +52,14 @@
(load "server")
(unless (server-running-p) (server-start))
+(setq custom-file (locate-user-emacs-file "custom.el"))
+(load custom-file :noerror)
+
(use-package modus-themes
:defer nil
- :init
- (dolist
- (hash
- '("7613ef56a3aebbec29618a689e47876a72023bbd1b8393efc51c38f5ed3f33d1"
- "c7a926ad0e1ca4272c90fce2e1ffa7760494083356f6bb6d72481b879afce1f2"))
- (add-to-list 'custom-safe-themes hash))
:config
(load-theme 'modus-vivendi-tinted))
-(setq custom-file (locate-user-emacs-file "custom.el"))
-(load custom-file :noerror)
-
(setq display-time-day-and-date t
display-time-24hr-format t)
(display-time-mode)
@@ -119,11 +113,19 @@
:hook ((python-mode python-ts-mode) . lsp))
(use-package pet
:init
- (add-hook 'python-base-mode-hook 'pet-mode -10))
+ (add-hook 'python-base-mode-hook 'pet-mode -10)
+ (add-hook
+ 'python-base-mode-hook
+ (defun qsx-python-pet-hook ()
+ (setq-local lsp-pylsp-server-command (list (pet-executable-find "pylsp"))))))
(use-package highlight-indentation
:hook python-base-mode)
+(use-package jinja2-mode
+ :mode "\\.html.j2\\'"
+ :config (keymap-unset jinja2-mode-map "M-o"))
+
(defun qsx-no-indent-tabs-mode ()
(setq indent-tabs-mode nil))
@@ -146,10 +148,23 @@
:custom
(treesit-auto-install 'prompt)
:config
- (setq treesit-auto-langs (seq-difference treesit-auto-langs '(go gomod yaml)))
+ (setq treesit-auto-langs
+ (seq-difference treesit-auto-langs
+ '(c cpp go gomod yaml php jsdoc phpdoc)))
(treesit-auto-add-to-auto-mode-alist 'all)
(global-treesit-auto-mode))
+(setq
+ treesit-language-source-alist
+ (append treesit-language-source-alist
+ '((astro "https://github.com/virchau13/tree-sitter-astro")
+ (css "https://github.com/tree-sitter/tree-sitter-css")
+ (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src"))))
+
+(use-package astro-ts-mode
+ :mode "\\.astro\\'"
+ :config (keymap-unset astro-ts-mode-map "M-o"))
+
(use-package editorconfig
:defer nil
:config
@@ -162,12 +177,25 @@
(typescript-ts-mode . tide-hl-identifier-mode)))
(use-package lsp-mode
+ :pin melpa-unstable
:commands lsp
:bind-keymap ("s-l" . lsp-command-map)
;; https://emacs-lsp.github.io/lsp-mode/page/performance/
:init
(setq read-process-output-max (* 1024 1024) ;; 1 MiB
- gc-cons-threshold 6400000))
+ gc-cons-threshold 6400000
+ lsp-clients-clangd-args '("--header-insertion=never"))
+ :config
+ (add-to-list 'lsp-language-id-configuration '(LaTeX-mode . "latex"))
+
+ ;; ugly hack to add #'LaTeX-mode
+ ;; TODO: ⛔ Error (use-package): lsp-mode/:config: Symbol’s value as variable is void: lsp-clients-digestif-executable
+ (with-eval-after-load 'lsp-tex
+ (lsp-register-client
+ (make-lsp-client :new-connection (lsp-stdio-connection lsp-clients-digestif-executable)
+ :major-modes '(plain-tex-mode latex-mode context-mode texinfo-mode LaTeX-mode)
+ :priority (if (eq lsp-tex-server 'digestif) 1 -1)
+ :server-id 'digestif))))
(use-package lsp-ui
:commands lsp-ui-mode)
(use-package helm-lsp
@@ -178,11 +206,14 @@
:bind-keymap ("C-c H" . hg-global-map))
(use-package magit
- :bind (("C-x g" . #'magit-status)
- ("C-c m m" . #'magit-status)
- ("C-c m p" . #'magit-dispatch-popup)
- ("C-c m f" . #'magit-file-popup)
- ("C-c m d" . #'magit-diff-buffer-file)))
+ :defer 10)
+(use-package magit-gh
+ :ensure t
+ :after magit)
+
+(use-package info-nav)
+
+(use-package elsqlite)
(use-package transpose-frame
:init
@@ -201,6 +232,10 @@
:bind ("M-o" . ace-window)
:config (setq aw-scope 'frame))
+(use-package mhtml-mode
+ :ensure nil
+ :config (keymap-unset html-mode-map "M-o"))
+
(use-package avy
:bind (("C-." . avy-goto-char-timer)
("C-:" . avy-goto-char-2)
@@ -247,7 +282,7 @@
(setq-default display-line-numbers 'relative)
(use-package stripe-buffer
- :config
+ :init
(defun qsx-stripe-listify-buffer-hook ()
(stripe-listify-buffer))
(dolist (h '(gnus-group-mode-hook
@@ -256,8 +291,7 @@
(add-hook h #'qsx-stripe-listify-buffer-hook)))
(use-package rainbow-delimiters
- :config
- (add-hook 'prog-mode-hook #'rainbow-delimiters-mode-enable))
+ :hook (prog-mode . rainbow-delimiters-mode-enable))
(show-paren-mode 1)
@@ -272,10 +306,22 @@
(highlight-indentation-set-offset yaml-indent-offset)))
(add-hook 'yaml-mode-hook #'qsx-no-indent-tabs-mode))
+(defun qsx-disable-show-trailing-whitespace ()
+ (setq show-trailing-whitespace nil))
+
+(add-hook 'Info-mode-hook #'qsx-disable-show-trailing-whitespace)
+
+(use-package k8s-mode
+ :hook (k8s-mode . yas-minor-mode))
+(use-package kubedoc
+ :hook ((kubedoc-mode . qsx-dont-show-line-numbers-hook)
+ (kubedoc-mode . qsx-disable-show-trailing-whitespace)))
+
(use-package elisp-mode
:ensure nil
:config
- (add-hook 'emacs-lisp-mode-hook #'qsx-no-indent-tabs-mode))
+ (add-hook 'emacs-lisp-mode-hook #'qsx-no-indent-tabs-mode)
+ (add-hook 'lisp-data-mode-hook #'qsx-no-indent-tabs-mode))
(use-package macrostep
:bind (:map emacs-lisp-mode-map
@@ -329,7 +375,7 @@
fill-column 80)
(dolist (f '(qsx-enable-TeX-fold-mode
turn-on-auto-fill
- prettify-symbols-mode))
+ TeX-source-correlate-mode))
(add-hook 'TeX-mode-hook f))
(TeX-add-symbols
'("cref" TeX-arg-ref)
@@ -344,9 +390,20 @@
(use-package reftex
:if (display-graphic-p)
+ :after (tex)
+ :hook (TeX-mode . reftex-mode)
:config
(setq reftex-plug-into-AUCTeX t)
- (add-hook 'TeX-mode-hook #'reftex-mode))
+ (add-hook 'TeX-mode-hook #'reftex-mode)
+ (TeX-add-style-hook
+ "cleveref"
+ (lambda ()
+ (if (boundp 'reftex-ref-style-alist)
+ (add-to-list
+ 'reftex-ref-style-alist
+ '("Cleveref" "cleveref"
+ (("\\cref" ?c) ("\\Cref" ?C) ("\\cpageref" ?d) ("\\Cpageref" ?D)))))
+ (reftex-ref-style-activate "Cleveref"))))
(use-package auctex-latexmk
:if (display-graphic-p)
@@ -360,12 +417,12 @@
(use-package toml-mode)
-(use-package rust-mode
- :hook (rust-mode . lsp)
- :mode "\\.rs\\'")
+(use-package rust-ts-mode
+ :ensure nil
+ :hook (rust-ts-mode . lsp))
;; Add keybindings for interacting with Cargo
(use-package cargo
- :hook (rust-mode . cargo-minor-mode))
+ :hook ((rust-mode rust-ts-mode) . cargo-minor-mode))
(setq c-default-style "linux")
@@ -399,13 +456,15 @@
(setq column-number-mode t)
-(global-set-key (kbd "C-x C-k") #'kill-this-buffer)
+(global-set-key (kbd "C-x C-k") #'kill-current-buffer)
(global-set-key (kbd "C-M-y") #'(lambda ()
(interactive)
(insert (gui-get-primary-selection))))
(use-package org
:ensure nil
+ :init
+ (require 'org-loaddefs)
:config
(add-hook 'org-mode-hook #'turn-on-auto-fill)
(setq org-list-allow-alphabetical t)
@@ -413,7 +472,8 @@
'org-babel-load-languages
'((emacs-lisp . t)
(dot . t)
- (sqlite . t)))
+ (sqlite . t)
+ (plantuml . t)))
(add-to-list
'org-latex-packages-alist
'("AUTO" "polyglossia" t ("xelatex" "lualatex")))
@@ -423,16 +483,17 @@
(add-to-list
'org-latex-packages-alist
'("" "booktabs" nil))
- (add-to-list
- 'org-latex-classes
- '("scrartcl"
- "\\documentclass{scrartcl}"
- ("\\section{%s}" . "\\section*{%s}")
- ("\\subsection{%s}" . "\\subsection*{%s}")
- ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
- ("\\paragraph{%s}" . "\\paragraph*{%s}")
- ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
- (setq org-latex-default-class "scrartcl"))
+ (with-eval-after-load 'ox-latex
+ (add-to-list
+ 'org-latex-classes
+ '("scrartcl"
+ "\\documentclass{scrartcl}"
+ ("\\section{%s}" . "\\section*{%s}")
+ ("\\subsection{%s}" . "\\subsection*{%s}")
+ ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
+ ("\\paragraph{%s}" . "\\paragraph*{%s}")
+ ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
+ (setq org-latex-default-class "scrartcl")))
(setq-default fill-column 80)
@@ -464,7 +525,37 @@
(if (eq window-system 'pgtk)
(pgtk-use-im-context nil)))
+(use-package gnuplot
+ :mode ("\\.gp\\'" . gnuplot-mode)
+ :hook ((gnuplot-comint-mode . qsx-disable-show-trailing-whitespace)))
+
+;; RP PIO
+(progn
+ (define-hostmode poly-pio-hostmode
+ :mode 'asm-mode)
+ (define-innermode poly-pio-c-innermode
+ :mode 'c-mode
+ :head-matcher "^% c-sdk {$"
+ :tail-matcher "^%}$"
+ :head-mode 'host
+ :tail-mode 'host)
+ (define-polymode poly-pio-mode
+ :hostmode 'poly-pio-hostmode
+ :innermodes '(poly-pio-c-innermode))
+ (add-to-list 'auto-mode-alist '("\\.pio\\'" . poly-pio-mode)))
+
+(use-package arduino-mode)
+(use-package arduino-cli-mode)
+
+(use-package gleam-ts-mode
+ :mode (rx ".gleam" eos))
+
;;; Mail
+(use-package notmuch
+ :defer t
+ :ensure nil
+ :hook ((notmuch-hello-mode . qsx-dont-show-line-numbers-hook)))
+
(use-package gnus
:defer t
:config
diff --git a/dot.gitconfig b/dot.gitconfig
index b4342de..303ba93 100644
--- a/dot.gitconfig
+++ b/dot.gitconfig
@@ -1,5 +1,6 @@
[include]
path = ~/.dotfiles/grml-etc-core/etc/skel/.gitconfig
+ path = .gitconfig.delta
[user]
email = qsx@chaotikum.eu
name = Thomas Schneider
@@ -14,17 +15,19 @@
rofl = log --all --graph --format='%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ad%Creset %C(red bold)%d%Creset%s' --date=relative --abbrev-commit --decorate
[push]
default = current
-[instaweb]
- local = true
- httpd = webrick
- port = 64044
- browser = google-chrome
[pull]
ff = only
[sendemail]
bcc = fcc-sent@qsuscs.de
[init]
defaultBranch = main
+[merge]
+ conflictStyle = diff3
+
+[diff]
+ colorMoved = default
+[credential]
+ helper = libsecret
[core]
quotePath = false
commitGraph = true
diff --git a/dot.gitconfig.delta b/dot.gitconfig.delta
new file mode 100644
index 0000000..c27f472
--- /dev/null
+++ b/dot.gitconfig.delta
@@ -0,0 +1,12 @@
+[core]
+ pager = delta
+
+[interactive]
+ diffFilter = delta --color-only
+
+[delta]
+ navigate = true # use n and N to move between diff sections
+
+ # delta detects terminal colors automatically; set one of these to disable auto-detection
+ # dark = true
+ # light = true
diff --git a/dot.local-bin-batt b/dot.local-bin-batt
index 415afba..428112e 100755
--- a/dot.local-bin-batt
+++ b/dot.local-bin-batt
@@ -5,7 +5,7 @@ import datetime
import gi
gi.require_version("UPowerGlib", "1.0")
-from gi.repository import UPowerGlib as upower
+from gi.repository import UPowerGlib as upower # noqa: E402
client = upower.Client.new()
dev = client.get_display_device()
diff --git a/dot.local-bin-bt--toggle.sh b/dot.local-bin-bt--toggle.sh
new file mode 100755
index 0000000..198fcfe
--- /dev/null
+++ b/dot.local-bin-bt--toggle.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+state=$(gdbus call --system --dest org.bluez --object-path /org/bluez/hci0 --method org.freedesktop.DBus.Properties.Get "org.bluez.Adapter1" "Powered")
+case ${state} in
+ "(<false>,)")
+ new="<true>"
+ ;;
+ "(<true>,)")
+ new="<false>"
+ ;;
+ *)
+ exit 1
+esac
+gdbus call --system --dest org.bluez --object-path /org/bluez/hci0 --method org.freedesktop.DBus.Properties.Set "org.bluez.Adapter1" "Powered" $new >/dev/null
diff --git a/dot.local-bin-emacsclient--cscope b/dot.local-bin-emacsclient--cscope
new file mode 100755
index 0000000..8ed71c6
--- /dev/null
+++ b/dot.local-bin-emacsclient--cscope
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec emacsclient -n "$@"
diff --git a/dot.local-bin-nm--tagger b/dot.local-bin-nm--tagger
index c23c277..5c07f6d 100755
--- a/dot.local-bin-nm--tagger
+++ b/dot.local-bin-nm--tagger
@@ -22,8 +22,10 @@ See :py:func:`read_config` for configuration details.
import json
import logging as log
+from os import environ
from pathlib import Path
-import notmuch
+from tqdm import tqdm
+import notmuch2
DEFAULT_CONFIG = {
"folder_separator": ".",
@@ -67,15 +69,8 @@ def read_config():
config_path_base = Path(BaseDirectory.load_first_config("nm-tagger"))
except ImportError:
- from os import environ
-
- config_path_base = environ["XDG_CONFIG_HOME"]
- if config_path_base != "":
- config_path_base = Path(config_path_base)
- else:
- config_path_base = Path.home() / ".config" / "nm-tagger"
- except KeyError:
- config_path_base = Path.home() / ".config" / "nm-tagger"
+ config_home = environ.get("XDG_CONFIG_HOME", Path.home() / ".config")
+ config_path_base = Path(config_home) / "nm-tagger"
config_path = config_path_base / "config.json"
@@ -92,48 +87,48 @@ def read_config():
def main():
"""Entry point"""
- log.basicConfig(format="%(asctime)s %(levelname)s: %(message)s", level=log.DEBUG)
+ log.basicConfig(
+ format="%(asctime)s %(levelname)s: %(message)s",
+ level=environ.get("NM_TAGGER_LOG_LEVEL", log.INFO),
+ )
config = read_config()
- with notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE) as db:
- top = Path(db.get_path())
- log.info("Opened notmuch db at %s", top)
- new_messages_query = notmuch.Query(db, "tag:new")
- log.info("Found %d messages to process", new_messages_query.count_messages())
- new_messages = set(new_messages_query.search_messages())
-
- db.begin_atomic()
-
- for m in new_messages:
- mid = m.get_message_id()
- _paths = {Path(p).relative_to(top) for p in m.get_filenames()}
- if config["folder_separator"] == "#FILESYSTEM#":
- paths = {p.parts[:-2] for p in _paths}
- else:
- paths = {
- p.parent.parent.as_posix().split(config["folder_separator"])
- for p in _paths
- }
- log.debug("paths of %s: (%d) %s", mid, len(paths), str(paths))
- tags = set()
- for _p in paths:
- p = tuple(map(lambda c: config["transforms"].get(c, c), _p))
- tags.add(p[0])
- tags.add(p[-1])
- for c in p[1:-1]:
- if c in config["keep"]:
- tags.add(c)
- log.debug("tags for %s: %s", mid, str(tags))
- try:
- m.freeze()
- for t in tags:
- m.add_tag(t)
- m.remove_tag("new")
- finally:
- m.thaw()
-
- db.end_atomic()
+ with notmuch2.Database(mode=notmuch2.Database.MODE.READ_WRITE) as db:
+ top = db.path
+ mail_root = Path(db.config.get("database.mail_root", top))
+ log.info("Opened notmuch db at %s for mail root %s", top, mail_root)
+ new_messages = db.messages("tag:new", omit_excluded=db.EXCLUDE.FALSE)
+ count = db.count_messages("tag:new", omit_excluded=db.EXCLUDE.FALSE)
+ log.info("Found %d messages to process", count)
+
+ with db.atomic():
+ for m in tqdm(new_messages, total=count):
+ mid = m.messageid
+ _paths = {p.relative_to(mail_root) for p in m.filenames()}
+ if config["folder_separator"] == "#FILESYSTEM#":
+ paths = {p.parts[:-2] for p in _paths}
+ else:
+ paths = {
+ tuple(
+ p.parent.parent.as_posix().split(config["folder_separator"])
+ )
+ for p in _paths
+ }
+ log.debug("paths of %s: (%d) %s", mid, len(paths), str(paths))
+ tags = set()
+ for _p in paths:
+ p = tuple(map(lambda c: config["transforms"].get(c, c), _p))
+ tags.add(p[0])
+ tags.add(p[-1])
+ for c in p[1:-1]:
+ if c in config["keep"]:
+ tags.add(c)
+ log.debug("tags for %s: %s", mid, str(tags))
+ with m.frozen():
+ for t in tags:
+ m.tags.add(t)
+ m.tags.discard("new")
if __name__ == "__main__":
diff --git a/dot.local-bin-sm b/dot.local-bin-sm
index c0fd090..6ac1983 100755
--- a/dot.local-bin-sm
+++ b/dot.local-bin-sm
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
case $(hostname -s) in
- naboo)
+ crait|naboo)
format='%u%r %3n %10d %17f %22F %t %i%S'
;;
*)
@@ -11,13 +11,13 @@ esac
set -x
mbsync -a || true
notmuch new
+notmuch tag -new_cache -- tag:new_cache
[ -d ~/.maildir/GMail ] && (cd ~/.maildir/GMail && gmi sync || true)
-new=$(notmuch search --output=messages tag:new | xargs)
-[ -z "$new" ] && exit
-notmuch config set query.new "$new"
+notmuch tag +new_cache -- tag:new
+[ "$(notmuch count tag:new)" -eq 0 ] && exit
notmuch tag -new -- tag:new and folder:GMail/mail
nm-tagger
export MAILSEQ="${MBLAZE:-$HOME/.mblaze}/seq.sm"
export MBLAZE_PAGER=""
-msearch -- --exclude=false query:new | mthread | mseq -S | mscan -f "$format"
+msearch -- --exclude=false tag:new_cache | mthread | mseq -S | mscan -f "$format"
type mu > /dev/null && mu index || true
diff --git a/dot.zshenv b/dot.zshenv
index 227ed82..3b270a1 100644
--- a/dot.zshenv
+++ b/dot.zshenv
@@ -5,6 +5,7 @@ export PATH=${PATH/::/:}
export GPG_TTY=$(tty)
export EDITOR=emacsclient
export VISUAL=$EDITOR
+export CSCOPE_EDITOR=emacsclient-cscope
path=(
~/Library/Python/*/bin(/N)
~/.gem/ruby/*/bin(/N)
@@ -13,6 +14,7 @@ path=(
${KREW_ROOT:-$HOME/.krew}/bin
~/.cargo/bin(/N)
~/.poetry/bin(/N)
+ ~/.cache/rebar3/bin(/N)
~/.local/bin(/N)
/usr/local/bin(/N)
/usr/local/sbin(/N)
diff --git a/dot.zshrc.from_grml b/dot.zshrc.from_grml
index d9050ca..ac0e43e 100644
--- a/dot.zshrc.from_grml
+++ b/dot.zshrc.from_grml
@@ -1,3 +1,4 @@
+# -*- shell-script -*-
## Settings for umask
if (( EUID == 0 )); then
umask 002
@@ -8,7 +9,20 @@ fi
# Virtualenv support
function virtual_env_prompt () {
- REPLY=${VIRTUAL_ENV+(${VIRTUAL_ENV:t}) }
+ emulate -L zsh
+
+ if (( ${+VIRTUAL_ENV_PROMPT} )); then
+ REPLY="(py:${VIRTUAL_ENV_PROMPT}) "
+ elif (( ${+VIRTUAL_ENV} )); then
+ REPLY="(py:${VIRTUAL_ENV:t}) "
+ elif (( ${+IDF_PYTHON_ENV_PATH} )); then
+ REPLY="(idf:${IDF_PYTHON_ENV_PATH:t}) "
+ fi
+
+ if (( ${+PERL_LOCAL_LIB_ROOT} )); then
+ local -a dirs=( ${(s/:/)PERL_LOCAL_LIB_ROOT} )
+ REPLY+="(pl:${(@j/:/)dirs:t}) "
+ fi
}
grml_theme_add_token virtual-env -f virtual_env_prompt '%F{magenta}' '%f'
zstyle ':prompt:grml:left:setup' items rc virtual-env change-root user at host path vcs percent
@@ -71,4 +85,4 @@ plap() {
else
ls -l ${^path}/*$1*(*N)
fi
-} \ No newline at end of file
+}
diff --git a/dot.zshrc.local b/dot.zshrc.local
index f48bf28..b1c0104 100644
--- a/dot.zshrc.local
+++ b/dot.zshrc.local
@@ -3,7 +3,14 @@
. ~/.zshrc.from_grml
zstyle :prompt:grml:right:setup use-rprompt false
-zstyle :prompt:grml:left:items:percent pre $'\n'
+zstyle :prompt:grml:left:items:shlvl pre $'\n'
+
+function qsx_prompt_shlvl() {
+ if (( SHLVL > 1 )); then
+ REPLY="%F{green}(${SHLVL})%f "
+ fi
+}
+grml_theme_add_token shlvl -i qsx_prompt_shlvl
# With upstream grml config, both path and vcs components of the prompt tokens
# always contain a trailing space, so that 'path vcs percent' is separated by
@@ -30,15 +37,17 @@ function qsx_theme_path() {
grml_theme_add_token path-qsx -f qsx_theme_path '%B' '%b'
local -a items
if zstyle -a :prompt:grml:left:setup items items; then
+ items[-1]="shlvl"
+ items+=("percent")
# find index of "path"
local i=${items[(i)path]}
# if it exists …
if (( ${+items[$i]} )); then
# … replace with our version …
items[$i]="path-qsx"
- # … and apply
- zstyle :prompt:grml:left:setup items ${items}
fi
+ # … and apply
+ zstyle :prompt:grml:left:setup items ${items}
unset i
fi
unset items
@@ -85,8 +94,10 @@ fi
if (( $+commands[rsync] )); then
alias rs="rsync -vahPi"
fi
-gpg-connect-agent /bye
-ssh-add -l
+if ! (( $+_CONTAINERS_USERNS_CONFIGURED )); then
+ gpg-connect-agent /bye
+ ssh-add -l
+fi
function countdown {
ENDTIME=$(date -d "$1" +%s) watch -b -e -n 1 -x sh -c 'DIFF=$(($ENDTIME - $(date +%s))); echo $(($DIFF / 60)) min $(($DIFF % 60)) s; if [ $DIFF -lt 1 ]; then exit 1; fi'
}
@@ -96,3 +107,5 @@ function fspass () {
function passta () {
PASSWORD_STORE_DIR=~/RWTH/AStA/pass pass $@
}
+
+SAVEHIST=100000
diff --git a/naboo.config-sway-local.conf b/naboo.config-sway-local.conf
index 1ac3810..e56b8d1 100644
--- a/naboo.config-sway-local.conf
+++ b/naboo.config-sway-local.conf
@@ -1,3 +1,10 @@
+bindsym $mod+Return exec kitty-1
+exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
+exec mako
+exec swayidle -w lock "swaylock -f" before-sleep "loginctl lock-session" timeout 600 'swaymsg "output * dpms off"; loginctl lock-session' resume 'swaymsg "output * dpms on"'
+# Lat/Lon for Aachen
+exec wlsunset -l 50.8 -L 6.1
+
output * scale 2
output DP-1 pos 0 0
output HDMI-A-1 pos 1920 0