Commit graph

26 commits

Author SHA1 Message Date
969c836790
services: Remove deprecated X services 2023-01-07 14:52:14 +01:00
ff2cbe7e2d
mail: Rename mailbox syncing script
Renamed script to sync local mbox directory with remote from `mail-check`
to `sync-mail`. Changed necessary integrations accordingly (neomutt and
system service).
2022-12-08 13:43:43 +01:00
524272f063
services: Remove a slew of X-related services
These were largely remaining systemd services after I removed X and that
now dangle in limbo without working correctly.

Two services are not X related, which are the two dropdowns that I
rarely use anymore on riverwm. May substitute them for something similar
soon but do not need them at the moment.
2022-08-10 08:59:20 +02:00
6fabac6cd8
kitty: Switch to kitty terminal emulator
Finally made the switch from alacritty to kitty. I have been thinking
about this for a while. Both, fundamentally, serve my purposes just
fine. Both are fast, customizable, gpu accelerated, and so on.
Kitty feels a little faster on the input, but this should not provide
major differences.

One big difference, however, is now very apparent and I can feel it:
Alacritty, on wayland, does not support any picture preview. It does not
support sixel, and things like w3mimg or ueberzug are based on and
require X11 to run.
Kitty brings its own graphics display library and it seems both pretty
stable and fast.
I have not done much more with it than use it in things like vifm image
previews but it should be much more stable than things like ueberzug,
much faster than things like sixel. Time will tell.

Switched other modules to make use of kitty instead of alacritty:
vifm uses kitty previews,
river spawns kitty instances,
systemd units use kitty instances,
waybar presents extra mouse-click interactions through kitty,
and styler contains a processor to style kitty permanently.

I would love to converge this all a bit more on the `$TERMINAL` env var,
but this is unfortunately difficult for things like systemd and waybar.
For waybar I currently see no real way except for a custom
`ideal-terminal` script which just goes down the list of terminal
emulators I want to run, depending on which is installed,
since it does not read env vars,
while for systemd it might be feasible to import user environment
variables,
but also connected to additional complexity and overhead which it does
not seem worth for the currently two simple service units it affects.

Also removed some obsolete sxhkd and sh settings from the move to
wayland.
2022-01-16 15:18:07 +01:00
207de4778b
services: Add geoclue agent as systemd autostart
Added geoclue as a unit file and set it to autostart by default.
Redshift on archlinux has problems working correctly if there is no
(gnome?) desktop environment and the geoclue agent has thus not been
started yet. This simply runs it on startup as a user service and
redshift subsequently picks it up to get its location from.
2021-04-12 18:40:47 +02:00
d767daef66
services: Remove keybase services
I have stopped using keybase a while ago, (due to switching over to
keyoxide, and generally being a bit weary after reading about some of
the more shady dealings of keybase, culminating at some point with its
zoom take-over) this also removes some of its associated systemd
invocations.
2021-04-04 20:58:44 +02:00
f4400da743
repo: Update linting for 4-spaced shell scripts 2021-04-04 20:52:52 +02:00
0b43d717d3
git-sync: Add sanity check before remote pull
Added check to fetch remote updates before actually pulling in remote
changes.
This may help somewhat with the modification of files when they are
simultaneously open in vim, though I am not entirely sure.
Needs further investigation.
2020-11-13 08:21:16 +01:00
bbfbf5bcfe
services: Add activitywatch service
Added service module to automatically start activitywatch in the
background, to monitor window usage throughout.
2020-11-04 13:02:07 +01:00
94673ea507
services: Fix shellcheck error 2020-09-25 11:24:10 +02:00
7bee413323
services: Reorganize services, detect X
Detect X autostart a bit better with a separate service. The service
relies on a shell script which searches for a socket which X creates on
startup and only finishes when it finds the socket succesfully.

This makes services which need X to start successfully a bit more
robust, and while it can still break if X takes too long, it should be
more stable now.

Finally, services can restart more quickly when ended since they don't
require the 2+ `RestartSec` option to be present anymore to successfully
start.
2020-09-24 16:24:42 +02:00
e5414cbadf
services: Fix flashfocus startup
Flashfocus did not start up correctly since it was not required for the
`default.target` which is the only (?) valid target when systemd
operates in user-mode.

Instead of overwriting just part of the flashfocus service file, and
subsequently having it enabled for default.target and a non-existent
graphical.target user environment, we overwrite the whole file and set
it to `default.target`.

