diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml index f31ff14..9bc23eb 100644 --- a/.config/alacritty/alacritty.toml +++ b/.config/alacritty/alacritty.toml @@ -1,24 +1,23 @@ -# decorations = "none" - +# [[file:../../Console.org::*Alacritty][Alacritty:1]] [colors.bright] black = "#484848" -blue = "#cbcfff" -cyan = "#88c8ff" -green = "#8adf80" -magenta = "#df8fff" -red = "#ff8f88" +red = "#d00000" +green = "#008900" +yellow = "#808000" +blue = "#0000ff" +magenta = "#dd22dd" +cyan = "#008899" white = "#ffffff" -yellow = "#fac200" [colors.normal] black = "#222222" -blue = "#375cd8" -cyan = "#1f6fbf" -green = "#217a3c" -magenta = "#ba35af" red = "#cc3333" -white = "#fff8f0" +green = "#217a3c" yellow = "#8a5d00" +blue = "#375cd8" +magenta = "#ba35af" +cyan = "#1f6fbf" +white = "#fff8f0" [colors.primary] background = "#fff8f0" @@ -150,3 +149,4 @@ x = 0 y = 0 [keyboard] +# Alacritty:1 ends here diff --git a/.config/bottom/bottom.toml b/.config/bottom/bottom.toml index c2e2390..ca88482 100644 --- a/.config/bottom/bottom.toml +++ b/.config/bottom/bottom.toml @@ -1,7 +1,9 @@ [flags] hide_table_gap = true # Remove space in tables -color = "default-light" process_command = true +[styles] +theme = "default-light" + [processes] columns = ["PID", "State", "Name", "CPU%", "Mem%", "R/s", "W/s", "User"] diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index 9424584..686431c 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -53,7 +53,7 @@ ### Misc/Advanced ### dmenu = /usr/bin/dmenu -p dunst: - browser = /home/pavel/.guix-extra-profiles/browsers/browsers/bin/firefox + browser = /user/bin/firefox always_run_script = true title = Dunst class = Dunst @@ -69,15 +69,16 @@ mouse_middle_click = do_action mouse_right_click = close_all -[experimental] - per_monitor_dpi = false - -[shortcuts] + ### Shortcuts close = ctrl+space close_all = ctrl+shift+space history = ctrl+grave context = ctrl+shift+period +[experimental] + per_monitor_dpi = false + + [urgency_low] background = "#f6ece8" frame_color = "#baafba" diff --git a/.config/metapac/groups/browsers.toml b/.config/metapac/groups/browsers.toml index 5ecd895..d9e87a6 100644 --- a/.config/metapac/groups/browsers.toml +++ b/.config/metapac/groups/browsers.toml @@ -1,3 +1,4 @@ arch = [ +"firefox-tridactyl", "firefox", "ungoogled-chromium-bin",] diff --git a/.config/metapac/groups/console.toml b/.config/metapac/groups/console.toml index 07aabbf..ba4f6a0 100644 --- a/.config/metapac/groups/console.toml +++ b/.config/metapac/groups/console.toml @@ -28,6 +28,7 @@ arch = [ "tmux", "starship", "nushell", +"atuin", "shell-color-scripts-git", "fish", "xorg-xhost", diff --git a/.config/metapac/groups/system.toml b/.config/metapac/groups/system.toml index 3a9fe94..cf29180 100644 --- a/.config/metapac/groups/system.toml +++ b/.config/metapac/groups/system.toml @@ -8,12 +8,13 @@ arch = [ "libva-intel-driver", "zram-generator", "yadm", -"wpa_supplicant", +"wireplumber", "wireless_tools", "wget", "xterm", "vim", "smartmontools", +"sof-firmware", "pipewire-jack", "pipewire-pulse", "pipewire-alsa", @@ -34,4 +35,5 @@ arch = [ "grub", "decman", "base-devel", -"base",] +"base", +"amneziavpn-bin",] diff --git a/.config/polybar/config b/.config/polybar/config index 6011cbe..7bb6eb4 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -180,11 +180,6 @@ radius = 0.0 ; Global bar config:2 ends here ; [[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-1 = NotoEmoji:scale=10:antialias=false;1 font-2 = fontawesome:pixelsize=13;3 diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py index b34ce86..5532d97 100644 --- a/.config/qutebrowser/config.py +++ b/.config/qutebrowser/config.py @@ -39,13 +39,13 @@ palette = { # 'background': '#282a36', 'background-alt': "#f6ece8", # 'background-alt': '#282a36', - 'background-attention': "#ff8f88", + 'background-attention': "#d00000", # 'background-attention': '#181920', 'border': "#baafba", # 'border': '#282a36', - 'current-line': "#5f5f5f", + 'current-line': "#9da4b3", # 'current-line': '#44475a', - 'selection': "#5f5f5f", + 'selection': "#9da4b3", # 'selection': '#44475a', 'foreground': "#222222", # 'foreground': '#f8f8f2', @@ -61,7 +61,7 @@ palette = { # 'green': '#50fa7b', 'orange': "#8f5a3a", # 'orange': '#ffb86c', - 'pink': "#df8fff", + 'pink': "#dd22dd", # 'pink': '#ff79c6', 'purple': "#6052cf", # 'purple': '#bd93f9', diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi index faab084..ee4b538 100644 --- a/.config/rofi/config.rasi +++ b/.config/rofi/config.rasi @@ -9,12 +9,12 @@ cyan: #1f6fbf; white: #fff8f0; light-black: #484848; - light-red: #ff8f88; - light-green: #8adf80; - light-yellow: #fac200; - light-blue: #cbcfff; - light-magenta: #df8fff; - light-cyan: #88c8ff; + light-red: #d00000; + light-green: #008900; + light-yellow: #808000; + light-blue: #0000ff; + light-magenta: #dd22dd; + light-cyan: #008899; light-white: #ffffff; @@ -25,8 +25,8 @@ border-color: #baafba; selected-normal-background: #375cd8; selected-normal-foreground: #fff8f0; - selected-active-background: #cbcfff; - selected-active-foreground: #222222; + selected-active-background: #0000ff; + selected-active-foreground: #fff8f0; selected-urgent-background: #cc3333; selected-urgent-foreground: #fff8f0; normal-foreground: @foreground; @@ -37,8 +37,8 @@ urgent-background: @background; alternate-normal-background: #f6ece8; alternate-normal-foreground: @foreground; - alternate-active-background: #222222; - alternate-active-foreground: #cbcfff; + alternate-active-background: #fff8f0; + alternate-active-foreground: #0000ff; alternate-urgent-background: #fff8f0; alternate-urgent-foreground: #cc3333; spacing: 2; diff --git a/.emacs.d/desktop.el b/.emacs.d/desktop.el index d43d12f..b268d78 100644 --- a/.emacs.d/desktop.el +++ b/.emacs.d/desktop.el @@ -592,11 +592,12 @@ _d_: Discord (defun my/exwm-init () (exwm-workspace-switch 1) - (my/exwm-run-polybar) (my/exwm-set-wallpaper) (my/exwm-run-shepherd) (my/exwm-run-systemd) (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) (my/run-in-background "set_layout"))) diff --git a/.emacs.d/modules/sqrt-ai.el b/.emacs.d/modules/sqrt-ai.el index 8a4ed9c..d228a9f 100644 --- a/.emacs.d/modules/sqrt-ai.el +++ b/.emacs.d/modules/sqrt-ai.el @@ -28,7 +28,7 @@ :key (lambda () (my/password-store-get-field "My_Online/Accounts/openrouter" "api-key")) :stream t - :models '("anthropic/claude-sonnet-4" + :models '("anthropic/claude-sonnet-4.5" "qwen/qwen3-coder" "qwen/qwen3-coder:free")) (setq gptel--known-backends diff --git a/.emacs.d/modules/sqrt-general-ui.el b/.emacs.d/modules/sqrt-general-ui.el index 4e9994a..78078d7 100644 --- a/.emacs.d/modules/sqrt-general-ui.el +++ b/.emacs.d/modules/sqrt-general-ui.el @@ -137,11 +137,12 @@ (t (doom-color color))))))) (defun my/modus-get-base (color) - (let ((base-value (string-to-number (substring (symbol-name color) 4 5))) - (base-start (cadr (assoc 'bg-main (modus-themes-get-theme-palette - (or (my/modus-p) (my/ef-p)))))) - (base-end (cadr (assoc 'fg-dim (modus-themes-get-theme-palette - (or (my/modus-p) (my/ef-p))))))) + (let* ((base-value (string-to-number (substring (symbol-name color) 4 5))) + (palette (modus-themes-get-theme-palette + (or (my/modus-p) (my/ef-p)) + :with-overrides :with-user-palette)) + (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)))) (defun my/prot-color (color palette) @@ -181,10 +182,11 @@ (t (cadr (assoc color palette)))))) (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) - (my/prot-color color (modus-themes-get-theme-palette (my/ef-p)))) +(defalias 'my/ef-color 'my/modus-color) (defconst my/test-colors-list '(black red green yellow blue magenta cyan white light-black diff --git a/.emacs.d/modules/sqrt-index.el b/.emacs.d/modules/sqrt-index.el index d6e9ff6..d4c6bb8 100644 --- a/.emacs.d/modules/sqrt-index.el +++ b/.emacs.d/modules/sqrt-index.el @@ -463,21 +463,24 @@ def rclone_run_all(folders): total_transfers += res.get('stats', {}).get('transfers', 0) total_deleted += res.get('stats', {}).get('deletes', 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: - error_msg = f'Sync error for remote {REMOTE}!' + msg += '''\nSync errors for the following folders:''' for folder in error_folders: - error_msg += '''\n- ''' + folder - notify(f'rclone sync {REMOTE}', error_msg, level='critical') - else: - msg = '' - 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(msg) > 0: - notify(f'rclone sync {REMOTE}', msg) + msg += '''\n- ''' + folder + level = 'critical' + + if len(msg) > 0: + notify(f'rclone sync {REMOTE}', msg, level=level) if __name__ == '__main__': rclone_run_all(FOLDERS) @@ -583,7 +586,7 @@ The return value is a list of commands as defined by E.g. 10.03.R.01 Project Name -> Project Name." (replace-regexp-in-string - (rx bos (+ (| num alpha "." "-")) space) "" name)) + (rx bos (+ num) (? "." (+ (| num alpha "." "-"))) space) "" name)) (defun my/index--wakatime-escape (string) "Escape STRING for use in a WakaTime config file." diff --git a/.emacs.d/modules/sqrt-org-productivity.el b/.emacs.d/modules/sqrt-org-productivity.el index 6b08d1a..947d1e7 100644 --- a/.emacs.d/modules/sqrt-org-productivity.el +++ b/.emacs.d/modules/sqrt-org-productivity.el @@ -152,6 +152,8 @@ (org-element-property :end element)))) (with-temp-buffer (insert s) + (let (org-mode-hook) + (org-mode)) (org-clock-sum) org-clock-file-total-minutes))) diff --git a/.emacs.d/modules/sqrt-telega.el b/.emacs.d/modules/sqrt-telega.el index 4710ffc..b9aa369 100644 --- a/.emacs.d/modules/sqrt-telega.el +++ b/.emacs.d/modules/sqrt-telega.el @@ -11,10 +11,8 @@ :background (my/color-value 'fg)) (telega-entity-type-spoiler :background (my/color-value 'base8))) :config - (when (file-exists-p "~/.guix-extra-profiles/emacs/emacs/bin/telega-server") - (setq telega-server-command - (expand-file-name - "~/.guix-extra-profiles/emacs/emacs/bin/telega-server"))) + (setq telega-server-libs-prefix "/usr") + (setq telega-emoji-use-images nil) (setq telega-chat-fill-column 80) (setq telega-completing-read-function #'completing-read) @@ -37,15 +35,6 @@ telega-image-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) (setq telega-mode-line-string-format '("[" diff --git a/.emacs.d/modules/sqrt-terms.el b/.emacs.d/modules/sqrt-terms.el index 7b2f16b..45000d5 100644 --- a/.emacs.d/modules/sqrt-terms.el +++ b/.emacs.d/modules/sqrt-terms.el @@ -346,6 +346,7 @@ (use-package eshell-atuin :straight (:host github :repo "SqrtMinusOne/eshell-atuin") + :when (executable-find "atuin") :after eshell :config (eshell-atuin-mode) diff --git a/.emacs.d/modules/sqrt-wakatime.el b/.emacs.d/modules/sqrt-wakatime.el index dcda0f0..e92f945 100644 --- a/.emacs.d/modules/sqrt-wakatime.el +++ b/.emacs.d/modules/sqrt-wakatime.el @@ -6,6 +6,7 @@ (advice-add 'wakatime-init :after (lambda () (setq wakatime-cli-path (or + (executable-find "wakatime") (executable-find "wakatime-cli") (expand-file-name "~/bin/wakatime-cli"))))) (when (file-exists-p "~/.wakatime.cfg") diff --git a/.nix-channels b/.nix-channels deleted file mode 100644 index f0c6733..0000000 --- a/.nix-channels +++ /dev/null @@ -1 +0,0 @@ -https://nixos.org/channels/nixpkgs-unstable nixpkgs diff --git a/.profile b/.profile index 68ef667..393c3ab 100755 --- a/.profile +++ b/.profile @@ -46,6 +46,10 @@ export JUPYTER_CONFIG_DIR=$HOME/.config/jupyter export GIO_EXTRA_MODULES="" # 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]] if [ -d "$HOME/.cask" ]; then export PATH="/home/pavel/.cask/bin:$PATH" diff --git a/.tmux.line.conf b/.tmux.line.conf index 98bd9b1..abd3568 100644 --- a/.tmux.line.conf +++ b/.tmux.line.conf @@ -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-separator "" 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-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 " -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]" +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=#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=#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]" # UI:1 ends here diff --git a/Arch.org b/Arch.org index 2fa7b3f..8a64a4a 100644 --- a/Arch.org +++ b/Arch.org @@ -110,6 +110,7 @@ api_key = Then run =emacs= and make sure it starts. Run: - =M-x nerd-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=. @@ -120,6 +121,11 @@ Create some directories: mkdir -p /home/pavel/Pictures/screenshots/ #+end_src +Also run: +#+begin_src bash +sudo chmod +s /usr/bin/light +#+end_src + * 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. @@ -179,6 +185,7 @@ package_manager = "paru" Some necessary Arch packages: | Arch dependency | |---------------------| +| amneziavpn-bin | | base | | base-devel | | decman | @@ -200,12 +207,13 @@ Some necessary Arch packages: | pipewire-alsa | | pipewire-pulse | | pipewire-jack | +| sof-firmware | | smartmontools | | vim | | xterm | | wget | | wireless_tools | -| wpa_supplicant | +| wireplumber | | yadm | | zram-generator | @@ -226,5 +234,5 @@ Various drivers, I'm not sure which I actually need, so... #+end_src #+begin_src scheme :tangle .config/metapac/groups/system.toml :noweb yes -<ger> +<> #+end_src diff --git a/Console.org b/Console.org index d99a6f4..bd5b8ae 100644 --- a/Console.org +++ b/Console.org @@ -123,6 +123,13 @@ Somehow LibreOffice doesn't work without the following: #+begin_src sh export GIO_EXTRA_MODULES="" #+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 Using other package managers requires some extra work. @@ -504,6 +511,11 @@ if type -q direnv end #+end_src ** atuin + +| Arch dependency | +|-----------------| +| atuin | + #+begin_src fish if type -q atuin set -gx ATUIN_NOBIND "true" @@ -743,8 +755,8 @@ cyan = "<>" white = "<>" [colors.primary] -background: "<>" -foreground: "<>" +background = "<>" +foreground = "<>" [env] 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 [flags] hide_table_gap = true # Remove space in tables -color = "<>" process_command = true +[styles] +theme = "<>" + [processes] columns = ["PID", "State", "Name", "CPU%", "Mem%", "R/s", "W/s", "User"] #+end_src @@ -1061,6 +1075,26 @@ fi (job "0 * * * *" "autocommit /home/pavel/30-39\\ Life/32\\ org-mode/") (job "0,15,30,45 * * * *" "autocommit ~/.password-store") #+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 #+NAME: packages #+begin_src emacs-lisp :tangle no diff --git a/Desktop.org b/Desktop.org index 992c663..18ff546 100644 --- a/Desktop.org +++ b/Desktop.org @@ -1217,11 +1217,12 @@ And the EXWM config itself. (defun my/exwm-init () (exwm-workspace-switch 1) - (my/exwm-run-polybar) (my/exwm-set-wallpaper) (my/exwm-run-shepherd) (my/exwm-run-systemd) (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) (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') 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}" if [[ $status == 'afk' ]]; then # echo "%{u<>}%{+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 | firefox | +| browsers | firefox-tridactyl | ** Office & Multimedia | Category | Arch dependency | |----------+-----------------| diff --git a/Emacs.org b/Emacs.org index 5b3132e..957f153 100644 --- a/Emacs.org +++ b/Emacs.org @@ -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. #+begin_src emacs-lisp (defun my/modus-get-base (color) - (let ((base-value (string-to-number (substring (symbol-name color) 4 5))) - (base-start (cadr (assoc 'bg-main (modus-themes-get-theme-palette - (or (my/modus-p) (my/ef-p)))))) - (base-end (cadr (assoc 'fg-dim (modus-themes-get-theme-palette - (or (my/modus-p) (my/ef-p))))))) + (let* ((base-value (string-to-number (substring (symbol-name color) 4 5))) + (palette (modus-themes-get-theme-palette + (or (my/modus-p) (my/ef-p)) + :with-overrides :with-user-palette)) + (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)))) (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)))))) (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) - (my/prot-color color (modus-themes-get-theme-palette (my/ef-p)))) +(defalias 'my/ef-color 'my/modus-color) #+end_src 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)))) (with-temp-buffer (insert s) + (let (org-mode-hook) + (org-mode)) (org-clock-sum) org-clock-file-total-minutes))) #+end_src diff --git a/bin/davmail-6.0.0-3375/davmail.properties b/bin/davmail-6.0.0-3375/davmail.properties deleted file mode 100644 index aaaa8aa..0000000 --- a/bin/davmail-6.0.0-3375/davmail.properties +++ /dev/null @@ -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 diff --git a/bin/dummies/lsb_release b/bin/dummies/lsb_release deleted file mode 100755 index fd96c3b..0000000 --- a/bin/dummies/lsb_release +++ /dev/null @@ -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 diff --git a/bin/polybar/aw_afk.sh b/bin/polybar/aw_afk.sh index b30c92e..18e1687 100755 --- a/bin/polybar/aw_afk.sh +++ b/bin/polybar/aw_afk.sh @@ -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') 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}" if [[ $status == 'afk' ]]; then # echo "%{u#cc3333}%{+u} [AFK] $res %{u-}" diff --git a/bin/scripts/activate-profiles b/bin/scripts/activate-profiles deleted file mode 100755 index f7b8d54..0000000 --- a/bin/scripts/activate-profiles +++ /dev/null @@ -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 diff --git a/bin/scripts/aw-watcher-afk-wrapper b/bin/scripts/aw-watcher-afk-wrapper deleted file mode 100755 index d01610d..0000000 --- a/bin/scripts/aw-watcher-afk-wrapper +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -# [[file:../../Desktop.org::*ActivityWatch][ActivityWatch:2]] -sleep 5 -aw-watcher-afk -# ActivityWatch:2 ends here diff --git a/bin/scripts/guix-off b/bin/scripts/guix-off deleted file mode 100755 index e4c2e79..0000000 --- a/bin/scripts/guix-off +++ /dev/null @@ -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