Compare commits

...

3 commits

Author SHA1 Message Date
1861aa7cf8 *: update for arch again 2025-11-14 01:22:24 +03:00
321aa0c44f Merge remote-tracking branch 'origin/master' into arch 2025-11-14 00:31:31 +03:00
4d1a6396e7 emacs: update sqrt-index
Some checks failed
Update Site / trigger_update (push) Has been cancelled
2025-11-12 23:37:47 +03:00
30 changed files with 232 additions and 273 deletions

View file

@ -1,24 +1,23 @@
# decorations = "none" # [[file:../../Console.org::*Alacritty][Alacritty:1]]
[colors.bright] [colors.bright]
black = "#484848" black = "#484848"
blue = "#cbcfff" red = "#d00000"
cyan = "#88c8ff" green = "#008900"
green = "#8adf80" yellow = "#808000"
magenta = "#df8fff" blue = "#0000ff"
red = "#ff8f88" magenta = "#dd22dd"
cyan = "#008899"
white = "#ffffff" white = "#ffffff"
yellow = "#fac200"
[colors.normal] [colors.normal]
black = "#222222" black = "#222222"
blue = "#375cd8"
cyan = "#1f6fbf"
green = "#217a3c"
magenta = "#ba35af"
red = "#cc3333" red = "#cc3333"
white = "#fff8f0" green = "#217a3c"
yellow = "#8a5d00" yellow = "#8a5d00"
blue = "#375cd8"
magenta = "#ba35af"
cyan = "#1f6fbf"
white = "#fff8f0"
[colors.primary] [colors.primary]
background = "#fff8f0" background = "#fff8f0"
@ -150,3 +149,4 @@ x = 0
y = 0 y = 0
[keyboard] [keyboard]
# Alacritty:1 ends here

View file

@ -1,7 +1,9 @@
[flags] [flags]
hide_table_gap = true # Remove space in tables hide_table_gap = true # Remove space in tables
color = "default-light"
process_command = true process_command = true
[styles]
theme = "default-light"
[processes] [processes]
columns = ["PID", "State", "Name", "CPU%", "Mem%", "R/s", "W/s", "User"] columns = ["PID", "State", "Name", "CPU%", "Mem%", "R/s", "W/s", "User"]

View file

@ -53,7 +53,7 @@
### Misc/Advanced ### ### Misc/Advanced ###
dmenu = /usr/bin/dmenu -p dunst: dmenu = /usr/bin/dmenu -p dunst:
browser = /home/pavel/.guix-extra-profiles/browsers/browsers/bin/firefox browser = /user/bin/firefox
always_run_script = true always_run_script = true
title = Dunst title = Dunst
class = Dunst class = Dunst
@ -69,15 +69,16 @@
mouse_middle_click = do_action mouse_middle_click = do_action
mouse_right_click = close_all mouse_right_click = close_all
[experimental] ### Shortcuts
per_monitor_dpi = false
[shortcuts]
close = ctrl+space close = ctrl+space
close_all = ctrl+shift+space close_all = ctrl+shift+space
history = ctrl+grave history = ctrl+grave
context = ctrl+shift+period context = ctrl+shift+period
[experimental]
per_monitor_dpi = false
[urgency_low] [urgency_low]
background = "#f6ece8" background = "#f6ece8"
frame_color = "#baafba" frame_color = "#baafba"

View file

@ -1,3 +1,4 @@
arch = [ arch = [
"firefox-tridactyl",
"firefox", "firefox",
"ungoogled-chromium-bin",] "ungoogled-chromium-bin",]

View file

