From 31ee4472e897cbf0c3d61bd56bd5864f4507b659 Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Thu, 4 May 2023 10:01:34 -0300 Subject: re-initial Signed-off-by: Anna (navi) Figueiredo Gomes --- conf.d/tmux | 2 ++ conf.d/wireplumber | 0 init.d/dbus | 6 ++++++ init.d/emacs | 10 ++++++++++ init.d/mpd | 32 ++++++++++++++++++++++++++++++++ init.d/pipewire | 5 +++++ init.d/pipewire-pulse | 10 ++++++++++ init.d/tmux | 18 ++++++++++++++++++ init.d/wireplumber | 12 ++++++++++++ rc.conf | 3 +++ 10 files changed, 98 insertions(+) create mode 100644 conf.d/tmux create mode 100644 conf.d/wireplumber create mode 100755 init.d/dbus create mode 100755 init.d/emacs create mode 100755 init.d/mpd create mode 100755 init.d/pipewire create mode 100755 init.d/pipewire-pulse create mode 100755 init.d/tmux create mode 100755 init.d/wireplumber create mode 100644 rc.conf diff --git a/conf.d/tmux b/conf.d/tmux new file mode 100644 index 0000000..7f86f7b --- /dev/null +++ b/conf.d/tmux @@ -0,0 +1,2 @@ +sessions="weechat" +commands_weechat="weechat" diff --git a/conf.d/wireplumber b/conf.d/wireplumber new file mode 100644 index 0000000..e69de29 diff --git a/init.d/dbus b/init.d/dbus new file mode 100755 index 0000000..055c1ba --- /dev/null +++ b/init.d/dbus @@ -0,0 +1,6 @@ +#!/sbin/openrc-run + +pidfile="${XDG_RUNTIME_DIR:-${RC_SVCDIR}}/${RC_SVCNAME#*.}" +command="/usr/bin/dbus-daemon" +command_args="--session --syslog --nofork --address unix:path=${XDG_RUNTIME_DIR:-${RC_SVCDIR}}/bus" +command_background=yes diff --git a/init.d/emacs b/init.d/emacs new file mode 100755 index 0000000..f882e86 --- /dev/null +++ b/init.d/emacs @@ -0,0 +1,10 @@ +#!/sbin/openrc-run + +command="/usr/bin/emacs" +command_args="--fg-daemon" +command_background="true" +pidfile=${XDG_RUNTIME_DIR:-${SVCDIR}}/emacs.pid +description="Start an Emacs server running in the background" +depend() { + after dbus +} diff --git a/init.d/mpd b/init.d/mpd new file mode 100755 index 0000000..d2a7654 --- /dev/null +++ b/init.d/mpd @@ -0,0 +1,32 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +: CFGFILE=${CFGFILE:=${XDG_CONFIG_HOME:-${HOME}/.config}/mpd/mpd.conf} + +depend() { + use pipewire pulseaudio + config ${CFGFILE} +} + +get_config() { + x=$1 + test -e ${CFGFILE} || return 1 + sed -n \ + -e '/^[ \t]*'${x}'/{s:^[ \t]*'${x}'[ \t]\+"\?\([^#"]\+\)[^"]*"\?$:\1: ; p }' \ + ${CFGFILE} +} + +extra_started_commands='reload' +# Required by io_uring +command=/usr/bin/mpd +command_args=${CFGFILE} +required_files=${CFGFILE} +pidfile=$(get_config pid_file) +description="Music Player Daemon" + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + start-stop-daemon --pidfile ${pidfile} --signal HUP + eend $? +} diff --git a/init.d/pipewire b/init.d/pipewire new file mode 100755 index 0000000..e5c9e89 --- /dev/null +++ b/init.d/pipewire @@ -0,0 +1,5 @@ +#!/sbin/openrc-run + +command="/usr/bin/pipewire" +command_background="true" +pidfile="${XDG_RUNTIME_DIR:-${SVCDIR}}/pipewire.pid" diff --git a/init.d/pipewire-pulse b/init.d/pipewire-pulse new file mode 100755 index 0000000..9e029c3 --- /dev/null +++ b/init.d/pipewire-pulse @@ -0,0 +1,10 @@ +#!/sbin/openrc-run + +depend() { + need pipewire +} + +command="/usr/bin/pipewire" +command_args="-c pipewire-pulse.conf" +command_background="true" +pidfile="${XDG_RUNTIME_DIR:-${SVCDIR}}/pipewire-pulse.pid" diff --git a/init.d/tmux b/init.d/tmux new file mode 100755 index 0000000..770a996 --- /dev/null +++ b/init.d/tmux @@ -0,0 +1,18 @@ +#!/sbin/openrc-run + +user=$(whoami) +command="/usr/bin/tmux" +command_args="new-session -s ${user} -t ${user} -d" +pidfile="${XDG_RUNTIME_DIR:-RC_SVCDIR}/tmux.pid" +description="Start a tmux session" + +start_post() { + tmux display-message -p '#{pid}' > ${pidfile} + for session in ${sessions}; do + tmux new-session -s ${session} -d + eval local commands="\${commands_${session}}" + for command in "${commands}"; do + tmux new-window -n "${session}":"${command}" "${command}" + done + done +} diff --git a/init.d/wireplumber b/init.d/wireplumber new file mode 100755 index 0000000..823ff2d --- /dev/null +++ b/init.d/wireplumber @@ -0,0 +1,12 @@ +#!/sbin/openrc-run + +depend() { + need pipewire dbus +} + +DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR:-${RC_SVCDIR}}/bus" +export DBUS_SESSION_BUS_ADDRESS + +command="/usr/bin/wireplumber" +command_background=true +pidfile="${XDG_RUNTIME_DIR-:${SVCDIR}}/wireplumber.pid" diff --git a/rc.conf b/rc.conf new file mode 100644 index 0000000..d5a2ac1 --- /dev/null +++ b/rc.conf @@ -0,0 +1,3 @@ +rc_parallel="NO" +rc_env_allow="DBUS_SESSION_BUS_ADDRESS" +unicode="YES" -- cgit v1.2.3