diff --git a/.config/X11/xinitrc b/.config/X11/xinitrc index 289fcd56..3151e38e 100644 --- a/.config/X11/xinitrc +++ b/.config/X11/xinitrc @@ -1,7 +1,2 @@ #!/bin/sh - -. "$XDG_CONFIG_HOME/X11/xprofile" - -run-parts "$XDG_CONFIG_HOME/X11/xinitrc.d" - -exec dbus-run-session -- dwm +exec dbus-run-session -- sh $XDG_CONFIG_HOME/X11/realinit diff --git a/.config/X11/xinitrc.d/80autostart b/.config/X11/xinitrc.d/80autostart index 3a402e3d..5de065b2 100755 --- a/.config/X11/xinitrc.d/80autostart +++ b/.config/X11/xinitrc.d/80autostart @@ -6,6 +6,9 @@ start() { xwallpaper --zoom "${XDG_DATA_HOME:-$HOME/.local/share}/bg" & +start pipewire +start pipewire -c pipewire-pulse.conf +start wireplumber start remaps start checkup start playerctld daemon diff --git a/.config/pipewire/pipewire.conf b/.config/pipewire/pipewire.conf index a18303ab..7bfd2ee5 100644 --- a/.config/pipewire/pipewire.conf +++ b/.config/pipewire/pipewire.conf @@ -236,13 +236,12 @@ context.exec = [ # but it is better to start it as a systemd service. # Run the session manager with -h for options. # - # { path = "/usr/bin/wireplumber" args = "" } + #{ path = "/usr/bin/wireplumber" args = "" } # # You can optionally start the pulseaudio-server here as well # but it is better to start it as a systemd service. # It can be interesting to start another daemon here that listens # on another address with the -a option (eg. -a tcp:4713). # - # { path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" } + #{ path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" } ] - diff --git a/.config/zsh/profile b/.config/zsh/profile index ebbdf9b9..81bbcaa1 100644 --- a/.config/zsh/profile +++ b/.config/zsh/profile @@ -61,3 +61,11 @@ export ANSIBLE_NOCOWS=1 # Stop those fucking cows in Ansible localpath="$(find -L ~/.local/bin -type d -printf %p: | sed 's/.$//')" export PATH="$PATH:$HOME/.local/share/npm-global/bin:$localpath" + +export NVM_DIR="$HOME/.config/nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + +if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then + exec startx +fi diff --git a/.local/bin/cron/checkup b/.local/bin/cron/checkup index 78fbbce2..15449925 100755 --- a/.local/bin/cron/checkup +++ b/.local/bin/cron/checkup @@ -12,12 +12,8 @@ confirmcheck() { notify-send " Repository Sync" "Sync complete. No new packages for update." } -failcheck() { - notify-send "Error downloading updates." "Check your internet connection, if $1 is already running, or run update manually to see errors." -} - if command -v pacman 1>/dev/null 2>&1; then - sudo pacman -Syyuw --noconfirm || failcheck pacman + sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates." "Check your internet connection, if pacman is already running, or run update manually to see errors." if pacman -Qu | grep -v "\[ignored\]"; then askupgrade else @@ -26,10 +22,22 @@ if command -v pacman 1>/dev/null 2>&1; then elif command -v apt 1>/dev/null 2>&1; then n=$(sudo apt upgrade -dy 2>/dev/null | grep -m1 '^[0-9]\+ upgraded,' | tr -cd '0-9' | cut -c1-2) if [ "$n" = '' ]; then - failcheck apt + notify-send "Error downloading updates." "Check your internet connection, if apt is already running, or run update manually to see errors." elif [ "$n" = 00 ]; then confirmcheck else askupgrade fi +elif command -v xbps-install 1>/dev/null 2>&1; then + xbps-install -nuM 1>/tmp/xbps_updates 2>/tmp/xbps_errors + n="$(wc -l < /tmp/xbps_updates)" + ne="$(grep broken /tmp/xbps_errors | wc -l)" + n="$(xbps-install -M -n -u | grep -Fe update -e install | wc -l)" + if [ "$n" = "0" ] && [ "$ne" = "0" ]; then + confirmcheck + elif [ "$n" -gt 1 ] && [ "$ne" = "0" ]; then + askupgrade + else + notify-send "Error downloading updates." "$(cut -d " " -f 1,5 /tmp/xbps_errors)" + fi fi diff --git a/.local/bin/upgrades b/.local/bin/upgrades index 2c3d9b8b..4aa878f6 100755 --- a/.local/bin/upgrades +++ b/.local/bin/upgrades @@ -1,27 +1,9 @@ #!/bin/sh -printf "Beginning upgrade.\\n" -if command -v paru 1>/dev/null 2>&1; then - paru -Syu -elif command -v yay 1>/dev/null 2>&1; then - yay -Syu -elif command -v pacman 1>/dev/null 2>&1; then - pacman -Syu -fi - -command -v apt 1>/dev/null 2>&1 && sudo apt upgrade - # This pkill is already handled by apt/pacman hooks: # pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}" -# apt -# create the file /etc/apt/apt.conf.d/80statusbar containing the following - -# DPkg::Post-Invoke {"/usr/bin/pkill -RTMIN+8 dwmblocks";}; - - - -# pacman +# pacman -------------------------------------------------------------------------- # create the file /usr/share/libalpm/hooks/statusbar.hook containing the following # [Trigger] @@ -33,6 +15,30 @@ command -v apt 1>/dev/null 2>&1 && sudo apt upgrade # When = PostTransaction # Exec = /usr/bin/pkill -RTMIN+8 dwmblocks +printf "Beginning upgrade.\\n" +if command -v paru 1>/dev/null 2>&1; then + paru -Syu +elif command -v yay 1>/dev/null 2>&1; then + yay -Syu +elif command -v pacman 1>/dev/null 2>&1; then + pacman -Syu +fi + +# apt ----------------------------------------------------------------------------- +# create the file /etc/apt/apt.conf.d/80statusbar containing the following + +# DPkg::Post-Invoke {"/usr/bin/pkill -RTMIN+8 dwmblocks";}; + +command -v apt 1>/dev/null 2>&1 && sudo apt upgrade + + + +# void ---------------------------------------------------------------------------- +# Void doesn't have post-install hooks at all, and including pkills in the package hooks isn't feasible +# Instead pkill is called in this script. Manually running updates will cause the status bar to desync + +command -v xbps-install 1>/dev/null 2>&1 && sudo xbps-install -Syu && pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}" + printf "\\nUpgrade complete.\\nPress <Enter> to exit window.\\n\\n" read -r _ exit