Compare commits

...

5 commits

27 changed files with 318 additions and 345 deletions

View file

@ -1,14 +1,14 @@
decorations = "none" # decorations = "none"
[colors.bright] [colors.bright]
Black = "#484848" black = "#484848"
Blue = "#cbcfff" blue = "#cbcfff"
Cyan = "#88c8ff" cyan = "#88c8ff"
Green = "#8adf80" green = "#8adf80"
Magenta = "#df8fff" magenta = "#df8fff"
Red = "#ff8f88" red = "#ff8f88"
White = "#ffffff" white = "#ffffff"
Yellow = "#fac200" yellow = "#fac200"
[colors.normal] [colors.normal]
black = "#222222" black = "#222222"

View file

@ -3,7 +3,7 @@ enabled_backends = ["arch"]
hostname_groups_enabled = true hostname_groups_enabled = true
[hostname_groups] [hostname_groups]
kek = ["browsers"] weiss = ["system","office","music","mail","latex","emacs","dev","desktop-rofi","desktop-polybar","desktop-misc","desktop","console","browsers"]
archlinux = ["system","office","music","mail","latex","emacs","dev","desktop-rofi","desktop-polybar","desktop-misc","desktop","console","browsers"] archlinux = ["system","office","music","mail","latex","emacs","dev","desktop-rofi","desktop-polybar","desktop-misc","desktop","console","browsers"]

View file

@ -1,4 +1,5 @@
arch = [ arch = [
"vnstat",
"activitywatch-bin", "activitywatch-bin",
"xdg-desktop-portal", "xdg-desktop-portal",
"flatpak", "flatpak",
@ -14,5 +15,4 @@ arch = [
"gnome-themes-extra", "gnome-themes-extra",
"xsettingsd", "xsettingsd",
"papirus-icon-theme", "papirus-icon-theme",
"gtk-engines", "gtk-engines",]
"gtk-engine-murrine",]

View file

@ -3,8 +3,10 @@ arch = [
"the_silver_searcher", "the_silver_searcher",
"ripgrep", "ripgrep",
"hledger", "hledger",
"rclone",
"gnu-free-fonts", "gnu-free-fonts",
"ttf-unifont", "ttf-unifont",
"telegram-tdlib",
"yt-dlp", "yt-dlp",
"mpv", "mpv",
"python-youtube-transcript-api", "python-youtube-transcript-api",

View file

@ -23,6 +23,7 @@ arch = [
"pacman-contrib", "pacman-contrib",
"openssh", "openssh",
"metapac", "metapac",
"networkmanager",
"nano", "nano",
"inetutils", "inetutils",
"linux-firmware", "linux-firmware",

View file

@ -188,8 +188,9 @@ radius = 0.0
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
font-3 = JetBrains Mono Nerd Font:monospace:size=13;4 font-3 = JetBrainsMono Nerd Font:style=Medium,Regular:size=13;4
font-4 = JetBrains Mono Nerd Font:monospace:size=17;4 font-4 = JetBrainsMono Nerd Font:style=Medium,Regular:size=17;4
font-5 = Adwaita Mono:style=Regular:size=13;3
; Global bar config:3 ends here ; Global bar config:3 ends here
; [[file:../../Desktop.org::*Global bar config][Global bar config:4]] ; [[file:../../Desktop.org::*Global bar config][Global bar config:4]]

View file

@ -0,0 +1,3 @@
- .*
- ~*
- .debris

View file

@ -0,0 +1,8 @@
[Unit]
Description=ActivityWatch
[Service]
ExecStart=/usr/bin/aw-qt
[Install]
WantedBy=wm-session.target

View file

@ -0,0 +1,9 @@
[Unit]
Description=DETERRED MPD Watcher
ConditionPathExists=/home/pavel/10-19 Code/13 Other Projects/13.02 sqrt-data/13.02.R Repos/13.02.R.05 deterred/watchers/deterred-mpd.py
[Service]
ExecStart=/usr/bin/python "/home/pavel/10-19 Code/13 Other Projects/13.02 sqrt-data/13.02.R Repos/13.02.R.05 deterred/watchers/deterred-mpd.py" "--db" "/home/pavel/.deterred/database.db"
[Install]
WantedBy=wm-session.target

View file

@ -0,0 +1,8 @@
[Unit]
Description=Flameshot
[Service]
ExecStart=/usr/bin/flameshot
[Install]
WantedBy=wm-session.target

View file

@ -0,0 +1,8 @@
[Unit]
Description=Music Player Daemon
[Service]
ExecStart=/usr/bin/mpd --no-daemon
[Install]
WantedBy=graphical-session.target

View file

@ -0,0 +1,8 @@
[Unit]
Description=Network Manager Applet
[Service]
ExecStart=/usr/bin/nm-applet
[Install]
WantedBy=wm-session.target

View file

@ -0,0 +1,6 @@
[Unit]
Description=Update notmuch mail index
[Service]
Type=oneshot
ExecStart=/usr/bin/bash /home/pavel/bin/scripts/check-email

View file

@ -0,0 +1,9 @@
[Unit]
Description=Run notmuch new every 5 minutes
[Timer]
OnBootSec=1min
OnUnitActiveSec=5min
[Install]
WantedBy=timers.target

View file

@ -0,0 +1,8 @@
[Unit]
Description=vnStat network monitor
[Service]
ExecStart=/usr/bin/vnstatd
[Install]
WantedBy=wm-session.target

View file

@ -0,0 +1,8 @@
[Unit]
Description=X Settings Daemon
[Service]
ExecStart=/usr/bin/xsettingsd
[Install]
WantedBy=wm-session.target

View file

@ -10,6 +10,9 @@
(executable-find "shepherd")) (executable-find "shepherd"))
(call-process "shepherd"))) (call-process "shepherd")))
(defun my/exwm-run-systemd ()
(call-process "systemctl" nil nil nil "--user" "start" "wm-session.target"))
(use-package pinentry (use-package pinentry
:straight t :straight t
:after (exwm) :after (exwm)
@ -592,6 +595,7 @@ _d_: Discord
(my/exwm-run-polybar) (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/run-in-background "gpgconf --reload gpg-agent") (my/run-in-background "gpgconf --reload gpg-agent")
(when (my/is-arch) (when (my/is-arch)
(my/run-in-background "set_layout"))) (my/run-in-background "set_layout")))

