diff options
author | zachir <zachir@librem.one> | 2024-07-11 09:42:53 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2024-07-11 09:42:53 -0500 |
commit | d0c37b0eb7f2e3343aa504a4fe4c4c38692293bc (patch) | |
tree | 4b545786b4073e538a9befed42d13c767f24b671 | |
parent | f995945828966933168d9bffebab4f384a1855f4 (diff) | |
parent | f2956712c043c592e1c52eedbd4a901e8bb7423f (diff) |
Merge branch 'master' of zachir.xyz:zachir/dotfiles
30 files changed, 314 insertions, 16 deletions
@@ -164,6 +164,7 @@ odysee-nativefier*/ okularpartrc okularrc openrazer/ +package-lock.json pavucontrol.ini pcmanfm/ pcmanfm-qt/ @@ -210,6 +211,9 @@ Resonant DSP/ retroarch/ rncbc.org/ rtorrent/ +runit/sv/*/supervise +runit/sv/*/*/supervise +runit/runsvdir/* RVXX EXEX.settings RVXX v2/ RVXX v2.settings @@ -267,6 +271,7 @@ xmonad/xmonad.o xmonad/xmonad-x86_64-linux xsettingsd/ yabridgectl/ +yarn/ ytfzf/subscriptions yuzu/ zec-qt-wallet-org/ @@ -1,28 +1,16 @@ VIM := $(shell command -v vim 2>/dev/null) NVIM := $(shell command -v nvim 2>/dev/null) -XCONFS := X11/Xresources ZCONFS := zsh/.zshenv -SCONFS := sh/profile DCONFS := doas.conf all: -install: install-xconfigs install-shconfigs install-zshconfigs vimplug-vim vimplug-nvim - -install-xconfigs: $(XCONFS) - @echo "Installing Xorg conf files..." - @echo "Xresources..." - @ln -sf `pwd`/X11/Xresources ~/.Xresources - @echo "Done." - -install-shconfigs: $(SCONFS) - @echo "Installing SH conf files..." - @echo ".profile..." - @ln -sf `pwd`/sh/profile ~/.profile - @echo "Done." +install: install-zshconfigs vimplug-vim vimplug-nvim install-zshconfigs: $(ZCONFS) @echo "Installing zsh conf files..." + @echo "Setting ZSHDOTDIR globally..." + @$(shell sudo installers/set_zshdirs.sh) @echo ".zshenv..." @ln -sf `pwd`/zsh/.zshenv ~/.zshenv @echo "Done." diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 74dab8d..c8ab688 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -44,6 +44,7 @@ debug { } # }}} +# device {{{ $LAPTOP_TP_ENABLED = true device { name = synps/2-synaptics-touchpad diff --git a/installers/set_zshdirs.sh b/installers/set_zshdirs.sh new file mode 100755 index 0000000..2d82f19 --- /dev/null +++ b/installers/set_zshdirs.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ -f /etc/zshenv ]; then + ZSHENV="/etc/zshenv" +elif [ -d /etc/zsh ]; then + ZSHENV="/etc/zsh/zshenv" +else + ZSHENV="/etc/zshenv" +fi + +if ! grep -q "ZDOTDIR" $ZSHENV 2>/dev/null; then + echo "export ZDOTDIR=\"\$HOME\"/.config/zsh" >> $ZSHENV +fi diff --git a/python/pythonrc b/python/pythonrc new file mode 100644 index 0000000..cd954b6 --- /dev/null +++ b/python/pythonrc @@ -0,0 +1,24 @@ +def is_vanilla() -> bool: + import sys + return not hasattr(__builtins__, '__IPYTHON__') and 'bpython' not in sys.argv[0] + + +def setup_history(): + import os + import atexit + import readline + from pathlib import Path + + if state_home := os.environ.get('XDG_STATE_HOME'): + state_home = Path(state_home) + else: + state_home = Path.home() / '.local' / 'state' + + history: Path = state_home / 'python_history' + + readline.read_history_file(str(history)) + atexit.register(readline.write_history_file, str(history)) + + +if is_vanilla(): + setup_history() diff --git a/runit/conf/logind.conf b/runit/conf/logind.conf new file mode 100644 index 0000000..c31f33a --- /dev/null +++ b/runit/conf/logind.conf @@ -0,0 +1,54 @@ +# This file is part of elogind. +# +# elogind is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# Entries in this file show the compile time defaults. +# You can change settings by editing this file. +# Defaults can be restored by simply deleting this file. +# +# See logind.conf(5) for details. + +[Login] +KillUserProcesses=yes +#KillOnlyUsers= +#KillExcludeUsers=root +#InhibitDelayMaxSec=5 +#HandlePowerKey=poweroff +#HandleSuspendKey=suspend +#HandleHibernateKey=hibernate +#HandleLidSwitch=suspend +#HandleLidSwitchExternalPower=suspend +#HandleLidSwitchDocked=ignore +#PowerKeyIgnoreInhibited=no +#SuspendKeyIgnoreInhibited=no +#HibernateKeyIgnoreInhibited=no +#LidSwitchIgnoreInhibited=yes +#HoldoffTimeoutSec=30s +#IdleAction=ignore +#IdleActionSec=30min +#RuntimeDirectorySize=10% +#RuntimeDirectoryInodes=400k +#RemoveIPC=yes +#InhibitorsMax=8192 +#SessionsMax=8192 + +[Sleep] +#AllowSuspend=yes +#AllowHibernation=yes +#AllowSuspendThenHibernate=yes +#AllowHybridSleep=yes +#AllowPowerOffInterrupts=no +#BroadcastPowerOffInterrupts=yes +#AllowSuspendInterrupts=no +#BroadcastSuspendInterrupts=yes +#HandleNvidiaSleep=no +#SuspendState=mem standby freeze +#SuspendMode= +#HibernateState=disk +#HibernateMode=platform shutdown +#HybridSleepState=disk +#HybridSleepMode=suspend platform shutdown +#HibernateDelaySec=10800 diff --git a/runit/sv/dunst/conf b/runit/sv/dunst/conf new file mode 100644 index 0000000..88353ef --- /dev/null +++ b/runit/sv/dunst/conf @@ -0,0 +1,9 @@ +# -*- mode: sh; -*- + +# Additional command line arguments for pipewire(1). +OPTS='' + +# Setting this to 1 enables logging, any other value - disables. +LOGGING_ENABLE=1 +# The directory will be created for you, if logging is enabled. +LOG_DIR="$HOME/.local/var/log/dunst" diff --git a/runit/sv/dunst/log/run b/runit/sv/dunst/log/run new file mode 100755 index 0000000..09818ce --- /dev/null +++ b/runit/sv/dunst/log/run @@ -0,0 +1,12 @@ +#!/bin/sh + +[ -r ../conf ] && . ../conf + +if [ "${LOGGING_ENABLE}x" = "1x" ]; then + # Create the log directory if not exists. + [ -d "${LOG_DIR:-}" ] || mkdir -p "${LOG_DIR:-}" + + exec svlogd -tt "${LOG_DIR:-}" +else + exec chpst -b mpd-log-null cat >/dev/null +fi diff --git a/runit/sv/dunst/run b/runit/sv/dunst/run new file mode 100755 index 0000000..1c0aa88 --- /dev/null +++ b/runit/sv/dunst/run @@ -0,0 +1,5 @@ +#!/bin/sh + +[ -r ./conf ] && . ./conf + +exec dunst ${OPTS:-} 2>&1 diff --git a/runit/sv/mako/conf b/runit/sv/mako/conf new file mode 100644 index 0000000..6bb79d1 --- /dev/null +++ b/runit/sv/mako/conf @@ -0,0 +1,9 @@ +# -*- mode: sh; -*- + +# Additional command line arguments for pipewire(1). +OPTS='' + +# Setting this to 1 enables logging, any other value - disables. +LOGGING_ENABLE=1 +# The directory will be created for you, if logging is enabled. +LOG_DIR="$HOME/.local/var/log/mako" diff --git a/runit/sv/mako/down b/runit/sv/mako/down new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/runit/sv/mako/down diff --git a/runit/sv/mako/log/run b/runit/sv/mako/log/run new file mode 100755 index 0000000..09818ce --- /dev/null +++ b/runit/sv/mako/log/run @@ -0,0 +1,12 @@ +#!/bin/sh + +[ -r ../conf ] && . ../conf + +if [ "${LOGGING_ENABLE}x" = "1x" ]; then + # Create the log directory if not exists. + [ -d "${LOG_DIR:-}" ] || mkdir -p "${LOG_DIR:-}" + + exec svlogd -tt "${LOG_DIR:-}" +else + exec chpst -b mpd-log-null cat >/dev/null +fi diff --git a/runit/sv/mako/run b/runit/sv/mako/run new file mode 100755 index 0000000..266f521 --- /dev/null +++ b/runit/sv/mako/run @@ -0,0 +1,5 @@ +#!/bin/sh + +[ -r ./conf ] && . ./conf + +exec mako ${OPTS:-} 2>&1 diff --git a/runit/sv/mpd-mpris/conf b/runit/sv/mpd-mpris/conf new file mode 100644 index 0000000..7b43455 --- /dev/null +++ b/runit/sv/mpd-mpris/conf @@ -0,0 +1,9 @@ +# -*- mode: sh; -*- + +# Additional command line arguments for pipewire(1). +OPTS='-network unix' + +# Setting this to 1 enables logging, any other value - disables. +LOGGING_ENABLE=0 +# The directory will be created for you, if logging is enabled. +LOG_DIR="$HOME/.local/var/log/mpd-mpris" diff --git a/runit/sv/mpd-mpris/log/run b/runit/sv/mpd-mpris/log/run new file mode 100755 index 0000000..09818ce --- /dev/null +++ b/runit/sv/mpd-mpris/log/run @@ -0,0 +1,12 @@ +#!/bin/sh + +[ -r ../conf ] && . ../conf + +if [ "${LOGGING_ENABLE}x" = "1x" ]; then + # Create the log directory if not exists. + [ -d "${LOG_DIR:-}" ] || mkdir -p "${LOG_DIR:-}" + + exec svlogd -tt "${LOG_DIR:-}" +else + exec chpst -b mpd-log-null cat >/dev/null +fi diff --git a/runit/sv/mpd-mpris/run b/runit/sv/mpd-mpris/run new file mode 100755 index 0000000..3883e70 --- /dev/null +++ b/runit/sv/mpd-mpris/run @@ -0,0 +1,8 @@ +#!/bin/sh + +# Wait for the PipeWire Pulse daemon to start. +sv check "$HOME/.config/runit/sv/mpd" >/dev/null || exit 1 + +[ -r ./conf ] && . ./conf + +exec mpd-mpris ${OPTS:--network unix} 2>&1 diff --git a/runit/sv/mpd-notification/conf b/runit/sv/mpd-notification/conf new file mode 100644 index 0000000..e0b9aa3 --- /dev/null +++ b/runit/sv/mpd-notification/conf @@ -0,0 +1,9 @@ +# -*- mode: sh; -*- + +# Additional command line arguments for pipewire(1). +OPTS='' + +# Setting this to 1 enables logging, any other value - disables. +LOGGING_ENABLE=0 +# The directory will be created for you, if logging is enabled. +LOG_DIR="$HOME/.local/var/log/mpd-notification" diff --git a/runit/sv/mpd-notification/log/run b/runit/sv/mpd-notification/log/run new file mode 100755 index 0000000..09818ce --- /dev/null +++ b/runit/sv/mpd-notification/log/run @@ -0,0 +1,12 @@ +#!/bin/sh + +[ -r ../conf ] && . ../conf + +if [ "${LOGGING_ENABLE}x" = "1x" ]; then + # Create the log directory if not exists. + [ -d "${LOG_DIR:-}" ] || mkdir -p "${LOG_DIR:-}" + + exec svlogd -tt "${LOG_DIR:-}" +else + exec chpst -b mpd-log-null cat >/dev/null +fi diff --git a/runit/sv/mpd-notification/run b/runit/sv/mpd-notification/run new file mode 100755 index 0000000..a643d56 --- /dev/null +++ b/runit/sv/mpd-notification/run @@ -0,0 +1,9 @@ +#!/bin/sh + +# Wait for the PipeWire Pulse daemon to start. +sv check "$HOME/.config/runit/sv/mpd" >/dev/null || exit 1 +sv check "$HOME/.config/runit/sv/mako" >/dev/null || exit 1 + +[ -r ./conf ] && . ./conf + +exec mpd-notification ${OPTS:-} 2>&1 diff --git a/runit/sv/mpd/conf b/runit/sv/mpd/conf new file mode 100644 index 0000000..ca3a82f --- /dev/null +++ b/runit/sv/mpd/conf @@ -0,0 +1,9 @@ +# -*- mode: sh; -*- + +# Additional command line arguments for pipewire(1). +OPTS='' + +# Setting this to 1 enables logging, any other value - disables. +LOGGING_ENABLE=0 +# The directory will be created for you, if logging is enabled. +LOG_DIR="$HOME/.local/var/log/mpd" diff --git a/runit/sv/mpd/log/run b/runit/sv/mpd/log/run new file mode 100755 index 0000000..09818ce --- /dev/null +++ b/runit/sv/mpd/log/run @@ -0,0 +1,12 @@ +#!/bin/sh + +[ -r ../conf ] && . ../conf + +if [ "${LOGGING_ENABLE}x" = "1x" ]; then + # Create the log directory if not exists. + [ -d "${LOG_DIR:-}" ] || mkdir -p "${LOG_DIR:-}" + + exec svlogd -tt "${LOG_DIR:-}" +else + exec chpst -b mpd-log-null cat >/dev/null +fi diff --git a/runit/sv/mpd/run b/runit/sv/mpd/run new file mode 100755 index 0000000..b57d5ac --- /dev/null +++ b/runit/sv/mpd/run @@ -0,0 +1,8 @@ +#!/bin/sh + +# Wait for the PipeWire Pulse daemon to start. +sv check "$HOME/.config/runit/sv/pipewire-pulse" >/dev/null || exit 1 + +[ -r ./conf ] && . ./conf + +exec mpd --no-daemon --stderr ${OPTS:-} 2>&1 diff --git a/runit/sv/pipewire-pulse/conf b/runit/sv/pipewire-pulse/conf new file mode 100644 index 0000000..606eac5 --- /dev/null +++ b/runit/sv/pipewire-pulse/conf @@ -0,0 +1,12 @@ +# -*- mode: sh; -*- + +# Additional command line arguments for pipewire-pulse. +OPTS='' + +# Setting this to 1 enables logging, any other value - disables. +LOGGING_ENABLE=0 +# Set the pipewire log level. +# See: https://docs.pipewire.org/page_daemon.html#sec_logging +LOG_LEVEL=1 +# The directory will be created for you, if logging is enabled. +LOG_DIR="$HOME/.local/var/log/pipewire-pulse" diff --git a/runit/sv/pipewire-pulse/log/run b/runit/sv/pipewire-pulse/log/run new file mode 100755 index 0000000..ba8236e --- /dev/null +++ b/runit/sv/pipewire-pulse/log/run @@ -0,0 +1,12 @@ +#!/bin/sh + +[ -r ../conf ] && . ../conf + +if [ "${LOGGING_ENABLE}x" = "1x" ]; then + # Create the log directory if not exists. + [ -d "${LOG_DIR}" ] || mkdir -p "${LOG_DIR}" + + exec svlogd -tt "${LOG_DIR}" +else + exec chpst -b pipewire-pulse-log-null cat >/dev/null +fi diff --git a/runit/sv/pipewire-pulse/run b/runit/sv/pipewire-pulse/run new file mode 100755 index 0000000..0e43d6f --- /dev/null +++ b/runit/sv/pipewire-pulse/run @@ -0,0 +1,12 @@ +#!/bin/sh + +# Wait for the PipeWire Media Session daemon to start. +sv check "$HOME/.config/runit/sv/wireplumber" >/dev/null || exit 1 + +[ -r ./conf ] && . ./conf + +if [ "${LOGGING_ENABLE}x" = "1x" -a -n "${LOG_LEVEL}" ]; then + export PIPEWIRE_DEBUG="${LOG_LEVEL}" +fi + +exec pipewire-pulse ${OPTS:-} 2>&1 diff --git a/runit/sv/wireplumber/conf b/runit/sv/wireplumber/conf new file mode 100644 index 0000000..d712f03 --- /dev/null +++ b/runit/sv/wireplumber/conf @@ -0,0 +1,12 @@ +# -*- mode: sh; -*- + +# Additional command line arguments for wireplumber. +OPTS='' + +# Setting this to 1 enables logging, any other value - disables. +LOGGING_ENABLE=0 +# Set the wireplumber log level. +# See: https://pipewire.pages.freedesktop.org/wireplumber/daemon-logging.html +LOG_LEVEL=2 +# The directory will be created for you, if logging is enabled. +LOG_DIR="$HOME/.local/var/log/wireplumber" diff --git a/runit/sv/wireplumber/log/run b/runit/sv/wireplumber/log/run new file mode 100755 index 0000000..aa89d14 --- /dev/null +++ b/runit/sv/wireplumber/log/run @@ -0,0 +1,12 @@ +#!/bin/sh + +[ -r ../conf ] && . ../conf + +if [ "${LOGGING_ENABLE}x" == "1x" ]; then + # Create the log directory if not exists. + [ -d "${LOG_DIR}" ] || mkdir -p "${LOG_DIR}" + + exec svlogd -tt "${LOG_DIR}" +else + exec chpst -b wireplumber-log-null cat >/dev/null +fi diff --git a/runit/sv/wireplumber/run b/runit/sv/wireplumber/run new file mode 100755 index 0000000..5fb9edc --- /dev/null +++ b/runit/sv/wireplumber/run @@ -0,0 +1,12 @@ +#!/bin/sh + +# Wait for the PipeWire daemon to start. +sv check "$HOME/.config/runit/sv/pipewire" >/dev/null || exit 1 + +[ -r ./conf ] && . ./conf + +if [ "${LOGGING_ENABLE}x" = "1x" -a -n "${LOG_LEVEL}" ]; then + export WIREPLUMBER_DEBUG="${LOG_LEVEL}" +fi + +exec wireplumber ${OPTS:-} 2>&1 @@ -3,7 +3,7 @@ export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"} export XDG_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"} export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"} . "$HOME/.config/user-dirs.dirs" -export XDG_CURRENT_DESKTOP="i3" +export XDG_CURRENT_DESKTOP="Hyprland" export XDG_DOCUMENTS_DIR=${HOME}/Documents export XDG_DOWNLOAD_DIR=${HOME}/Downloads export XDG_DESKTOP_DIR=${HOME}/Desktop diff --git a/zsh/.zshenv b/zsh/.zshenv index b8c9d48..f02f83a 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,4 +1,5 @@ # ZSH SPECIFIC CONFIGS unset HISTFILE export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +[ -f /etc/profile ] && . /etc/profile [ -f "$XDG_CONFIG_HOME/sh/profile" ] && . "$XDG_CONFIG_HOME/sh/profile" |