Code Monkey home page Code Monkey logo

runit-services's Introduction

runit-services

Collection of runit service scripts missing from the Arch Artix Linux repos.

Table of Contents

  1. System (root) Services
  2. User (Session) Services
  3. Runit Tips & Tricks
  4. License

System (root) Services

backlight

Preserve the current display backlight level between reboots.

colord

colord is a system service that makes it easy to manage, install and generate color profiles to accurately color manage input and output devices.

psd

Profile Sync Daemon: symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers.

Works only with PSD v5.x, since v6+ they went systemd-only way.

thinkfan

thinkfan: the minimalist fan control program.

User (Session) Services

The services in this section depend on user session (X11 or otherwise) to be initialized to be run. Moreover, some services can form dependency chains (e.g. pipewire). For dependency checking, scripts assume certain installation path, namely ~/.runit/sv. For more info see the section How to Use User Session Services.

mpd

Music Player Daemon: a daemon for playing music of various formats.

Note that the script mpd/run depends on pipewire-pulse service (see below). If you don't use PipeWire, you need to delete or comment out the line sv check ... in mpd/run file.

redshift

Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night.

safeeyes

Safe Eyes is a Free and Open Source tool for Linux users to reduce and prevent repetitive strain injury (RSI).

syncthing

Syncthing is a continuous file synchronization program.

picom

picom is a compositor for X, and a fork of Compton.

btpd

btpd is a BitTorrent client for linux.

pipewire

PipeWire is a project that aims to greatly improve handling of audio and video under Linux. WirePlumber is a modular session / policy manager for PipeWire. pipewire-pulse is a drop-in replacement for the PulseAudio daemon.

Note that the PipeWire services are supposed to be run with a user session. Moreover, they form a startup dependency chain (pipewire -> wireplumber -> pipewire-pulse). So if you want to use pipewire-pulse, make sure that the other two are also installed and enabled.

The pipewire-pulse/run and wireplumber/run scripts assume certain directory structure for checking their dependency. If you store your local services under a different directory, you need to modify the sv check line in wireplumber/run and pipewire-pulse/run accordingly.

See the next section for the details on how to install and activate the pipewire services.

Runit Tips & Tricks

How to Use User Session Services

mkdir -p ~/.runit/{sv,runsvdir}
cp -r /path/to/cloned/services/{wireplumber,pipewire{,-pulse}} ~/.runit/sv
# Enable the services
ln -s ~/.runit/sv/pipewire ~/.runit/runsvdir/pipewire
ln -s ~/.runit/sv/wireplumber ~/.runit/runsvdir/wireplumber
ln -s ~/.runit/sv/pipewire-pulse ~/.runit/runsvdir/pipewire-pulse

Finally, use runsvdir to start the services:

runsvdir ~/.runit/runsvdir

In order to start the services automatically upon login, you may want to add the previous command to your ~/.xinitrc or create a corresponding .desktop file in ~/.config/autostart/.

Properly restarting logger sub-service

When you edit the logger script (e.g. colord/log/run) or otherwise change the logger configuration (e.g. change the value of the variable LOGGING_ENABLE in colord/conf), you need to properly restart both the service and its logger sub-service. This is because Runit uses a pipe between the main service process and the logger, so merely doing sv restart colord/log wont do the trick.

Runit's exit command kills both the service and its logger. Here is how to do it with a system service:

sv exit colord
# The following is redundant, if you use runsvdir(1) to manage the service tree.
sv up colord

The same with a user session service:

sv exit ~/.runit/sv/mpd
# The following is redundant, if you use runsvdir(1) to manage the service tree.
sv up ~/.runit/sv/mpd

License

CC0 / Public Domain

CC0

runit-services's People

Contributors

chaussebenjamin avatar madand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

runit-services's Issues

Can't get runsvdir to start via runit

I'm trying to run runsvdir via a system service as described in the Artix Wiki. I would start the user services via my .xinitrc, but sometimes I like to sit back and work from the tty, and I like to have pipewire running so I can listen to music. Is there any better way than running the user services after your X11 session has been started?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.