View file

@ -116,7 +116,8 @@
(string-match-p "/gnu/store" default-directory)) (string-match-p "/gnu/store" default-directory))
(nerd-icons-dired-mode)))) (nerd-icons-dired-mode))))
:config :config
(advice-add #'dired-create-empty-file :around #'nerd-icons-dired--refresh-advice)) ;; (advice-add #'dired-create-empty-file :around #'nerd-icons-dired--refresh-advice)
)
(use-package dired-open (use-package dired-open
:straight t :straight t

View file

@ -34,21 +34,9 @@ fi
# My paths:1 ends here # My paths:1 ends here
#!/usr/bin/env bash #!/usr/bin/env bash
# [[file:Console.org::*ssh-agent][ssh-agent:1]] # [[file:Console.org::*ssh-agent][ssh-agent:3]]
SSH_AGENT_DIR="/tmp" export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket
# ssh-agent:3 ends here
if [ "$IS_ANDROID" == "true" ]; then
SSH_AGENT_DIR="/data/data/com.termux/files/tmp"
mkdir -p $SSH_AGENT_DIR
fi
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
ssh-agent -t 1h > "$SSH_AGENT_DIR/ssh-agent.env"
fi
if [[ ! -f "$SSH_AUTH_SOCK" ]]; then
source "$SSH_AGENT_DIR/ssh-agent.env" >/dev/null
fi
# ssh-agent:1 ends here
# [[file:Console.org::*Misc settings][Misc settings:1]] # [[file:Console.org::*Misc settings][Misc settings:1]]
export JUPYTER_CONFIG_DIR=$HOME/.config/jupyter export JUPYTER_CONFIG_DIR=$HOME/.config/jupyter

View file

@ -21,7 +21,7 @@ xss-lock -- i3lock -f -i /home/pavel/Pictures/lock-wallpaper.png &
# Some apps that have to be launched only once. # Some apps that have to be launched only once.
picom & picom &
# nm-applet & # nm-applet &
dunst & # dunst &
copyq & copyq &
# Run the Emacs startup script as a session. # Run the Emacs startup script as a session.

View file

@ -1,5 +1,5 @@
#+PROPERTY: header-args :mkdirp yes
#+TITLE: Arch Linux #+TITLE: Arch Linux
#+PROPERTY: header-args :mkdirp yes
I've decided to switch to [[https://archlinux.org/][Arch Linux]] and configure it declaratively with [[https://github.com/ripytide/metapac][metapac]]. I've decided to switch to [[https://archlinux.org/][Arch Linux]] and configure it declaratively with [[https://github.com/ripytide/metapac][metapac]].
@ -64,19 +64,35 @@ gpg --edit-key <keyname>
trust trust
#+end_src #+end_src
Also the following to =~/.ssh/config=:
#+begin_src conf-space
Host *
AddKeysToAgent yes
#+end_src
Then, clone the dotfiles repo with =yadm=: Then, clone the dotfiles repo with =yadm=:
#+begin_src bash #+begin_src bash
yadm clone git@github.com:SqrtMinusOne/dotfiles.git yadm clone git@github.com:SqrtMinusOne/dotfiles.git
#+end_src #+end_src
Checkout the changed files. Checkout the changed files.
Clone the org-mode repo: Clone org-mode and passwords repos:
#+begin_src bash #+begin_src bash
git clone git@github.com:SqrtMinusOne/dotfiles.git "/home/pavel/30-39 Life/32 org-mode" git clone ssh://git@git.sqrtminusone.xyz:222/sqrtminusone/org-mode.git "/home/pavel/30-39 Life/32 org-mode"
git clone ssh://git@git.sqrtminusone.xyz:222/sqrtminusone/passwords.git "/home/pavel/.password-store"
#+end_src
And don't forget to configure git:
#+begin_src bash
git config --global user.email "thexcloud@gmail.com"
git config --global user.name "SqrtMinusOne"
#+end_src
#+begin_src bash
sudo systemctl enable --now NetworkManager
#+end_src #+end_src
Install wakatime: Install wakatime:
#+begin_src bash #+begin_src bash
cd ~/00-Scratch/ cd ~/00-Scratch/
git clone https://github.com/wakatime/wakatime-cli.git git clone https://github.com/wakatime/wakatime-cli.git
@ -95,8 +111,15 @@ 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=
Run =rclone config=, configure the remotes. Then =M-x my/index-commands-sync=.
If everything works, login into EXWM. If everything works, login into EXWM.
Create some directories:
#+begin_src bash
mkdir -p /home/pavel/Pictures/screenshots/
#+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.
@ -106,20 +129,20 @@ In =metapac=, packages are listed in "groups", each group being a TOML file stat
Below is the table enabling different groups on different hostnames: Below is the table enabling different groups on different hostnames:
#+NAME: metapac-groups #+NAME: metapac-groups
| Profile | archlinux | kek | | Profile | archlinux | weiss |
| browsers | + | + | | browsers | + | + |
| console | + | | | console | + | + |
| desktop | + | | | desktop | + | + |
| desktop-misc | + | | | desktop-misc | + | + |
| desktop-polybar | + | | | desktop-polybar | + | + |
| desktop-rofi | + | | | desktop-rofi | + | + |
| dev | + | | | dev | + | + |
| emacs | + | | | emacs | + | + |
| latex | + | | | latex | + | + |
| mail | + | | | mail | + | + |
| music | + | | | music | + | + |
| office | + | | | office | + | + |
| system | + | | | system | + | + |
And the code to format it as TOML: And the code to format it as TOML:
#+NAME: metapac-groups-format #+NAME: metapac-groups-format
@ -167,6 +190,7 @@ Some necessary Arch packages:
| linux-firmware | | linux-firmware |
| inetutils | | inetutils |
| nano | | nano |
| networkmanager |
| metapac | | metapac |
| openssh | | openssh |
| pacman-contrib | | pacman-contrib |
@ -202,5 +226,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()>> <<packages()>ger>
#+end_src #+end_src

View file

@ -87,9 +87,8 @@ fi
** ssh-agent ** ssh-agent
I'm paranoid so I encrypt my SSH keys. I'm paranoid so I encrypt my SSH keys.
Got the idea for below from [[https://wiki.archlinux.org/title/SSH_keys#SSH_agents][ArchWiki]]: I used to do the below, as instructed by [[https://wiki.archlinux.org/title/SSH_keys#SSH_agents][ArchWiki]]:
#+begin_src bash :tangle no
#+begin_src bash
SSH_AGENT_DIR="/tmp" SSH_AGENT_DIR="/tmp"
if [ "$IS_ANDROID" == "true" ]; then if [ "$IS_ANDROID" == "true" ]; then
@ -104,6 +103,16 @@ if [[ ! -f "$SSH_AUTH_SOCK" ]]; then
source "$SSH_AGENT_DIR/ssh-agent.env" >/dev/null source "$SSH_AGENT_DIR/ssh-agent.env" >/dev/null
fi fi
#+end_src #+end_src
But for now switched to the [[https://wiki.archlinux.org/title/SSH_keys#Start_ssh-agent_with_systemd_user][systemd unit]], which requires:
#+begin_src bash :tangle no
systemctl --user enable --now ssh-agent.service
#+end_src
#+begin_src bash
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket
#+end_src
** Misc settings ** Misc settings
Set Jupyter config PATH. I keep it from my Guix config where it defaulted to some readonly folder. Set Jupyter config PATH. I keep it from my Guix config where it defaulted to some readonly folder.
#+begin_src sh #+begin_src sh
@ -713,17 +722,15 @@ References:
- [[https://github.com/alacritty/alacritty/blob/master/alacritty.yml][default config]] - [[https://github.com/alacritty/alacritty/blob/master/alacritty.yml][default config]]
#+begin_src toml :noweb yes #+begin_src toml :noweb yes
decorations = "none"
[colors.bright] [colors.bright]
Black = "<<get-color(name="light-black")>>" black = "<<get-color(name="light-black")>>"
Red = "<<get-color(name="light-red")>>" red = "<<get-color(name="light-red")>>"
Green = "<<get-color(name="light-green")>>" green = "<<get-color(name="light-green")>>"
Yellow = "<<get-color(name="light-yellow")>>" yellow = "<<get-color(name="light-yellow")>>"
Blue = "<<get-color(name="light-blue")>>" blue = "<<get-color(name="light-blue")>>"
Magenta = "<<get-color(name="light-magenta")>>" magenta = "<<get-color(name="light-magenta")>>"
Cyan = "<<get-color(name="light-cyan")>>" cyan = "<<get-color(name="light-cyan")>>"
White = "<<get-color(name="light-white")>>" white = "<<get-color(name="light-white")>>"
[colors.normal] [colors.normal]
black = "<<get-color(name="black")>>" black = "<<get-color(name="black")>>"

View file

@ -121,6 +121,7 @@ Also, Xresources are used to set =Xft= settings. Unfortunately, the DPI setting
((string-equal hostname "eminence") 120) ((string-equal hostname "eminence") 120)
((string-equal hostname "violet") 120) ((string-equal hostname "violet") 120)
((string-equal hostname "iris") 120) ((string-equal hostname "iris") 120)
((string-equal hostname "weiss") 120)
(t 96))) (t 96)))
#+end_src #+end_src
@ -130,13 +131,13 @@ Xft.dpi: <<get-dpi()>>
** Themes ** Themes
A few programs I use to customize the apperance are listed below. A few programs I use to customize the apperance are listed below.
| Arch dependency | Description | | Arch dependency | Description | Disabled |
|--------------------+-------------------------| |--------------------+-------------------------+----------|
| gtk-engine-murrine | My preferred GTK theme | | gtk-engine-murrine | My preferred GTK theme | t |
| gtk-engines | | | gtk-engines | | |
| papirus-icon-theme | My preferred Icon theme | | papirus-icon-theme | My preferred Icon theme | |
| xsettingsd | X11 settings daemon | | xsettingsd | X11 settings daemon | |
| gnome-themes-extra | | | gnome-themes-extra | | |
[[https://github.com/derat/xsettingsd][xsettingsd]] is a lightweight daemon which configures X11 applications. It is launched with shepherd in the [[*Services][Services]] section. [[https://github.com/derat/xsettingsd][xsettingsd]] is a lightweight daemon which configures X11 applications. It is launched with shepherd in the [[*Services][Services]] section.
@ -244,7 +245,7 @@ xss-lock -- i3lock -f -i /home/pavel/Pictures/lock-wallpaper.png &
# Some apps that have to be launched only once. # Some apps that have to be launched only once.
picom & picom &
# nm-applet & # nm-applet &
dunst & # dunst &
copyq & copyq &
# Run the Emacs startup script as a session. # Run the Emacs startup script as a session.
@ -271,6 +272,9 @@ As of now, these are polybar, feh and, shepherd:
(when (and (string-empty-p (shell-command-to-string "pgrep -u pavel shepherd")) (when (and (string-empty-p (shell-command-to-string "pgrep -u pavel shepherd"))
(executable-find "shepherd")) (executable-find "shepherd"))
(call-process "shepherd"))) (call-process "shepherd")))
(defun my/exwm-run-systemd ()
(call-process "systemctl" nil nil nil "--user" "start" "wm-session.target"))
#+end_src #+end_src
*** Pinentry *** Pinentry
The GUI pinentry doesn't work too well with EXWM because of issues with popup windows, so we will use the Emacs one. The GUI pinentry doesn't work too well with EXWM because of issues with popup windows, so we will use the Emacs one.
@ -1216,6 +1220,7 @@ And the EXWM config itself.
(my/exwm-run-polybar) (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/run-in-background "gpgconf --reload gpg-agent") (my/run-in-background "gpgconf --reload gpg-agent")
(when (my/is-arch) (when (my/is-arch)
(my/run-in-background "set_layout"))) (my/run-in-background "set_layout")))
@ -2166,16 +2171,12 @@ radius = 0.0
Fonts Fonts
#+begin_src conf-windows #+begin_src conf-windows
; 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
font-3 = JetBrains Mono Nerd Font:monospace:size=13;4 font-3 = JetBrainsMono Nerd Font:style=Medium,Regular:size=13;4
font-4 = JetBrains Mono Nerd Font:monospace:size=17;4 font-4 = JetBrainsMono Nerd Font:style=Medium,Regular:size=17;4
font-5 = Adwaita Mono:style=Regular:size=13;3
#+end_src #+end_src
Modules. Because I sometimes set up different blocks on different monitors, they are set via environment variables. Modules. Because I sometimes set up different blocks on different monitors, they are set via environment variables.
@ -2231,6 +2232,8 @@ elif [ "$hostname" = "eminence" ]; then
fi fi
elif [ "$hostname" = "iris" ]; then elif [ "$hostname" = "iris" ]; then
TRAY_MONITOR="HDMI-1" TRAY_MONITOR="HDMI-1"
elif [ "$hostname" = "weiss" ]; then
TRAY_MONITOR="eDP-1"
else else
TRAY_MONITOR="DP-1" TRAY_MONITOR="DP-1"
fi fi
@ -3293,7 +3296,7 @@ References:
### 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
@ -3309,15 +3312,16 @@ References:
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 = <<get-color(name="bg-other", quote=1)>> background = <<get-color(name="bg-other", quote=1)>>
frame_color = <<get-color(name="border", quote=1)>> frame_color = <<get-color(name="border", quote=1)>>
@ -4373,14 +4377,33 @@ flatpak install -y --user flathub com.github.wwmm.pulseeffects
flatpak install -y --user flathub chat.rocket.RocketChat flatpak install -y --user flathub chat.rocket.RocketChat
#+end_example #+end_example
* Services * Services
:PROPERTIES: See [[https://wiki.archlinux.org/title/Systemd/User][systemd/User]] on Arch Wiki how to create user services.
:header-args+: :tangle ~/.config/shepherd/init.scm
:END:
[[https://www.gnu.org/software/shepherd/manual/html_node/index.html][GNU Shepherd]] is a service management system for GNU Guix. I'll probably migrate to systemd since I'm not on Guix anymore.
| Arch dependency | Disabled | After editing the services, run:
|-----------------+----------| #+begin_src bash
| shepherd | t | systemctl --user daemon-reload
#+end_src
It's required to enable them manually for now:
#+begin_src bash
systemctl --user enable --now nm-applet
systemctl --user enable --now aw-qt
systemctl --user enable --now deterred-mpd
systemctl --user enable --now vnstat
systemctl --user enable --now xsettingsd
systemctl --user enable --now flameshot
#+end_src
#+RESULTS:
** Custom target
Creating a custom target because otherwise systemd tries to launch everything before the WM is loaded.
#+begin_src conf :tangle .config/systemd/user/wm-session.target
[Unit]
Description=Window Manager Session
After=graphical-session.target
#+end_src
** Music ** Music
| Category | Arch dependency | | Category | Arch dependency |
@ -4393,51 +4416,29 @@ flatpak install -y --user flathub chat.rocket.RocketChat
| music | cuetools | | music | cuetools |
| music | flac | | music | flac |
Music player daemon #+begin_src conf :tangle .config/systemd/user/mpd.service
#+begin_src scheme [Unit]
(define mpd Description=Music Player Daemon
(make <service>
#:provides '(mpd) [Service]
#:respawn? #t ExecStart=/usr/bin/mpd --no-daemon
#:start (make-forkexec-constructor '("mpd" "--no-daemon"))
#:stop (make-kill-destructor))) [Install]
WantedBy=graphical-session.target
#+end_src #+end_src
MPD watcher #+begin_src conf :tangle .config/systemd/user/deterred-mpd.service
#+begin_src scheme [Unit]
(define sqrt-data-agent-mpd Description=DETERRED MPD Watcher
(make <service> ConditionPathExists=/home/pavel/10-19 Code/13 Other Projects/13.02 sqrt-data/13.02.R Repos/13.02.R.05 deterred/watchers/deterred-mpd.py
#:provides '(sqrt-data-agent-mpd)
#:respawn? #t
#:start (make-forkexec-constructor '("sqrt_data_agent_mpd"))
#:stop (make-kill-destructor)
#:requires '(mpd)))
(define deterred-mpd [Service]
(make <service> ExecStart=/usr/bin/python "/home/pavel/10-19 Code/13 Other Projects/13.02 sqrt-data/13.02.R Repos/13.02.R.05 deterred/watchers/deterred-mpd.py" "--db" "/home/pavel/.deterred/database.db"
#:provides '(deterred-mpd)
#:respawn? #t [Install]
#:start (make-forkexec-constructor WantedBy=wm-session.target
'("python" "/home/pavel/10-19 Code/13 Other Projects/13.02 sqrt-data/13.02.R Repos/13.02.R.05 deterred/watchers/deterred-mpd.py"
"--db" "/home/pavel/.deterred/database.db"))
#:stop (make-kill-destructor)
#:requires '(mpd)))
#+end_src #+end_src
** GNU Mcron
[[https://www.gnu.org/software/mcron/][GNU Mcron]] is a replacement for cron, written in Scheme.
| Arch dependency | Disabled |
|-----------------+----------|
| mcron | t |
#+begin_src scheme
(define mcron
(make <service>
#:provides '(mcron)
#:respawn? #t
#:start (make-forkexec-constructor '("mcron"))
#:stop (make-kill-destructor)))
#+end_src
** ActivityWatch ** ActivityWatch
[[https://activitywatch.net/][ActivityWatch]] is a FOSS time tracker. It tracks screen and application usage and has integrations with browsers, Emacs, etc. [[https://activitywatch.net/][ActivityWatch]] is a FOSS time tracker. It tracks screen and application usage and has integrations with browsers, Emacs, etc.
@ -4445,212 +4446,65 @@ MPD watcher
|-------------------| |-------------------|
| activitywatch-bin | | activitywatch-bin |
aw-server #+begin_src conf :tangle .config/systemd/user/aw-qt.service
#+begin_src scheme [Unit]
(define aw-server Description=ActivityWatch
(make <service>
#:provides '(aw-server) [Service]
#:respawn? #t ExecStart=/usr/bin/aw-qt
#:start (make-forkexec-constructor '("aw-server"))
#:stop (make-kill-destructor))) [Install]
WantedBy=wm-session.target
#+end_src #+end_src
=aw-watcher-afk= has some problems with statup, so there is a wrapper script
#+begin_src sh :tangle ~/bin/scripts/aw-watcher-afk-wrapper
sleep 5
aw-watcher-afk
#+end_src
aw-watcher-afk
#+begin_src scheme
(define aw-watcher-afk
(make <service>
#:provides '(aw-watcher-afk)
#:requires '(aw-server)
#:respawn? #t
#:start (make-forkexec-constructor '("/home/pavel/bin/scripts/aw-watcher-afk-wrapper"))
#:stop (make-kill-destructor)))
#+end_src
aw-watcher-window
#+begin_src scheme
(define aw-watcher-window
(make <service>
#:provides '(aw-watcher-window)
#:requires '(aw-server)
#:respawn? #t
#:start (make-forkexec-constructor '("aw-watcher-window"))
#:stop (make-kill-destructor)))
#+end_src
** PulseEffects
#+begin_src scheme
(define pulseeffects
(make <service>
#:provides '(pulseeffects)
#:respawn? #t
#:start (make-forkexec-constructor '("flatpak" "run" "com.github.wwmm.pulseeffects" "--gapplication-service"))
#:stop (make-kill-destructor)))
#+end_src
** xsettingsd ** xsettingsd
#+begin_src scheme #+begin_src conf :tangle .config/systemd/user/xsettingsd.service
(define xsettingsd [Unit]
(make <service> Description=X Settings Daemon
#:provides '(xsettingsd)
#:respawn? #t [Service]
#:start (make-forkexec-constructor '("xsettingsd")) ExecStart=/usr/bin/xsettingsd
#:stop (make-kill-destructor)))
[Install]
WantedBy=wm-session.target
#+end_src #+end_src
** nm-applet ** nm-applet
#+begin_src scheme #+begin_src conf :tangle .config/systemd/user/nm-applet.service
(define nm-applet [Unit]
(make <service> Description=Network Manager Applet
#:provides '(nm-applet)
#:respawn? #t
#:start (make-forkexec-constructor '("nm-applet"))
#:stop (make-kill-destructor)))
#+end_src
** Discord rich presence
References: [Service]
- [[https://github.com/flathub/com.discordapp.Discord/wiki/Rich-Precense-(discord-rpc)][Rich Precense (discord rpc)]] ExecStart=/usr/bin/nm-applet
#+begin_src scheme [Install]
(define discord-rich-presence WantedBy=wm-session.target
(make <service>
#:provides '(discord-rich-presence)
#:one-shot? #t
#:start (make-system-constructor "ln -sf {app/com.discordapp.Discord,$XDG_RUNTIME_DIR}/discord-ipc-0")))
#+end_src
** Polkit Authentication agent
Launch an authentication agent. Necessary for stuff like =pkexec=. I suspect I'm not doing that the intended way, but it seems to work.
#+begin_src scheme
(define polkit-gnome
(make <service>
#:provides '(polkit-gnome)
#:respawn? #t
#:start (make-forkexec-constructor '("/lib/polkit-gnome/polkit-gnome-authentication-agent-1"))
#:stop (make-kill-destructor)))
#+end_src
** Xmodmap
#+begin_src scheme
(define xmodmap
(make <service>
#:provides '(xmodmap)
#:one-shot? #t
#:start (make-system-constructor "xmodmap /home/pavel/.Xmodmap")))
#+end_src
** VPN
Run my [[file:Guix.org::*OpenVPN][OpenVPN setup]]. Not lauching this automatially, as it requires an active connection.
#+begin_src scheme
(define vpn
(make <service>
#:provides '(vpn)
#:respawn? #t
#:start (make-forkexec-constructor '("/home/pavel/bin/scripts/vpn-start"))
#:stop (make-kill-destructor)))
#+end_src
** Davmail
#+begin_src scheme
(define davmail
(make <service>
#:provides '(davmail)
#:respawn? #t
#:start (make-forkexec-constructor '("/home/pavel/bin/davmail"))
#:stop (make-kill-destructor)))
#+end_src #+end_src
** vnstatd ** vnstatd
#+begin_src scheme
(define vnstatd | Arch dependency |
(make <service> |-----------------|
#:provides '(vnstatd) | vnstat |
#:respawn? #t
#:start (make-forkexec-constructor '("vnstatd" "-n")) #+begin_src conf :tangle .config/systemd/user/vnstat.service
#:stop (make-kill-destructor))) [Unit]
Description=vnStat network monitor
[Service]
ExecStart=/usr/bin/vnstatd
[Install]
WantedBy=wm-session.target
#+end_src #+end_src
** opensnitch ** flameshot
[[https://github.com/evilsocket/opensnitch][opensnitch]] is a linux firewall. #+begin_src conf :tangle .config/systemd/user/flameshot.service
[Unit]
Description=Flameshot
=sudoers= has to be modified this to work. [Service]
#+begin_src scheme ExecStart=/usr/bin/flameshot
(define opensnitchd
(make <service>
#:provides '(opensnitchd)
#:respawn? #t
#:start (make-forkexec-constructor '("sudo" "opensnitchd"))
#:stop (make-kill-destructor)))
(define opensnitch-ui [Install]
(make <service> WantedBy=wm-session.target
#:provides '(opensnitch-ui)
#:respawn? #t
#:start (make-forkexec-constructor '("sudo" "opensnitch-ui"))
#:stop (make-kill-destructor)))
#+end_src
** ollama
#+begin_src scheme
(define ollama
(make <service>
#:provides '(ollama)
#:respawn? #t
#:start (make-forkexec-constructor '("ollama" "serve"))
#:stop (make-kill-destructor)))
#+end_src
** Shepherd config
For some reason, running start on a one-shot service started to hang shepherd, not sure why... Turining these off for now.
Register services:
#+begin_src scheme
(register-services
mpd
sqrt-data-agent-mpd
deterred-mpd
mcron
aw-server
aw-watcher-afk
aw-watcher-window
pulseeffects
xsettingsd
;; discord-rich-presence
polkit-gnome
vpn
davmail
;; xmodmap
nm-applet
vnstatd
;; opensnitchd
;; opensnitch-ui
ollama)
#+end_src
Daemonize shepherd
#+begin_src scheme
(action 'shepherd 'daemonize)
#+end_src
Run services
#+begin_src scheme
(for-each start '(mpd
sqrt-data-agent-mpd
deterred-mpd
mcron
aw-server
aw-watcher-afk
aw-watcher-window
pulseeffects
xsettingsd
;; discord-rich-presence
;; polkit-gnome
davmail
;; ; xmodmap
;; nm-applet
vnstatd
;; opensnitchd
;; opensnitch-ui
))
#+end_src #+end_src
* Arch settings * Arch settings
Other desktop programs I use are listed below. Other desktop programs I use are listed below.

View file

@ -11420,6 +11420,7 @@ Or you can load up Element for a moment to see what the mention was, if that's e
| Arch dependency | Disabled | | Arch dependency | Disabled |
|--------------------+----------| |--------------------+----------|
| emacs-telega-sever | t | | emacs-telega-sever | t |
| telegram-tdlib | |
| ttf-unifont | | | ttf-unifont | |
| gnu-free-fonts | | | gnu-free-fonts | |
@ -11436,10 +11437,8 @@ Or you can load up Element for a moment to see what the mention was, if that's e
: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)
@ -11463,18 +11462,6 @@ Or you can load up Element for a moment to see what the mention was, if that's e
telega-webpage-mode 3 "telega")) telega-webpage-mode 3 "telega"))
#+end_src #+end_src
Building =telega-server= can create problems. On Guix I can use the Guix package definition, on termux just build manually.
#+begin_src emacs-lisp
(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"))
#+end_src
Setting up the modeline. The default mode string doesn't look great with my other modeline modules, so I override that. Setting up the modeline. The default mode string doesn't look great with my other modeline modules, so I override that.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(add-hook 'telega-load-hook #'telega-mode-line-mode) (add-hook 'telega-load-hook #'telega-mode-line-mode)
@ -12795,6 +12782,10 @@ The return value is a list of commands as defined by
#+RESULTS: #+RESULTS:
: my/index--mega-commands : my/index--mega-commands
**** rclone **** rclone
| Arch dependency |
|-----------------|
| rclone |
This section wraps the [[https://rclone.org/bisync/][bisync]] command for rclone, which implements two-way sync. This section wraps the [[https://rclone.org/bisync/][bisync]] command for rclone, which implements two-way sync.
The general approach is: The general approach is:

View file

@ -298,7 +298,7 @@ echo "Running pre-new filters"
<<mail-tags(move="t",archive_root="Archive",root="pvkorytov_etu_mbox")>> <<mail-tags(move="t",archive_root="Archive",root="pvkorytov_etu_mbox")>>
echo "Pre-new filters done" echo "Pre-new filters done"
parallel --link -j0 "(cd /home/pavel/Mail/{1}/ && {2} {3})" ::: thexcloud progin6304 pvkorytov_etu ::: "$GMI" "$GMI" "offlineimap" ::: sync sync "" parallel --link -j0 "(cd /home/pavel/Mail/{1}/ && {2} {3})" ::: thexcloud progin6304 pvkorytov_etu ::: "$GMI" "$GMI" "offlineimap" ::: sync sync "-a pvkorytov-mbox"
#+end_src #+end_src
*** =post_new= *** =post_new=
@ -358,10 +358,33 @@ fi
echo "$(date +%s)" > $CHECK_FILE echo "$(date +%s)" > $CHECK_FILE
#+end_src #+end_src
The script is ran via GNU Mcron every 5 minutes. The script is ran via systemd every 5 minutes.
#+begin_src scheme :tangle ~/.config/cron/mail.guile #+begin_src conf :tangle .config/systemd/user/notmuch.service
(job "*/5 * * * * " "~/bin/scripts/check-email") [Unit]
Description=Update notmuch mail index
[Service]
Type=oneshot
ExecStart=/usr/bin/bash /home/pavel/bin/scripts/check-email
#+end_src #+end_src
#+begin_src conf :tangle .config/systemd/user/notmuch.timer
[Unit]
Description=Run notmuch sync script every 5 minutes
[Timer]
OnBootSec=1min
OnUnitActiveSec=5min
[Install]
WantedBy=timers.target
#+end_src
Don't forget to run:
#+begin_src bash
systemctl --user enable --now notmuch.timer
#+end_src
* MSMTP * MSMTP
| Arch dependency | | Arch dependency |
|-----------------| |-----------------|

View file

@ -35,5 +35,5 @@ notmuch search --output=files "NOT path:pvkorytov_etu_mbox/Etu.Grad_School/cur/*
notmuch search --output=files "NOT path:pvkorytov_etu_mbox/Archive/cur/** AND path:pvkorytov_etu_mbox/** AND NOT tag:inbox AND NOT tag:sent AND NOT tag:spam AND NOT tag:trash AND NOT tag:job.digital AND NOT tag:job.digital.docs AND NOT tag:job.digital.support AND NOT tag:job.digital.superservice AND NOT tag:job.digital.applicants AND NOT tag:job.digital.testers AND NOT tag:job.moevm AND NOT tag:etu AND NOT tag:etu.grad-school AND tag:pvkorytov" | xargs -I ! mv ! ~/Mail/pvkorytov_etu_mbox/Archive/cur/ notmuch search --output=files "NOT path:pvkorytov_etu_mbox/Archive/cur/** AND path:pvkorytov_etu_mbox/** AND NOT tag:inbox AND NOT tag:sent AND NOT tag:spam AND NOT tag:trash AND NOT tag:job.digital AND NOT tag:job.digital.docs AND NOT tag:job.digital.support AND NOT tag:job.digital.superservice AND NOT tag:job.digital.applicants AND NOT tag:job.digital.testers AND NOT tag:job.moevm AND NOT tag:etu AND NOT tag:etu.grad-school AND tag:pvkorytov" | xargs -I ! mv ! ~/Mail/pvkorytov_etu_mbox/Archive/cur/
echo "Pre-new filters done" echo "Pre-new filters done"
parallel --link -j0 "(cd /home/pavel/Mail/{1}/ && {2} {3})" ::: thexcloud progin6304 pvkorytov_etu ::: "$GMI" "$GMI" "offlineimap" ::: sync sync "" parallel --link -j0 "(cd /home/pavel/Mail/{1}/ && {2} {3})" ::: thexcloud progin6304 pvkorytov_etu ::: "$GMI" "$GMI" "offlineimap" ::: sync sync "-a pvkorytov-mbox"
# =pre_new=:2 ends here # =pre_new=:2 ends here

View file

@ -12,6 +12,8 @@ elif [ "$hostname" = "eminence" ]; then
fi fi
elif [ "$hostname" = "iris" ]; then elif [ "$hostname" = "iris" ]; then
TRAY_MONITOR="HDMI-1" TRAY_MONITOR="HDMI-1"
elif [ "$hostname" = "weiss" ]; then
TRAY_MONITOR="eDP-1"
else else
TRAY_MONITOR="DP-1" TRAY_MONITOR="DP-1"
fi fi