@ -28,6 +28,7 @@ arch = [
"tmux", "tmux",
"starship", "starship",
"nushell", "nushell",
"atuin",
"shell-color-scripts-git", "shell-color-scripts-git",
"fish", "fish",
"xorg-xhost", "xorg-xhost",

View file

@ -8,12 +8,13 @@ arch = [
"libva-intel-driver", "libva-intel-driver",
"zram-generator", "zram-generator",
"yadm", "yadm",
"wpa_supplicant", "wireplumber",
"wireless_tools", "wireless_tools",
"wget", "wget",
"xterm", "xterm",
"vim", "vim",
"smartmontools", "smartmontools",
"sof-firmware",
"pipewire-jack", "pipewire-jack",
"pipewire-pulse", "pipewire-pulse",
"pipewire-alsa", "pipewire-alsa",
@ -34,4 +35,5 @@ arch = [
"grub", "grub",
"decman", "decman",
"base-devel", "base-devel",
"base",] "base",
"amneziavpn-bin",]

View file

@ -180,11 +180,6 @@ radius = 0.0
; Global bar config:2 ends here ; Global bar config:2 ends here
; [[file:../../Desktop.org::*Global bar config][Global bar config:3]] ; [[file:../../Desktop.org::*Global bar config][Global bar config:3]]
; font-0 = ${env:FONT0:pango:monospace:size=10;1}
; font-1 = ${env:FONT1:NotoEmoji:scale=10:antialias=false;0}
; font-2 = ${env:FONT2:fontawesome:pixelsize=10;1}
; font-3 = ${env:FONT3:JetBrains Mono Nerd Font:monospace:size=10;1}
font-0 = pango:monospace:size=13;2 font-0 = pango:monospace:size=13;2
font-1 = NotoEmoji:scale=10:antialias=false;1 font-1 = NotoEmoji:scale=10:antialias=false;1
font-2 = fontawesome:pixelsize=13;3 font-2 = fontawesome:pixelsize=13;3

View file

@ -39,13 +39,13 @@ palette = {
# 'background': '#282a36', # 'background': '#282a36',
'background-alt': "#f6ece8", 'background-alt': "#f6ece8",
# 'background-alt': '#282a36', # 'background-alt': '#282a36',
'background-attention': "#ff8f88", 'background-attention': "#d00000",
# 'background-attention': '#181920', # 'background-attention': '#181920',
'border': "#baafba", 'border': "#baafba",
# 'border': '#282a36', # 'border': '#282a36',
'current-line': "#5f5f5f", 'current-line': "#9da4b3",
# 'current-line': '#44475a', # 'current-line': '#44475a',
'selection': "#5f5f5f", 'selection': "#9da4b3",
# 'selection': '#44475a', # 'selection': '#44475a',
'foreground': "#222222", 'foreground': "#222222",
# 'foreground': '#f8f8f2', # 'foreground': '#f8f8f2',
@ -61,7 +61,7 @@ palette = {
# 'green': '#50fa7b', # 'green': '#50fa7b',
'orange': "#8f5a3a", 'orange': "#8f5a3a",
# 'orange': '#ffb86c', # 'orange': '#ffb86c',
'pink': "#df8fff", 'pink': "#dd22dd",
# 'pink': '#ff79c6', # 'pink': '#ff79c6',
'purple': "#6052cf", 'purple': "#6052cf",
# 'purple': '#bd93f9', # 'purple': '#bd93f9',

View file

@ -9,12 +9,12 @@
cyan: #1f6fbf; cyan: #1f6fbf;
white: #fff8f0; white: #fff8f0;
light-black: #484848; light-black: #484848;
light-red: #ff8f88; light-red: #d00000;
light-green: #8adf80; light-green: #008900;
light-yellow: #fac200; light-yellow: #808000;
light-blue: #cbcfff; light-blue: #0000ff;
light-magenta: #df8fff; light-magenta: #dd22dd;
light-cyan: #88c8ff; light-cyan: #008899;
light-white: #ffffff; light-white: #ffffff;
@ -25,8 +25,8 @@
border-color: #baafba; border-color: #baafba;
selected-normal-background: #375cd8; selected-normal-background: #375cd8;
selected-normal-foreground: #fff8f0; selected-normal-foreground: #fff8f0;
selected-active-background: #cbcfff; selected-active-background: #0000ff;
selected-active-foreground: #222222; selected-active-foreground: #fff8f0;
selected-urgent-background: #cc3333; selected-urgent-background: #cc3333;
selected-urgent-foreground: #fff8f0; selected-urgent-foreground: #fff8f0;
normal-foreground: @foreground; normal-foreground: @foreground;
@ -37,8 +37,8 @@
urgent-background: @background; urgent-background: @background;
alternate-normal-background: #f6ece8; alternate-normal-background: #f6ece8;
alternate-normal-foreground: @foreground; alternate-normal-foreground: @foreground;
alternate-active-background: #222222; alternate-active-background: #fff8f0;
alternate-active-foreground: #cbcfff; alternate-active-foreground: #0000ff;
alternate-urgent-background: #fff8f0; alternate-urgent-background: #fff8f0;
alternate-urgent-foreground: #cc3333; alternate-urgent-foreground: #cc3333;
spacing: 2; spacing: 2;

View file

@ -592,11 +592,12 @@ _d_: Discord
(defun my/exwm-init () (defun my/exwm-init ()
(exwm-workspace-switch 1) (exwm-workspace-switch 1)
(my/exwm-run-polybar)
(my/exwm-set-wallpaper) (my/exwm-set-wallpaper)
(my/exwm-run-shepherd) (my/exwm-run-shepherd)
(my/exwm-run-systemd) (my/exwm-run-systemd)
(my/run-in-background "gpgconf --reload gpg-agent") (my/run-in-background "gpgconf --reload gpg-agent")
(my/exwm-run-polybar)
(setenv "DBUS_SESSION_BUS_ADDRESS" "unix:path=/run/user/1000/bus")
(when (my/is-arch) (when (my/is-arch)
(my/run-in-background "set_layout"))) (my/run-in-background "set_layout")))

View file

@ -28,7 +28,7 @@
:key (lambda () (my/password-store-get-field :key (lambda () (my/password-store-get-field
"My_Online/Accounts/openrouter" "api-key")) "My_Online/Accounts/openrouter" "api-key"))
:stream t :stream t
:models '("anthropic/claude-sonnet-4" :models '("anthropic/claude-sonnet-4.5"
"qwen/qwen3-coder" "qwen/qwen3-coder"
"qwen/qwen3-coder:free")) "qwen/qwen3-coder:free"))
(setq gptel--known-backends (setq gptel--known-backends

View file

@ -137,11 +137,12 @@
(t (doom-color color))))))) (t (doom-color color)))))))
(defun my/modus-get-base (color) (defun my/modus-get-base (color)
(let ((base-value (string-to-number (substring (symbol-name color) 4 5))) (let* ((base-value (string-to-number (substring (symbol-name color) 4 5)))
(base-start (cadr (assoc 'bg-main (modus-themes-get-theme-palette (palette (modus-themes-get-theme-palette
(or (my/modus-p) (my/ef-p)))))) (or (my/modus-p) (my/ef-p))
(base-end (cadr (assoc 'fg-dim (modus-themes-get-theme-palette :with-overrides :with-user-palette))
(or (my/modus-p) (my/ef-p))))))) (base-start (cadr (assoc 'bg-main palette)))
(base-end (cadr (assoc 'fg-dim palette))))
(nth base-value (ct-gradient 9 base-start base-end t)))) (nth base-value (ct-gradient 9 base-start base-end t))))
(defun my/prot-color (color palette) (defun my/prot-color (color palette)
@ -181,10 +182,11 @@
(t (cadr (assoc color palette)))))) (t (cadr (assoc color palette))))))
(defun my/modus-color (color) (defun my/modus-color (color)
(my/prot-color color (modus-themes-get-theme-palette (my/modus-p)))) (my/prot-color color (modus-themes-get-theme-palette
(or (my/modus-p) (my/ef-p))
:with-overrides :with-user-palette)))
(defun my/ef-color (color) (defalias 'my/ef-color 'my/modus-color)
(my/prot-color color (modus-themes-get-theme-palette (my/ef-p))))
(defconst my/test-colors-list (defconst my/test-colors-list
'(black red green yellow blue magenta cyan white light-black '(black red green yellow blue magenta cyan white light-black

View file

@ -408,6 +408,16 @@ def parse_rclone_stats(log_output):
return None return None
def process_output(output):
if output is None:
print('(empty)')
for line in output.splitlines():
try:
datum = json.loads(line)
print(datum['msg'])
except Exception:
print(line)
def rclone_run(folder): def rclone_run(folder):
command = rclone_make_command( command = rclone_make_command(
folder['local-path'], folder['remote-path'], folder['remote'] folder['local-path'], folder['remote-path'], folder['remote']
@ -418,9 +428,9 @@ def rclone_run(folder):
print(f'=== Error syncing {folder['local-path']} ===') print(f'=== Error syncing {folder['local-path']} ===')
print(f'Command: {' '.join(command)}') print(f'Command: {' '.join(command)}')
print(f'--- STDOUT ---') print(f'--- STDOUT ---')
print(e.stdout if e.stdout else '(empty)') process_output(e.stdout)
print(f'--- STDERR ---') print(f'--- STDERR ---')
print(e.stderr if e.stderr else '(empty)') process_output(e.stderr)
return {'success': False, 'stats': {}} return {'success': False, 'stats': {}}
return {'success': True, 'stats': parse_rclone_stats(result.stderr)} return {'success': True, 'stats': parse_rclone_stats(result.stderr)}
@ -453,21 +463,24 @@ def rclone_run_all(folders):
total_transfers += res.get('stats', {}).get('transfers', 0) total_transfers += res.get('stats', {}).get('transfers', 0)
total_deleted += res.get('stats', {}).get('deletes', 0) total_deleted += res.get('stats', {}).get('deletes', 0)
total_renamed += res.get('stats', {}).get('renames', 0) total_renamed += res.get('stats', {}).get('renames', 0)
msg = ''
level = 'normal'
if total_transfers > 0:
msg += f'''Transferred {total_transfers} files ({sizeof_fmt(total_bytes)})\n'''
if total_deleted > 0:
msg += f'''Deleted {total_transfers} files\n'''
if total_renamed > 0:
msg += f'''Renamed {total_renamed} files\n'''
if len(error_folders) > 0: if len(error_folders) > 0:
error_msg = f'Sync error for remote {REMOTE}!' msg += '''\nSync errors for the following folders:'''
for folder in error_folders: for folder in error_folders:
error_msg += '''\n- ''' + folder msg += '''\n- ''' + folder
notify(f'rclone sync {REMOTE}', error_msg, level='error') level = 'critical'
else:
msg = '' if len(msg) > 0:
if total_transfers > 0: notify(f'rclone sync {REMOTE}', msg, level=level)
msg += f'''Transferred {total_transfers} files ({sizeof_fmt(total_bytes)})\n'''
if total_deleted > 0:
msg += f'''Deleted {total_transfers} files\n'''
if total_renamed > 0:
msg += f'''Renamed {total_renamed} files\n'''
if len(msg) > 0:
notify(f'rclone sync {REMOTE}', msg)
if __name__ == '__main__': if __name__ == '__main__':
rclone_run_all(FOLDERS) rclone_run_all(FOLDERS)
@ -544,7 +557,7 @@ The return value is a list of commands as defined by
(list (list
(format "cat <<EOF > %s\n%s\nEOF" (format "cat <<EOF > %s\n%s\nEOF"
(my/index--rclone-script-loc remote) (my/index--rclone-script-loc remote)
(my/index--rclone-script remote folders)) (my/index--rclone-script remote (nreverse folders)))
"Update rclone sync script" 10) "Update rclone sync script" 10)
commands)) commands))
(nreverse commands))) (nreverse commands)))
@ -573,7 +586,7 @@ The return value is a list of commands as defined by
E.g. 10.03.R.01 Project Name -> Project Name." E.g. 10.03.R.01 Project Name -> Project Name."
(replace-regexp-in-string (replace-regexp-in-string
(rx bos (+ (| num alpha "." "-")) space) "" name)) (rx bos (+ num) (? "." (+ (| num alpha "." "-"))) space) "" name))
(defun my/index--wakatime-escape (string) (defun my/index--wakatime-escape (string)
"Escape STRING for use in a WakaTime config file." "Escape STRING for use in a WakaTime config file."
@ -739,12 +752,13 @@ is still valid. Otherwise, it re-parses the index file."
(my/index--commands-display (append rclone-commands folder-commands git-commands (my/index--commands-display (append rclone-commands folder-commands git-commands
waka-commands symlink-commands))))) waka-commands symlink-commands)))))
(defun my/index--nav-extend (name path) (defun my/index--nav-extend (name path &optional project)
"Find all index-related files in PATH. "Find all index-related files in PATH.
NAME is the name of the root index entry, e.g. \"10.01 NAME is the name of the root index entry, e.g. \"10.01
Something\". If PATH containts folders like \"10.01.01 Something\". If PATH containts folders like \"10.01.01
Something\", \"10.01.02 ...\", they will be returned. Something\", \"10.01.02 ...\", they will be returned. PROJECT is the
project name.
The return value is a form as defined by `my/index--nav-get'." The return value is a form as defined by `my/index--nav-get'."
(when (file-directory-p path) (when (file-directory-p path)
@ -771,7 +785,7 @@ The return value is a form as defined by `my/index--nav-get'."
`(((:names . (,name-1)) `(((:names . (,name-1))
(:path . ,(concat path-1 "/"))))))))) (:path . ,(concat path-1 "/")))))))))
(defun my/index--nav-get (tree &optional names) (defun my/index--nav-get (tree &optional names project)
"Get the navigation structure from TREE. "Get the navigation structure from TREE.
TREE is a form as defined by `my/index--tree-get'. NAMES is a TREE is a form as defined by `my/index--tree-get'. NAMES is a
@ -783,7 +797,7 @@ The result is a list of alists with the following keys:
(\"10.01 Something\" \"10.01.01 Something\") (\"10.01 Something\" \"10.01.01 Something\")
- `:path` - path to the folder, e.g. - `:path` - path to the folder, e.g.
\"/path/10 stuff/10.01 Something/10.01.01 Something/\" \"/path/10 stuff/10.01 Something/10.01.01 Something/\"
- `:child-navs` - list of child navigation structures (optional)" - `:project` - project name."
(seq-sort-by (seq-sort-by
(lambda (item) (alist-get :path item)) (lambda (item) (alist-get :path item))
#'string-lessp #'string-lessp
@ -791,28 +805,24 @@ The result is a list of alists with the following keys:
(lambda (acc elem) (lambda (acc elem)
(let* ((name (alist-get :name elem)) (let* ((name (alist-get :name elem))
(path (alist-get :path elem))) (path (alist-get :path elem)))
(cond ((alist-get :project elem) (cond ((alist-get :children elem)
(let ((current-nav `((:names . (,@names ,name))
(:path . ,path))))
(when-let (child-navs
(and (alist-get :children elem)
(my/index--nav-get (alist-get :children elem))))
(setf (alist-get :child-navs current-nav) child-navs))
(push current-nav acc)))
((alist-get :children elem)
(when-let (child-navs (my/index--nav-get (when-let (child-navs (my/index--nav-get
(alist-get :children elem) (alist-get :children elem)
`(,@names ,name))) `(,@names ,name)
(or (when (alist-get :project elem)
name)
project)))
(cl-loop for child-nav in child-navs (cl-loop for child-nav in child-navs
do (push child-nav acc)))) do (push child-nav acc))))
(t (if-let ((extended-nav (my/index--nav-extend name path))) (t (if-let ((extended-nav (my/index--nav-extend name path project)))
(cl-loop for child-nav in extended-nav (cl-loop for child-nav in extended-nav
do (setf (alist-get :names child-nav) do (setf (alist-get :names child-nav)
(append names (list name) (append names (list name)
(alist-get :names child-nav))) (alist-get :names child-nav)))
do (push child-nav acc)) do (push child-nav acc))
(push `((:names . (,@names ,name)) (push `((:names . (,@names ,name))
(:path . ,path)) (:path . ,path)
(:project . ,project))
acc)))) acc))))
acc)) acc))
tree tree
@ -838,7 +848,10 @@ The return value is a form as defined by `my/index--nav-get'."
NAV is a structure as defined by `my/index--nav-get'." NAV is a structure as defined by `my/index--nav-get'."
(let* ((collection (let* ((collection
(mapcar (lambda (item) (mapcar (lambda (item)
(cons (car (last (alist-get :names item))) (cons (let ((name (car (last (alist-get :names item)))))
(if (alist-get :project item)
(format "%s / %s" (alist-get :project item) name)
name))
(alist-get :path item))) (alist-get :path item)))
nav)) nav))
(vertico-sort-function nil)) (vertico-sort-function nil))
@ -856,36 +869,21 @@ NAV is a structure as defined by `my/index--nav-get'."
(string-prefix-p (alist-get :path item) path)) (string-prefix-p (alist-get :path item) path))
nav)) nav))
(defun my/index-nav (arg &optional func) (defun my/index-nav (&optional func)
"Navigate the filesystem index. "Navigate the filesystem index.
If ARG is nil, navigate all levels sequentially from the top one.
If ARG is '(4), select another directory from the same level.
FUNC is the function to call with the selected path. It defaults FUNC is the function to call with the selected path. It defaults
to `dired' if used interactively." to `dired' if used interactively."
(interactive (list current-prefix-arg #'dired)) (interactive (list #'dired))
(let* ((nav (my/index--nav-retrive)) (let* ((nav (my/index--nav-retrive))
(current-nav (my/index--nav-find-path (selected (my/index--nav-find-path
nav (expand-file-name default-directory))) nav
(current-child-navs (alist-get :child-navs current-nav))) (my/index--nav-prompt nav))))
(cond ((null arg) (funcall func (alist-get :path selected))))
(let ((selected (my/index--nav-find-path
nav
(my/index--nav-prompt nav))))
(if-let (child-navs (alist-get :child-navs selected))
(funcall func (my/index--nav-prompt child-navs))
(funcall func (alist-get :path selected)))))
((and (equal arg '(4)) current-child-navs)
(funcall func (my/index--nav-prompt current-child-navs)))
((and (equal arg '(4)) (null current-child-navs))
(funcall func (my/index--nav-prompt nav))))))
(defun my/index-nav-with-select-file (arg) (defun my/index-nav-with-select-file ()
(interactive (list current-prefix-arg)) (interactive)
(my/index-nav (my/index-nav
arg
(lambda (dir) (lambda (dir)
(let ((default-directory dir)) (let ((default-directory dir))
(projectile-find-file))))) (projectile-find-file)))))

View file

@ -152,6 +152,8 @@
(org-element-property :end element)))) (org-element-property :end element))))
(with-temp-buffer (with-temp-buffer
(insert s) (insert s)
(let (org-mode-hook)
(org-mode))
(org-clock-sum) (org-clock-sum)
org-clock-file-total-minutes))) org-clock-file-total-minutes)))

View file

@ -11,10 +11,8 @@
:background (my/color-value 'fg)) :background (my/color-value 'fg))
(telega-entity-type-spoiler :background (my/color-value 'base8))) (telega-entity-type-spoiler :background (my/color-value 'base8)))
:config :config
(when (file-exists-p "~/.guix-extra-profiles/emacs/emacs/bin/telega-server") (setq telega-server-libs-prefix "/usr")
(setq telega-server-command
(expand-file-name
"~/.guix-extra-profiles/emacs/emacs/bin/telega-server")))
(setq telega-emoji-use-images nil) (setq telega-emoji-use-images nil)
(setq telega-chat-fill-column 80) (setq telega-chat-fill-column 80)
(setq telega-completing-read-function #'completing-read) (setq telega-completing-read-function #'completing-read)
@ -37,15 +35,6 @@
telega-image-mode 3 "telega" telega-image-mode 3 "telega"
telega-webpage-mode 3 "telega")) telega-webpage-mode 3 "telega"))
(defun my/telega-server-build ()
(interactive)
(setq telega-server-libs-prefix
(if (executable-find "guix")
(string-trim
(shell-command-to-string "guix build tdlib"))
(expand-file-name "~/bin/td/build/res/usr/local")))
(telega-server-build "CC=gcc"))
(add-hook 'telega-load-hook #'telega-mode-line-mode) (add-hook 'telega-load-hook #'telega-mode-line-mode)
(setq telega-mode-line-string-format (setq telega-mode-line-string-format
'("[" '("["

View file

@ -346,6 +346,7 @@
(use-package eshell-atuin (use-package eshell-atuin
:straight (:host github :repo "SqrtMinusOne/eshell-atuin") :straight (:host github :repo "SqrtMinusOne/eshell-atuin")
:when (executable-find "atuin")
:after eshell :after eshell
:config :config
(eshell-atuin-mode) (eshell-atuin-mode)

View file

@ -6,6 +6,7 @@
(advice-add 'wakatime-init :after (advice-add 'wakatime-init :after
(lambda () (lambda ()
(setq wakatime-cli-path (or (setq wakatime-cli-path (or
(executable-find "wakatime")
(executable-find "wakatime-cli") (executable-find "wakatime-cli")
(expand-file-name "~/bin/wakatime-cli"))))) (expand-file-name "~/bin/wakatime-cli")))))
(when (file-exists-p "~/.wakatime.cfg") (when (file-exists-p "~/.wakatime.cfg")

View file

@ -1 +0,0 @@
https://nixos.org/channels/nixpkgs-unstable nixpkgs

View file

@ -46,6 +46,10 @@ export JUPYTER_CONFIG_DIR=$HOME/.config/jupyter
export GIO_EXTRA_MODULES="" export GIO_EXTRA_MODULES=""
# Misc settings:2 ends here # Misc settings:2 ends here
# [[file:Console.org::*Misc settings][Misc settings:3]]
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
# Misc settings:3 ends here
# [[file:Console.org::*Other package managers][Other package managers:1]] # [[file:Console.org::*Other package managers][Other package managers:1]]
if [ -d "$HOME/.cask" ]; then if [ -d "$HOME/.cask" ]; then
export PATH="/home/pavel/.cask/bin:$PATH" export PATH="/home/pavel/.cask/bin:$PATH"

View file

@ -13,8 +13,8 @@ set -g status-left-length "100"
setw -g window-status-activity-style "none,fg=#375cd8,bg=#f6ece8" setw -g window-status-activity-style "none,fg=#375cd8,bg=#f6ece8"
setw -g window-status-separator "" setw -g window-status-separator ""
setw -g window-status-style "none,fg=#222222,bg=#f6ece8" setw -g window-status-style "none,fg=#222222,bg=#f6ece8"
set -g status-left "#[fg=#fff8f0,bg=#375cd8] #S #[fg=#375cd8,bg=#cbcfff,nobold,nounderscore,noitalics]#[fg=#222222,bg=#cbcfff] #W #[fg=#cbcfff,bg=#f6ece8,nobold,nounderscore,noitalics]" set -g status-left "#[fg=#fff8f0,bg=#375cd8] #S #[fg=#375cd8,bg=#0000ff,nobold,nounderscore,noitalics]#[fg=#fff8f0,bg=#0000ff] #W #[fg=#0000ff,bg=#f6ece8,nobold,nounderscore,noitalics]"
set -g status-right "%-H:%M #[bg=#f6ece8,fg=#cbcfff,nobold,nounderscore,noitalics]#[fg=#222222,bg=#cbcfff] %a, %b %d #[bg=#cbcfff,fg=#375cd8,nobold,nounderscore,noitalics]#[fg=#fff8f0,bg=#375cd8] #H " set -g status-right "%-H:%M #[bg=#f6ece8,fg=#0000ff,nobold,nounderscore,noitalics]#[fg=#fff8f0,bg=#0000ff] %a, %b %d #[bg=#0000ff,fg=#375cd8,nobold,nounderscore,noitalics]#[fg=#fff8f0,bg=#375cd8] #H "
setw -g window-status-format "#[fg=#f6ece8,bg=#cbcfff,nobold,nounderscore,noitalics]#[fg=#222222,bg=#cbcfff] #I #W #[align=left] #[fg=#cbcfff,bg=#f6ece8,nobold,nounderscore,noitalics]" setw -g window-status-format "#[fg=#f6ece8,bg=#0000ff,nobold,nounderscore,noitalics]#[fg=#fff8f0,bg=#0000ff] #I #W #[align=left] #[fg=#0000ff,bg=#f6ece8,nobold,nounderscore,noitalics]"
setw -g window-status-current-format "#[fg=#f6ece8,bg=#375cd8,nobold,nounderscore,noitalics]#[fg=#fff8f0,bg=#375cd8] #I #W #[fg=#375cd8,bg=#f6ece8,nobold,nounderscore,noitalics]" setw -g window-status-current-format "#[fg=#f6ece8,bg=#375cd8,nobold,nounderscore,noitalics]#[fg=#fff8f0,bg=#375cd8] #I #W #[fg=#375cd8,bg=#f6ece8,nobold,nounderscore,noitalics]"
# UI:1 ends here # UI:1 ends here

View file

@ -110,6 +110,7 @@ api_key = <api-key>
Then run =emacs= and make sure it starts. Run: Then run =emacs= and make sure it starts. Run:
- =M-x nerd-icons-install-fonts= - =M-x nerd-icons-install-fonts=
- =M-x all-the-icons-install-fonts= - =M-x all-the-icons-install-fonts=
- =M-x treesit-install-language-grammar=
Run =rclone config=, configure the remotes. Then =M-x my/index-commands-sync=. Run =rclone config=, configure the remotes. Then =M-x my/index-commands-sync=.
@ -120,6 +121,11 @@ Create some directories:
mkdir -p /home/pavel/Pictures/screenshots/ mkdir -p /home/pavel/Pictures/screenshots/
#+end_src #+end_src
Also run:
#+begin_src bash
sudo chmod +s /usr/bin/light
#+end_src
* Metapac configuration * Metapac configuration
[[https://github.com/ripytide/metapac][metapac]] is a declarative wrapper around different package managers, including [[https://wiki.archlinux.org/title/Pacman][pacman]] and [[https://github.com/Morganamilo/paru][paru]]. This means the required packages can be listed in configuration files and checked into version control. [[https://github.com/ripytide/metapac][metapac]] is a declarative wrapper around different package managers, including [[https://wiki.archlinux.org/title/Pacman][pacman]] and [[https://github.com/Morganamilo/paru][paru]]. This means the required packages can be listed in configuration files and checked into version control.
@ -179,6 +185,7 @@ package_manager = "paru"
Some necessary Arch packages: Some necessary Arch packages:
| Arch dependency | | Arch dependency |
|---------------------| |---------------------|
| amneziavpn-bin |
| base | | base |
| base-devel | | base-devel |
| decman | | decman |
@ -200,12 +207,13 @@ Some necessary Arch packages:
| pipewire-alsa | | pipewire-alsa |
| pipewire-pulse | | pipewire-pulse |
| pipewire-jack | | pipewire-jack |
| sof-firmware |
| smartmontools | | smartmontools |
| vim | | vim |
| xterm | | xterm |
| wget | | wget |
| wireless_tools | | wireless_tools |
| wpa_supplicant | | wireplumber |
| yadm | | yadm |
| zram-generator | | zram-generator |
@ -226,5 +234,5 @@ Various drivers, I'm not sure which I actually need, so...
#+end_src #+end_src
#+begin_src scheme :tangle .config/metapac/groups/system.toml :noweb yes #+begin_src scheme :tangle .config/metapac/groups/system.toml :noweb yes
<<packages()>ger> <<packages()>>
#+end_src #+end_src

View file

@ -123,6 +123,13 @@ Somehow LibreOffice doesn't work without the following:
#+begin_src sh #+begin_src sh
export GIO_EXTRA_MODULES="" export GIO_EXTRA_MODULES=""
#+end_src #+end_src
Not sure why this is necessary.
#+begin_src sh
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
#+end_src
** Other package managers ** Other package managers
Using other package managers requires some extra work. Using other package managers requires some extra work.
@ -504,6 +511,11 @@ if type -q direnv
end end
#+end_src #+end_src
** atuin ** atuin
| Arch dependency |
|-----------------|
| atuin |
#+begin_src fish #+begin_src fish
if type -q atuin if type -q atuin
set -gx ATUIN_NOBIND "true" set -gx ATUIN_NOBIND "true"
@ -743,8 +755,8 @@ cyan = "<<get-color(name="cyan")>>"
white = "<<get-color(name="white")>>" white = "<<get-color(name="white")>>"
[colors.primary] [colors.primary]
background: "<<get-color(name="bg")>>" background = "<<get-color(name="bg")>>"
foreground: "<<get-color(name="fg")>>" foreground = "<<get-color(name="fg")>>"
[env] [env]
TERM = "xterm-256color" TERM = "xterm-256color"
@ -890,9 +902,11 @@ See the [[https://github.com/ClementTsang/bottom/blob/master/sample_configs/defa
#+begin_src toml :tangle .config/bottom/bottom.toml :noweb yes #+begin_src toml :tangle .config/bottom/bottom.toml :noweb yes
[flags] [flags]
hide_table_gap = true # Remove space in tables hide_table_gap = true # Remove space in tables
color = "<<bottom-theme()>>"
process_command = true process_command = true
[styles]
theme = "<<bottom-theme()>>"
[processes] [processes]
columns = ["PID", "State", "Name", "CPU%", "Mem%", "R/s", "W/s", "User"] columns = ["PID", "State", "Name", "CPU%", "Mem%", "R/s", "W/s", "User"]
#+end_src #+end_src
@ -1061,6 +1075,26 @@ fi
(job "0 * * * *" "autocommit /home/pavel/30-39\\ Life/32\\ org-mode/") (job "0 * * * *" "autocommit /home/pavel/30-39\\ Life/32\\ org-mode/")
(job "0,15,30,45 * * * *" "autocommit ~/.password-store") (job "0,15,30,45 * * * *" "autocommit ~/.password-store")
#+end_src #+end_src
Systemd timers:
#+begin_src conf :tangle .config/systemd/user/autocommit-org-mode.service
[Unit]
Description=Autocommit org-mode
[Service]
Type=oneshot
ExecStart=/usr/bin/bash /home/pavel/bin/scripts/autocommit "/home/pavel/30-39 Life/32 org-mode"
#+end_src
#+begin_src conf :tangle .config/systemd/user/autocommit-password-store.service
[Unit]
Description=Autocommit .password-store
[Service]
Type=oneshot
ExecStart=/usr/bin/bash /home/pavel/bin/scripts/autocommit "/home/pavel/.password-store"
#+end_src
* Arch settings * Arch settings
#+NAME: packages #+NAME: packages
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no

View file

@ -1217,11 +1217,12 @@ And the EXWM config itself.
(defun my/exwm-init () (defun my/exwm-init ()
(exwm-workspace-switch 1) (exwm-workspace-switch 1)
(my/exwm-run-polybar)
(my/exwm-set-wallpaper) (my/exwm-set-wallpaper)
(my/exwm-run-shepherd) (my/exwm-run-shepherd)
(my/exwm-run-systemd) (my/exwm-run-systemd)
(my/run-in-background "gpgconf --reload gpg-agent") (my/run-in-background "gpgconf --reload gpg-agent")
(my/exwm-run-polybar)
(setenv "DBUS_SESSION_BUS_ADDRESS" "unix:path=/run/user/1000/bus")
(when (my/is-arch) (when (my/is-arch)
(my/run-in-background "set_layout"))) (my/run-in-background "set_layout")))
@ -2815,7 +2816,7 @@ afk_event=$(curl -s -X GET "http://localhost:5600/api/0/buckets/aw-watcher-afk_$
status=$(echo ${afk_event} | jq -r '.[0].data.status') status=$(echo ${afk_event} | jq -r '.[0].data.status')
afk_time=$(echo "${afk_event}" | jq -r '.[0].duration' | xargs -I ! date -u -d @! +"%H:%M") afk_time=$(echo "${afk_event}" | jq -r '.[0].duration' | xargs -I ! date -u -d @! +"%H:%M")
uptime=$(uptime | awk '{ print substr($3, 0, length($3) - 1) }' | xargs -I ! date -d ! +"%H:%M") uptime=$(date -ud @$(uptime -r | awk '{print $2}') +%H:%M)
res="${afk_time} / ${uptime}" res="${afk_time} / ${uptime}"
if [[ $status == 'afk' ]]; then if [[ $status == 'afk' ]]; then
# echo "%{u<<get-color(name="red")>>}%{+u} [AFK] $res %{u-}" # echo "%{u<<get-color(name="red")>>}%{+u} [AFK] $res %{u-}"
@ -4225,6 +4226,7 @@ This section generates manifests for various desktop software that I'm using.
|----------+------------------------| |----------+------------------------|
| browsers | ungoogled-chromium-bin | | browsers | ungoogled-chromium-bin |
| browsers | firefox | | browsers | firefox |
| browsers | firefox-tridactyl |
** Office & Multimedia ** Office & Multimedia
| Category | Arch dependency | | Category | Arch dependency |
|----------+-----------------| |----------+-----------------|

126
Emacs.org
View file

@ -2435,11 +2435,12 @@ Now, let's get the current color from =doom=. =doom-themes= provide =doom-color=
And the same for =modus-themes=. =my/modus-color= has to accept the same arguments as I use for =my/doom-color= for backward compatibility, which requires a bit more tuning. And the same for =modus-themes=. =my/modus-color= has to accept the same arguments as I use for =my/doom-color= for backward compatibility, which requires a bit more tuning.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun my/modus-get-base (color) (defun my/modus-get-base (color)
(let ((base-value (string-to-number (substring (symbol-name color) 4 5))) (let* ((base-value (string-to-number (substring (symbol-name color) 4 5)))
(base-start (cadr (assoc 'bg-main (modus-themes-get-theme-palette (palette (modus-themes-get-theme-palette
(or (my/modus-p) (my/ef-p)))))) (or (my/modus-p) (my/ef-p))
(base-end (cadr (assoc 'fg-dim (modus-themes-get-theme-palette :with-overrides :with-user-palette))
(or (my/modus-p) (my/ef-p))))))) (base-start (cadr (assoc 'bg-main palette)))
(base-end (cadr (assoc 'fg-dim palette))))
(nth base-value (ct-gradient 9 base-start base-end t)))) (nth base-value (ct-gradient 9 base-start base-end t))))
(defun my/prot-color (color palette) (defun my/prot-color (color palette)
@ -2479,10 +2480,11 @@ And the same for =modus-themes=. =my/modus-color= has to accept the same argumen
(t (cadr (assoc color palette)))))) (t (cadr (assoc color palette))))))
(defun my/modus-color (color) (defun my/modus-color (color)
(my/prot-color color (modus-themes-get-theme-palette (my/modus-p)))) (my/prot-color color (modus-themes-get-theme-palette
(or (my/modus-p) (my/ef-p))
:with-overrides :with-user-palette)))
(defun my/ef-color (color) (defalias 'my/ef-color 'my/modus-color)
(my/prot-color color (modus-themes-get-theme-palette (my/ef-p))))
#+end_src #+end_src
Test the three functions. Test the three functions.
@ -6163,6 +6165,8 @@ We can get the clocked value in minutes with =org-clock-sum=. This weird functio
(org-element-property :end element)))) (org-element-property :end element))))
(with-temp-buffer (with-temp-buffer
(insert s) (insert s)
(let (org-mode-hook)
(org-mode))
(org-clock-sum) (org-clock-sum)
org-clock-file-total-minutes))) org-clock-file-total-minutes)))
#+end_src #+end_src
@ -11742,7 +11746,7 @@ I don't have access to any proprietary APIs, but LLaMA 3.1 8b with [[https://oll
:key (lambda () (my/password-store-get-field :key (lambda () (my/password-store-get-field
"My_Online/Accounts/openrouter" "api-key")) "My_Online/Accounts/openrouter" "api-key"))
:stream t :stream t
:models '("anthropic/claude-sonnet-4" :models '("anthropic/claude-sonnet-4.5"
"qwen/qwen3-coder" "qwen/qwen3-coder"
"qwen/qwen3-coder:free")) "qwen/qwen3-coder:free"))
(setq gptel--known-backends (setq gptel--known-backends
@ -12955,21 +12959,24 @@ def rclone_run_all(folders):
total_transfers += res.get('stats', {}).get('transfers', 0) total_transfers += res.get('stats', {}).get('transfers', 0)
total_deleted += res.get('stats', {}).get('deletes', 0) total_deleted += res.get('stats', {}).get('deletes', 0)
total_renamed += res.get('stats', {}).get('renames', 0) total_renamed += res.get('stats', {}).get('renames', 0)
msg = ''
level = 'normal'
if total_transfers > 0:
msg += f'''Transferred {total_transfers} files ({sizeof_fmt(total_bytes)})\n'''
if total_deleted > 0:
msg += f'''Deleted {total_transfers} files\n'''
if total_renamed > 0:
msg += f'''Renamed {total_renamed} files\n'''
if len(error_folders) > 0: if len(error_folders) > 0:
error_msg = f'Sync error for remote {REMOTE}!' msg += '''\nSync errors for the following folders:'''
for folder in error_folders: for folder in error_folders:
error_msg += '''\n- ''' + folder msg += '''\n- ''' + folder
notify(f'rclone sync {REMOTE}', error_msg, level='critical') level = 'critical'
else:
msg = '' if len(msg) > 0:
if total_transfers > 0: notify(f'rclone sync {REMOTE}', msg, level=level)
msg += f'''Transferred {total_transfers} files ({sizeof_fmt(total_bytes)})\n'''
if total_deleted > 0:
msg += f'''Deleted {total_transfers} files\n'''
if total_renamed > 0:
msg += f'''Renamed {total_renamed} files\n'''
if len(msg) > 0:
notify(f'rclone sync {REMOTE}', msg)
if __name__ == '__main__': if __name__ == '__main__':
rclone_run_all(FOLDERS) rclone_run_all(FOLDERS)
@ -13102,7 +13109,7 @@ I use [[https://wakatime.com/][WakaTime]] to track my coding activity, and I don
E.g. 10.03.R.01 Project Name -> Project Name." E.g. 10.03.R.01 Project Name -> Project Name."
(replace-regexp-in-string (replace-regexp-in-string
(rx bos (+ (| num alpha "." "-")) space) "" name)) (rx bos (+ num) (? "." (+ (| num alpha "." "-"))) space) "" name))
(defun my/index--wakatime-escape (string) (defun my/index--wakatime-escape (string)
"Escape STRING for use in a WakaTime config file." "Escape STRING for use in a WakaTime config file."
@ -13305,20 +13312,17 @@ The last piece is the navigation interface.
Of course, plain dired does the job fine, thanks to the relatively low-depth filesystem structure. But I still want a navigation interface like =M-x projectile-switch-project=. Of course, plain dired does the job fine, thanks to the relatively low-depth filesystem structure. But I still want a navigation interface like =M-x projectile-switch-project=.
**** Navigation data **** Navigation data
There are two slight problems with that. One problem is that the index tree does not always have the full info. E.g., I have the =10.03.A Artifacts= folder, which I sync with MEGA and which has child folders like =10.03.A.01 smth= and so on. Names of the latter are not stored anywhere because I don't see the point, which means we have to extract that from the filesystem.
First, the index tree does not always have the full info. For instance, I have the =10.03.A Artifacts= folder, which I sync with MEGA and which has child folders like =10.03.A.01 smth= and so on. Names of the latter are not stored anywhere because I don't see the point, which means we have to extract that from the filesystem. So, a function to tackle this:
Second, as it turns out, there have to be two levels for navigation, which are delimited by the =project= property. I'm not sure if that the optimal way to implement Jonny.Decimal, but it works for me.
So, a function to tackle the first problem:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun my/index--nav-extend (name path) (defun my/index--nav-extend (name path &optional project)
"Find all index-related files in PATH. "Find all index-related files in PATH.
NAME is the name of the root index entry, e.g. \"10.01 NAME is the name of the root index entry, e.g. \"10.01
Something\". If PATH containts folders like \"10.01.01 Something\". If PATH containts folders like \"10.01.01
Something\", \"10.01.02 ...\", they will be returned. Something\", \"10.01.02 ...\", they will be returned. PROJECT is the
project name.
The return value is a form as defined by `my/index--nav-get'." The return value is a form as defined by `my/index--nav-get'."
(when (file-directory-p path) (when (file-directory-p path)
@ -13348,7 +13352,7 @@ The return value is a form as defined by `my/index--nav-get'."
And one to get the navigation data structure. And one to get the navigation data structure.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun my/index--nav-get (tree &optional names) (defun my/index--nav-get (tree &optional names project)
"Get the navigation structure from TREE. "Get the navigation structure from TREE.
TREE is a form as defined by `my/index--tree-get'. NAMES is a TREE is a form as defined by `my/index--tree-get'. NAMES is a
@ -13360,7 +13364,7 @@ The result is a list of alists with the following keys:
(\"10.01 Something\" \"10.01.01 Something\") (\"10.01 Something\" \"10.01.01 Something\")
- `:path` - path to the folder, e.g. - `:path` - path to the folder, e.g.
\"/path/10 stuff/10.01 Something/10.01.01 Something/\" \"/path/10 stuff/10.01 Something/10.01.01 Something/\"
- `:child-navs` - list of child navigation structures (optional)" - `:project` - project name."
(seq-sort-by (seq-sort-by
(lambda (item) (alist-get :path item)) (lambda (item) (alist-get :path item))
#'string-lessp #'string-lessp
@ -13368,28 +13372,24 @@ The result is a list of alists with the following keys:
(lambda (acc elem) (lambda (acc elem)
(let* ((name (alist-get :name elem)) (let* ((name (alist-get :name elem))
(path (alist-get :path elem))) (path (alist-get :path elem)))
(cond ((alist-get :project elem) (cond ((alist-get :children elem)
(let ((current-nav `((:names . (,@names ,name))
(:path . ,path))))
(when-let (child-navs
(and (alist-get :children elem)
(my/index--nav-get (alist-get :children elem))))
(setf (alist-get :child-navs current-nav) child-navs))
(push current-nav acc)))
((alist-get :children elem)
(when-let (child-navs (my/index--nav-get (when-let (child-navs (my/index--nav-get
(alist-get :children elem) (alist-get :children elem)
`(,@names ,name))) `(,@names ,name)
(or (when (alist-get :project elem)
name)
project)))
(cl-loop for child-nav in child-navs (cl-loop for child-nav in child-navs
do (push child-nav acc)))) do (push child-nav acc))))
(t (if-let ((extended-nav (my/index--nav-extend name path))) (t (if-let ((extended-nav (my/index--nav-extend name path project)))
(cl-loop for child-nav in extended-nav (cl-loop for child-nav in extended-nav
do (setf (alist-get :names child-nav) do (setf (alist-get :names child-nav)
(append names (list name) (append names (list name)
(alist-get :names child-nav))) (alist-get :names child-nav)))
do (push child-nav acc)) do (push child-nav acc))
(push `((:names . (,@names ,name)) (push `((:names . (,@names ,name))
(:path . ,path)) (:path . ,path)
(:project . ,project))
acc)))) acc))))
acc)) acc))
tree tree
@ -13422,7 +13422,10 @@ As for Emacs interface, =completing-read= is sufficient, except that I don't wan
NAV is a structure as defined by `my/index--nav-get'." NAV is a structure as defined by `my/index--nav-get'."
(let* ((collection (let* ((collection
(mapcar (lambda (item) (mapcar (lambda (item)
(cons (car (last (alist-get :names item))) (cons (let ((name (car (last (alist-get :names item)))))
(if (alist-get :project item)
(format "%s / %s" (alist-get :project item) name)
name))
(alist-get :path item))) (alist-get :path item)))
nav)) nav))
(vertico-sort-function nil)) (vertico-sort-function nil))
@ -13440,39 +13443,24 @@ NAV is a structure as defined by `my/index--nav-get'."
(string-prefix-p (alist-get :path item) path)) (string-prefix-p (alist-get :path item) path))
nav)) nav))
(defun my/index-nav (arg &optional func) (defun my/index-nav (&optional func)
"Navigate the filesystem index. "Navigate the filesystem index.
If ARG is nil, navigate all levels sequentially from the top one.
If ARG is '(4), select another directory from the same level.
FUNC is the function to call with the selected path. It defaults FUNC is the function to call with the selected path. It defaults
to `dired' if used interactively." to `dired' if used interactively."
(interactive (list current-prefix-arg #'dired)) (interactive (list #'dired))
(let* ((nav (my/index--nav-retrive)) (let* ((nav (my/index--nav-retrive))
(current-nav (my/index--nav-find-path (selected (my/index--nav-find-path
nav (expand-file-name default-directory))) nav
(current-child-navs (alist-get :child-navs current-nav))) (my/index--nav-prompt nav))))
(cond ((null arg) (funcall func (alist-get :path selected))))
(let ((selected (my/index--nav-find-path
nav
(my/index--nav-prompt nav))))
(if-let (child-navs (alist-get :child-navs selected))
(funcall func (my/index--nav-prompt child-navs))
(funcall func (alist-get :path selected)))))
((and (equal arg '(4)) current-child-navs)
(funcall func (my/index--nav-prompt current-child-navs)))
((and (equal arg '(4)) (null current-child-navs))
(funcall func (my/index--nav-prompt nav))))))
#+end_src #+end_src
Finally, something that I can bind to a key. Finally, something that I can bind to a key.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun my/index-nav-with-select-file (arg) (defun my/index-nav-with-select-file ()
(interactive (list current-prefix-arg)) (interactive)
(my/index-nav (my/index-nav
arg
(lambda (dir) (lambda (dir)
(let ((default-directory dir)) (let ((default-directory dir))
(projectile-find-file))))) (projectile-find-file)))))

View file

@ -1,16 +0,0 @@
# [[file:../../Mail.org::*DavMail][DavMail:1]]
davmail.server=true
davmail.mode=Auto
davmail.url=https://mail.etu.ru/owa/
davmail.server.certificate.hash=0C:9E:CF:D3:62:26:DB:FA:F1:EE:36:9D:60:E7:31:71:CF:1F:92:85
davmail.caldavPort=1080
davmail.imapPort=1143
davmail.ldapPort=1389
davmail.popPort=1110
davmail.smtpPort=1025
davmail.imapAutoExpunge=false
davmail.enableKeepalive=false
# DavMail:1 ends here

View file

@ -1,8 +0,0 @@
#!/usr/bin/env bash
# [[file:../../Guix.org::*Slack][Slack:2]]
echo "LSB Version: Hey. I spent an hour figuring out why Slack doesn't launch."
echo "Distributor ID: It seems like it requires an lsb_release."
echo "Description: But GNU Guix doesn't have one."
echo "Release: 42.2"
echo "Codename: n/a"
# Slack:2 ends here

View file

@ -4,7 +4,7 @@ afk_event=$(curl -s -X GET "http://localhost:5600/api/0/buckets/aw-watcher-afk_$
status=$(echo ${afk_event} | jq -r '.[0].data.status') status=$(echo ${afk_event} | jq -r '.[0].data.status')
afk_time=$(echo "${afk_event}" | jq -r '.[0].duration' | xargs -I ! date -u -d @! +"%H:%M") afk_time=$(echo "${afk_event}" | jq -r '.[0].duration' | xargs -I ! date -u -d @! +"%H:%M")
uptime=$(uptime | awk '{ print substr($3, 0, length($3) - 1) }' | xargs -I ! date -d ! +"%H:%M") uptime=$(date -ud @$(uptime -r | awk '{print $2}') +%H:%M)
res="${afk_time} / ${uptime}" res="${afk_time} / ${uptime}"
if [[ $status == 'afk' ]]; then if [[ $status == 'afk' ]]; then
# echo "%{u#cc3333}%{+u} [AFK] $res %{u-}" # echo "%{u#cc3333}%{+u} [AFK] $res %{u-}"

View file

@ -1,39 +0,0 @@
#!/usr/bin/env bash
# [[file:../../Guix.org::*Activate profiles][Activate profiles:1]]
GREEN='\033[1;32m'
RED='\033[1;30m'
NC='\033[0m'
GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
profiles=$*
if [[ $# -eq 0 ]]; then
profiles="$HOME/.config/guix/manifests/*.scm";
fi
for profile in $profiles; do
# Remove the path and file extension, if any
profileName=$(basename $profile)
profileName="${profileName%.*}"
profilePath="$GUIX_EXTRA_PROFILES/$profileName"
manifestPath=$HOME/.config/guix/manifests/$profileName.scm
if [ -f $manifestPath ]; then
echo
echo -e "${GREEN}Activating profile:" $manifestPath "${NC}"
echo
mkdir -p $profilePath
guix package --manifest=$manifestPath --profile="$profilePath/$profileName"
# Source the new profile
GUIX_PROFILE="$profilePath/$profileName"
if [ -f $GUIX_PROFILE/etc/profile ]; then
. "$GUIX_PROFILE"/etc/profile
else
echo -e "${RED}Couldn't find profile:" $GUIX_PROFILE/etc/profile "${NC}"
fi
else
echo "No profile found at path" $profilePath
fi
done
# Activate profiles:1 ends here

View file

@ -1,5 +0,0 @@
#!/usr/bin/env bash
# [[file:../../Desktop.org::*ActivityWatch][ActivityWatch:2]]
sleep 5
aw-watcher-afk
# ActivityWatch:2 ends here

View file

@ -1,4 +0,0 @@
#!/usr/bin/env bash
# [[file:../../Guix.org::*Turn off Guix profiles][Turn off Guix profiles:1]]
export PATH=$(echo $PATH | tr ":" "\n" | grep -vE "guix|nix|gnu" | tr "\n" ":")
# Turn off Guix profiles:1 ends here