Additionally, the service should be restarted when it fails and slow
down on its restart attempts (I kept 5 seconds for this one, since it is
not as time critical as others -- no one cares if windows only flash
5 seconds after starting the machine.)

Added (wishful) After components to many service units, in case I figure
out one day how to make a useful target for the systemd user mode.
2020-09-23 17:55:07 +02:00
b83929bcbd
services: Move flashfocus to systemd service
Removed manual initialization of flashfocus from xinitrc, enabled the
service in systemd.

Changed the restart timer to 5 seconds, to mirror other X-dependent user
services to circumvent systemd being too eager to start the service
before X is ready on booting.
2020-09-18 13:16:09 +02:00
34fca7670f
services: Lower restart time to 2 seconds
Main issue the restart delay fixes is that services don't wait for X to
be ready on startup (which is bad if the application being started
requires X being ready to actually work.)

I have still not found a way to work around waiting for X being ready
other then the ugly delay hack (for systemd --user modules at least).

However, the delay can be --- in most cases --- smaller than 5 seconds.
All my machines start reasonably fast and have X up and running from
pressing login to staring at the wallpaper in a couple seconds at most.

If services don't start correctly and the error is X not being ready,
increase the startup delay once again.
2020-09-12 17:37:43 +02:00
12beacac19
nvim: Fix 'vim:' modeline, add paragraph highlights
Fixed bug when line in todo dropdown starts with `vim:`, `vi:`, or `:ex`
which would automatically be read by vim and tried to be set in the
editor. Removed modeline reading from vim to fix the bug, and since it
provides quite an attack vector anyway.

Added Limelight to its startup procedure to highlight the current to-do
paragraph.
2020-09-08 14:58:36 +02:00
845dbba848
services: Increase restart period for X services
Dropdown services need an X server to connect to and fail autostarting
if there's no available server.

HACK

Increasing their restart timer will alleviate this problem, *but* it
also means the dropdowns will start more slowly when closed by the user.

There should be another way to alleviate one issue (start automatically
after X is available) without exacerbating the other (restart when you
have been closed).
2020-07-29 09:49:51 +02:00
5d4998481f
services: Unify naming pattern to kebab case 2020-07-29 09:38:22 +02:00
cc0cdd2a6c
services: Add autostarting dropdown todo list
Added systemd-controlled automatic restart to existing i3 todo list
overlay (super+t). Contains a lot of hard-coded paths and applications.
2020-07-29 09:35:23 +02:00
1c45202f18
services: Add autostarting dropdown-terminal 2020-07-29 09:22:31 +02:00
440629f3c3
services: Rename commit_notes to uni_notes_sync 2020-07-29 08:13:32 +02:00
0b65023253
services: Add autostart for several other packages
Autostarts an2linuxserver, dunst, kbfs, keybase, and the keybase://
redirector.

Will (presumably) complain if one of the programs is missing. Either
this should not be enabled by default or the startup service should
contain a sanity check for the program before attempting to launch
itself.
2020-07-29 08:13:32 +02:00
51178df4a3
services: Add time override to greenclip, redshift
Both greenclip and redshift did not automatically start on system start,
since they needed X to be running but their restart was almost
instantaneously. So, they restarted their alloted 5 times before X was
ready and gave up.

Restart time has been set to 5 and 10 seconds, so their startup takes a
little longer but should, in most cases, succeed.
2020-07-29 08:13:25 +02:00
90fcf81dfd
services: Fix commit_notes service autostart
Used wrong 'after' designation which would wait forever since it needed
to start after the runlevel which it was designated to run at.

Committed default.target.wants symlink to service file to automatically
enable its autostart on new machines.

This wil only really work for my directory set-up, so perhaps either the
service module should be disabled by default for the installation, be
asked during installation, or simply be manually enabled to autostart
during initial set-up (maybe mention in readme for the module).
2020-07-23 23:37:53 +02:00
a6096c25ef
[services] Make git-sync script more universal
Can now sync any folder, passed in on the command line.
2020-06-17 21:01:09 +02:00
589211ed3a
[services] Fix note-sync services pushing
Fixed conditional to not always reset push timer, even if no changes
were made.
2020-06-08 22:33:12 +02:00
98377fdf00
[services] Add note sync service
Added service to automatically commit changes in notes directory (every
2 minutes) and automatically push them to their remote origin (after no
  changes occured for an hour).

Uses git and systemd to work as a service in the background. Gets
restarted on failure.
2020-06-06 09:22:14 +02:00