Compare commits

...

37 Commits

Author SHA1 Message Date
2ab1c652cb Merge branch 'main' into arch-wayland 2023-05-22 21:36:36 +02:00
4f67115b25 Add exit after help menu 2023-05-22 21:20:33 +02:00
2fd0891655 Fix firefox config path 2023-05-22 21:18:20 +02:00
1bde1df151 Make updating firefox config optional 2023-05-22 21:16:01 +02:00
6a0dfeba25 Keep sudo active during script 2023-05-22 20:20:17 +02:00
7822fc15ca if statement around .fehbg 2023-05-22 20:19:08 +02:00
73f8d7268e Add kdeconnect to official packages 2023-05-22 20:13:32 +02:00
15f07ee4e9 Add instructions about how to update the config 2023-05-22 20:11:30 +02:00
76872f7fef chmod .fehbg if possible 2023-05-22 20:08:11 +02:00
9b666176da Set loudness normalization to -24 2023-05-22 19:57:33 +02:00
9bfd0f163c Move some systemd services to config
Enable timer for reflector
    Move vnstat service to config
2023-05-22 19:51:45 +02:00
7f2978ef25 more noconfirm 2023-05-21 20:08:27 +02:00
cd120b2e6c Main repository location 2023-05-21 19:47:40 +02:00
c737fd5577 Install paru if it is not installed 2023-05-21 19:26:19 +02:00
765d63a800 Remove grub theme download 2023-05-21 19:10:21 +02:00
f85eb26316 Disable grub theme 2023-05-21 18:58:22 +02:00
226f07e16d Use --noconfirm for pacman 2023-05-21 18:46:30 +02:00
3e216fa134 Remove exit for debugging 2023-05-21 18:43:56 +02:00
b60e5bc5e8 Remove LC_ALL 2023-05-21 18:43:43 +02:00
877bfb66d1 Set confirmation for pacman commands 2023-05-21 18:41:46 +02:00
19a529992e Testing 2023-05-21 18:38:12 +02:00
e9c8587a2b Remove bogus package 2023-05-21 18:37:20 +02:00
759599e8ec Put list of packages not found in setup directory 2023-05-21 18:34:13 +02:00
f3beae1cb6 Use looping over the package list
This avoids the situation where an unavailable package cancels the
    installation of all other packages in this step, resulting in an
    unusable system in the end.
2023-05-21 18:29:46 +02:00
f861658cd2 Add obviously bogus package 2023-05-21 18:29:38 +02:00
62e3e4728f Remove conflicting package 2023-05-21 17:40:16 +02:00
2c263a4eae Fix package names 2023-05-21 17:39:37 +02:00
2aacd6d3e9 Remove pip installation. Use font-manager from official repos 2023-05-21 17:04:59 +02:00
eb2fb5d98d Move theming after AUR 2023-05-21 16:52:53 +02:00
3cefaef5fa Remove noconfirms 2023-05-21 16:47:30 +02:00
4d6e0716c9 Disable nix installer 2023-05-21 16:44:09 +02:00
d1c1c51a5e Check if user has sudo rights and keep sudo from timing out 2023-05-21 16:36:52 +02:00
d2a9f4443b Change package installation order
All packages from official sources are installed before AUR-packages
    Audio packages merged into officialpkgs list
2023-05-21 16:16:56 +02:00
135ace00d0 Modify install script to be less hands-on 2023-05-21 16:08:00 +02:00
3f9736c350 Modify installation scripts to use new paths 2023-05-21 15:51:52 +02:00
34769bd1a2 Link to all folders 2023-05-21 15:03:59 +02:00
cc3ac87ba4 Add global readme 2023-05-21 15:02:33 +02:00
12 changed files with 253 additions and 250 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/music-normalize/venv/

45
README.md Normal file
View File

@ -0,0 +1,45 @@
Main repository location is [https://gitea.exu.li/RealStickman/configs](https://gitea.exu.li/RealStickman/configs)
# Configs
All my config files, scripts and other in one place.
Mostly focused on ArchLinux, although there is also a NixOS configuration and independent Python programs.
## ArchLinux
- [arch-config](./arch-config)
- [arch-setup](./arch-setup)
- [arch-themes](./arch-themes)
### First time installation
Enable the `multilib` repository in `/etc/pacman.conf`
```sh
git clone https://gitea.exu.li/realstickman/configs.git
cd configs/arch-setup
./install.sh
```
### Config updates
Either use the included alias
```sh
upconf
```
or run the script directly.
```sh
~/scripts/arch-config.sh
```
## NixOS
- [nixos-config](./nixos-config)
## Other
- [easyffmpeg](./easyffmpeg)
- [music-normalize](./music-normalize)

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
#DO NOT MAKE CHANGES TO THE INSTALL SCRIPT HERE. USE arcolinux-config.sh IN ~/scripts FOR THAT #DO NOT MAKE CHANGES TO THE INSTALL SCRIPT HERE. USE arch-config.sh IN ~/scripts FOR THAT
#change to home (does not show in terminal) #change to home (does not show in terminal)
cd $HOME cd $HOME
@ -9,6 +9,6 @@ cd $HOME
echo Launching arch-config.sh echo Launching arch-config.sh
#make executable & launch arch-config.sh #make executable & launch arch-config.sh
chmod +x ~/config/scripts/arch-config.sh chmod +x ~/configs/arch-config/scripts/arch-config.sh
bash ~/config/scripts/arch-config.sh bash ~/configs/arch-config/scripts/arch-config.sh
exit 0 exit 0

View File

@ -1,11 +1,22 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
# function to keep sudo from timing out
function func_dont_timeout {
while true; do
sudo -v
sleep 60
done
}
# check if user is root # check if user is root
if [ "$EUID" -ne 0 ]; then if [ "$EUID" -ne 0 ]; then
sudo -v sudo -v
fi fi
# keep sudo active in background
func_dont_timeout &
cat <<EOF cat <<EOF
############################################################ ############################################################
###################### INSTALL CONFIG ###################### ###################### INSTALL CONFIG ######################
@ -42,24 +53,18 @@ EOF
cd "$HOME" cd "$HOME"
# remove old installs # remove old installs
rm -rf ~/config rm -rf ~/configs
echo "Checking config file" echo "Checking config file"
#clone this repo #clone this repo
git clone https://gitlab.com/RealStickman-arch/config.git &>/dev/null git clone https://gitea.exu.li/realstickman/configs.git &>/dev/null
# make sure to use master branch
#cd config
#git checkout master &>/dev/null
#git checkout wayland &>/dev/null
#cd ..
# check if the install scripts are the same # check if the install scripts are the same
# NOTE Arguments get passed automatically now # NOTE Arguments get passed automatically now
if ! cmp --silent "$HOME/scripts/arch-config.sh" "$HOME/config/scripts/arch-config.sh"; then if ! cmp --silent "$HOME/scripts/arch-config.sh" "$HOME/configs/arch-config/scripts/arch-config.sh"; then
echo Removed old config file and launched new one. echo Removed old config file and launched new one.
rm "$HOME/scripts/arch-config.sh" && cp "$HOME/config/scripts/arch-config.sh" "$HOME/scripts/" && bash ~/scripts/arch-config.sh "$@" rm "$HOME/scripts/arch-config.sh" && cp "$HOME/configs/arch-config/scripts/arch-config.sh" "$HOME/scripts/" && bash ~/scripts/arch-config.sh "$@"
fi fi
# if no seltheme file exists, ask to select a theme # if no seltheme file exists, ask to select a theme
@ -71,14 +76,20 @@ fi
#### Arguments #### #### Arguments ####
#################### ####################
copy_firefox=0
# handle arguments # handle arguments
if [[ "$#" -eq 1 ]]; then if [[ "$#" -eq 1 ]]; then
# -t/--theme to change theme # -t/--theme to change theme
if [[ "$1" == "-t" || "$1" == "--theme" ]]; then if [[ "$1" == "-t" || "$1" == "--theme" ]]; then
func_seltheme func_seltheme
elif [[ "$1" == "-f" || "$1" == "--firefox" ]]; then
copy_firefox=1
elif [[ "$1" == "-h" || "$1" == "--help" ]]; then elif [[ "$1" == "-h" || "$1" == "--help" ]]; then
echo "-h, --help Show help menu" echo "-h, --help Show help menu"
echo "-t, --theme Show theme selection screen" echo "-t, --theme Show theme selection screen"
echo "-f, --firefox Update firefox config"
exit 0
fi fi
elif [[ "$#" -gt 1 ]]; then elif [[ "$#" -gt 1 ]]; then
echo "Too many arguments" echo "Too many arguments"
@ -193,6 +204,21 @@ if [[ -d ~/scripts/in_path ]]; then
rm -r ~/scripts/in_path rm -r ~/scripts/in_path
fi fi
# remove old script pieces
if [[ -d ~/scripts/pieces ]]; then
rm -r ~/scripts/pieces
fi
# remove old polybar scripts
if [[ -d ~/scripts/polybar ]]; then
rm -r ~/scripts/polybar
fi
# remove archived scripts
if [[ -d ~/scripts/archive ]]; then
rm -r ~/scripts/archive
fi
echo echo
cat <<EOF cat <<EOF
######################################## ########################################
@ -201,58 +227,53 @@ cat <<EOF
EOF EOF
#copy folders #copy folders
cp -r ~/config/.config/ ~/ cp -r ~/configs/arch-config/.config/ ~/
cp -r ~/config/.local/ ~/ cp -r ~/configs/arch-config/.local/ ~/
#cp -r ~/config/Dokumente ~/ #cp -r ~/config/Dokumente ~/
#cp -r ~/config/.mozilla/firefox/default-release/* ~/.mozilla/firefox/*.default-release/ #cp -r ~/config/.mozilla/firefox/default-release/* ~/.mozilla/firefox/*.default-release/
#cp -r ~/config/.easystroke ~/ #cp -r ~/config/.easystroke ~/
#cp -r ~/config/.elvish ~/ #cp -r ~/config/.elvish ~/
# NOTE find fails if the top level directory is not found cp -r ~/configs/arch-config/.doom.d ~/
if [[ -d ~/.mozilla/firefox ]]; then cp -r ~/configs/arch-config/.ssh ~/
# copy firefox only if "-f" or "--firefox" is given as argument
if [[ copy_firefox -eq 1 ]]; then
if [[ -d ~/.mozilla/firefox ]]; then
# NOTE check if firefox default-release directory exists. 1 is good, 0 is bad # NOTE check if firefox default-release directory exists. 1 is good, 0 is bad
firefoxdir=$(find ~/.mozilla/firefox/ -name \*.default-release | wc -l) firefoxdir=$(find ~/.mozilla/firefox/ -name \*.default-release | wc -l)
if [[ $firefoxdir -eq 1 ]]; then if [[ $firefoxdir -eq 1 ]]; then
cp -r ~/config/.mozilla/firefox/default-release/* ~/.mozilla/firefox/*.default-release/ cp -r ~/configs/arch-config/.mozilla/firefox/default-release/* ~/.mozilla/firefox/*.default-release/
else else
echo "Please launch firefox and then update the config again" echo "Please launch firefox and then update the config again"
fi fi
else else
echo "Please launch firefox and then update the config again" echo "Please launch firefox and then update the config again"
fi
fi fi
cp -r ~/config/.doom.d ~/
cp -r ~/config/.ssh ~/
echo Copied folders echo Copied folders
#copy single files #copy single files
cp -r ~/config/.face ~/ cp -r ~/configs/arch-config/.bashrc ~/
cp -r ~/config/.gtkrc-2.0 ~/ cp -r ~/configs/arch-config/.face ~/
cp -r ~/config/.gitconfig ~/ cp -r ~/configs/arch-config/.gtkrc-2.0 ~/
cp -r ~/config/.tmux.conf ~/ cp -r ~/configs/arch-config/.gitconfig ~/
cp -r ~/config/.xinitrc ~/ cp -r ~/configs/arch-config/.tmux.conf ~/
cp -r ~/config/.kopiaignore ~/ cp -r ~/configs/arch-config/.xinitrc ~/
cp -r ~/configs/arch-config/.kopiaignore ~/
echo Copied files echo Copied files
# make .xinitrc executable # make .xinitrc executable
chmod +x ~/.xinitrc chmod +x ~/.xinitrc
#copy scripts #copy scripts
cp -r ~/config/scripts/ ~/ cp -r ~/configs/arch-config/scripts/ ~/
# copy cache # copy cache
cp -r ~/config/.cache ~/ cp -r ~/configs/arch-config/.cache ~/
#copy stuff to /etc #copy stuff to /etc
sudo cp -r ~/config/etc / sudo cp -r ~/configs/arch-config/etc /
#sudo rsync --exclude=default/grub ~/config/etc /etc/
#read -r -p "Do you want to overwrite the grub config? [y/N] " response
#if [[ "$response" =~ ^([yY][eE][sS][jJ]|[yY])$ ]]
#then
# copy config
# sudo cp ~/config/etc/default/grub /etc/default/
# update grub
# sudo grub-mkconfig -o /boot/grub/grub.cfg
#fi
# NOTE Distro specific stuff # NOTE Distro specific stuff
distro=$(cat /etc/*-release | grep "^ID=") distro=$(cat /etc/*-release | grep "^ID=")
@ -263,44 +284,37 @@ if [ "$distro" == "ID=arch" ]; then
sudo mv /etc/arch-pacman.conf /etc/pacman.conf sudo mv /etc/arch-pacman.conf /etc/pacman.conf
fi fi
# NOTE only for webkit2gtk version of lightdm
#copy old lightdm themes (and maybe other stuff, idk)
#sudo cp -r ~/config/var /
#copy usr stuff #copy usr stuff
sudo cp -r ~/config/usr / sudo cp -r ~/configs/arch-config/usr /
# copy xresources # copy xresources
cp ~/config/.Xresources ~/ cp ~/configs/arch-config/.Xresources ~/
#################### ####################
###### Theme ###### ###### Theme ######
#################### ####################
# remove old themes folder
rm -rf ./themes
# install theme selected in themes file # install theme selected in themes file
git clone https://gitlab.com/RealStickman-arch/themes.git &>/dev/null
seltheme="$(cat "$HOME/.seltheme")" seltheme="$(cat "$HOME/.seltheme")"
if [[ "$seltheme" == "nyarch" ]]; then if [[ "$seltheme" == "nyarch" ]]; then
#cp -r "./themes/nyarch/i3" "$HOME/.config/" #cp -r "./themes/nyarch/i3" "$HOME/.config/"
cat "./themes/nyarch/i3/color" >>"$HOME/.config/sway/config" cat "$HOME/configs/arch-themes/nyarch/i3/color" >>"$HOME/.config/i3/config"
cp -r "./themes/nyarch/polybar" "$HOME/.config/" cp -r "$HOME/configs/arch-themes/nyarch/polybar" "$HOME/.config/"
#cp -r "./themes/nyarch/neofetch/lowpoly_flamegirl_blue.txt" "$HOME/.config/neofetch/lowpoly_flamegirl.txt" #cp -r "./themes/nyarch/neofetch/lowpoly_flamegirl_blue.txt" "$HOME/.config/neofetch/lowpoly_flamegirl.txt"
#cp "./themes/.fehbg-nyarch" "$HOME/.fehbg" #cp "./themes/.fehbg-nyarch" "$HOME/.fehbg"
#sed -i 's/^NAME=".*"/NAME="Rawrch Linyux"/' /etc/os-release #sed -i 's/^NAME=".*"/NAME="Rawrch Linyux"/' /etc/os-release
elif [[ "$seltheme" == "space-pink" ]]; then elif [[ "$seltheme" == "space-pink" ]]; then
#cp -r "./themes/space-pink/i3" "$HOME/.config/" #cp -r "./themes/space-pink/i3" "$HOME/.config/"
cat "./themes/space-pink/i3/color" >>"$HOME/.config/sway/config" cat "$HOME/configs/arch-themes/space-pink/i3/color" >>"$HOME/.config/i3/config"
cp -r "./themes/space-pink/polybar" "$HOME/.config/" cp -r "$HOME/configs/arch-themes/space-pink/polybar" "$HOME/.config/"
#cp -r "./themes/space-pink/neofetch/lowpoly_flamegirl_orange.txt" "$HOME/.config/neofetch/lowpoly_flamegirl.txt" #cp -r "./themes/space-pink/neofetch/lowpoly_flamegirl_orange.txt" "$HOME/.config/neofetch/lowpoly_flamegirl.txt"
#cp "./themes/.fehbg-space-pink" "$HOME/.fehbg" #cp "./themes/.fehbg-space-pink" "$HOME/.fehbg"
fi fi
rm -rf ./themes
# make fehbg executable # make fehbg executable
chmod +x ~/.fehbg if [[ -f "$HOME/.fehbg" ]]; then
chmod +x ~/.fehbg
fi
#################### ####################
##### Bash Cat ##### ##### Bash Cat #####
@ -322,16 +336,6 @@ git clone https://github.com/RealStickman/PSipcalc &>/dev/null
cp ./PSipcalc/PSipcalc.ps1 "$HOME/scripts/in_path/sc-psipcalc" cp ./PSipcalc/PSipcalc.ps1 "$HOME/scripts/in_path/sc-psipcalc"
rm -rf ./PSipcalc rm -rf ./PSipcalc
####################
####### Gimp #######
####################
#gimp plugins
#mkdir ~/.config/GIMP/ || echo Not creating directory
#mkdir ~/.config/GIMP/2.10/ || echo Not creating directory
#mkdir -p ~/.config/GIMP/2.10/plug-ins/ || echo Not creating directory
#rsync -ah ~/config/gimp-plugins/* ~/.config/GIMP/2.10/plug-ins/
echo echo
cat <<EOF cat <<EOF
######################################## ########################################
@ -351,6 +355,9 @@ cat <<EOF
######################################## ########################################
EOF EOF
# reload systemd user scripts
systemctl --user daemon-reload
# set systemd services for vmware (only if installed) # set systemd services for vmware (only if installed)
if [[ $(pacman -Q | grep vmware-workstation) ]]; then if [[ $(pacman -Q | grep vmware-workstation) ]]; then
sudo systemctl enable --now vmware-networks.service || echo "Service failed, continuing" sudo systemctl enable --now vmware-networks.service || echo "Service failed, continuing"
@ -385,6 +392,12 @@ sudo timedatectl set-ntp true
# enable ssh-agent # enable ssh-agent
systemctl --user enable --now ssh-agent systemctl --user enable --now ssh-agent
# enable reflector timer
sudo systemctl enable reflector.timer
# enable vnstat
sudo systemctl enable vnstat
echo echo
cat <<EOF cat <<EOF
######################################## ########################################
@ -436,20 +449,10 @@ cat <<EOF
######################################## ########################################
EOF EOF
# automatically add ssh keys to agent
#if ! grep -q "AddKeysToAgent yes" "$HOME/.ssh/config"; then
# echo 'AddKeysToAgent yes' | cat - "$HOME/.ssh/config" > temp && mv temp "$HOME/.ssh/config"
#fi
# set permissions for sudoers.d to root only # set permissions for sudoers.d to root only
sudo chown root:root -R /etc/sudoers.d/ sudo chown root:root -R /etc/sudoers.d/
sudo chmod 600 -R /etc/sudoers.d/ sudo chmod 600 -R /etc/sudoers.d/
# unzip gimp plugins
#echo Unzipping gimp plugins
#unzip -o ~/.config/GIMP/2.10/plug-ins/export_layers-3.3.1.zip -d ~/.config/GIMP/2.10/plug-ins/ >/dev/null
#rm ~/.config/GIMP/2.10/plug-ins/export_layers-3.3.1.zip >/dev/null
# xfce settings # xfce settings
# disable screensaver & locker # disable screensaver & locker
/usr/bin/xfconf-query -c xfce4-session -n -t bool -p /startup/screensaver/enabled -s false /usr/bin/xfconf-query -c xfce4-session -n -t bool -p /startup/screensaver/enabled -s false
@ -462,9 +465,6 @@ chmod +x -R ~/scripts
# make applications executable # make applications executable
chmod +x -R ~/.local/share/applications chmod +x -R ~/.local/share/applications
# set settings for nemo
#bash ~/config/scripts/nemo-config.sh
#remove downloaded folder #remove downloaded folder
rm -rf ~/config rm -rf ~/config
@ -491,26 +491,17 @@ fi
# dunst # dunst
pkill dunst && nohup dunst & pkill dunst && nohup dunst &
# reload systemd user scripts
systemctl --user daemon-reload
# reload .Xresources # reload .Xresources
# TODO fails without display # TODO fails without display
set +e
if [[ -f "$HOME/.Xresources" ]]; then if [[ -f "$HOME/.Xresources" ]]; then
xrdb ~/.Xresources xrdb ~/.Xresources
fi fi
# execute feh # execute feh
# TODO fails without display if [[ -f "$HOME/.fehbg" ]]; then
"$HOME/.fehbg" "$HOME/.fehbg"
set -e fi
# NOTE working now
# if [[ "$(ps aux | grep "FIXME")" ]]; then ...
# ps aux | grep "\si3\s" breaks if i3 hasn't been restarted yet
# ps aux | grep "\si3" works for both, not certain if other stuff could be detected as well
# ps aux | grep "\si3\$" breaks if i3 has been restarted already in this session
if ps aux | grep -E "\si3(\s|$)" &>/dev/null; then if ps aux | grep -E "\si3(\s|$)" &>/dev/null; then
i3-msg restart 1>/dev/null i3-msg restart 1>/dev/null
fi fi

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# You can call this script like this: # You can call this script like this:
# $./dunst-backlight.sh up # $./dunst-backlight.sh up
@ -13,7 +13,7 @@ send_notification() {
light=$(get_light) light=$(get_light)
# Make the bar with the special character ─ (it's not dash -) # Make the bar with the special character ─ (it's not dash -)
# https://en.wikipedia.org/wiki/Box-drawing_character # https://en.wikipedia.org/wiki/Box-drawing_character
bar=$(seq -s "─" $(($light/ 5)) | sed 's/[0-9]//g') bar=$(seq -s "─" $(($light / 5)) | sed 's/[0-9]//g')
# Send the notification # Send the notification
dunstify -i whitebalance -r 2489 -a backlight-script "$light $bar " dunstify -i whitebalance -r 2489 -a backlight-script "$light $bar "
} }
@ -21,7 +21,7 @@ send_notification() {
case $1 in case $1 in
up) up)
# Increase backlight # Increase backlight
xbacklight -inc 10 > /dev/null xbacklight -inc 10 >/dev/null
#xbacklight -inc 10% > /dev/null # legacy xorg-xbacklight #xbacklight -inc 10% > /dev/null # legacy xorg-xbacklight
send_notification send_notification
#backlightraw=$(xbacklight -get) #backlightraw=$(xbacklight -get)
@ -30,7 +30,7 @@ case $1 in
;; ;;
down) down)
# Decrease backlight # Decrease backlight
xbacklight -dec 10 > /dev/null xbacklight -dec 10 >/dev/null
#xbacklight -dec 9% > /dev/null # legacy xorg-xbacklight #xbacklight -dec 9% > /dev/null # legacy xorg-xbacklight
send_notification send_notification
#backlightraw=$(xbacklight -get) #backlightraw=$(xbacklight -get)

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
@ -12,7 +12,7 @@ get_volume() {
} }
is_mute() { is_mute() {
amixer -D pulse get Master | grep '%' | grep -oE '[^ ]+$' | grep off > /dev/null amixer -D pulse get Master | grep '%' | grep -oE '[^ ]+$' | grep off >/dev/null
} }
send_notification() { send_notification() {
@ -27,20 +27,20 @@ send_notification() {
case $1 in case $1 in
up) up)
# Set the volume on (if it was muted) # Set the volume on (if it was muted)
amixer -D pulse set Master on > /dev/null amixer -D pulse set Master on >/dev/null
# Up the volume (+ 5%) # Up the volume (+ 5%)
amixer -D pulse sset Master 5%+ > /dev/null amixer -D pulse sset Master 5%+ >/dev/null
send_notification send_notification
;; ;;
down) down)
amixer -D pulse set Master on > /dev/null amixer -D pulse set Master on >/dev/null
amixer -D pulse sset Master 5%- > /dev/null amixer -D pulse sset Master 5%- >/dev/null
send_notification send_notification
;; ;;
mute) mute)
# Toggle mute # Toggle mute
amixer -D pulse set Master 1+ toggle > /dev/null amixer -D pulse set Master 1+ toggle >/dev/null
if is_mute ; then if is_mute; then
dunstify -i audio-volume-muted -r 2593 -u normal "Mute" dunstify -i audio-volume-muted -r 2593 -u normal "Mute"
else else
send_notification send_notification

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail

View File

@ -1,14 +1,30 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail #set -euo pipefail
# get script directory # get script directory
scriptloc=$(realpath "$BASH_SOURCE") scriptloc=$(realpath "$BASH_SOURCE")
setupdir=$(dirname "$scriptloc") setupdir=$(dirname "$scriptloc")
#setupdir=$(pwd) setupdir=$(pwd)
# function to keep sudo from timing out
function func_dont_timeout {
while true; do
sudo -v
sleep 60
done
}
# check if user is root
if [ "$EUID" -ne 0 ]; then
sudo -v
fi
# keep sudo active in background
func_dont_timeout &
#change to home directory #change to home directory
#cd "$HOME" cd "$HOME"
# check if multilib repo is enabled # check if multilib repo is enabled
if ! pacman -Sl multilib &>/dev/null; then if ! pacman -Sl multilib &>/dev/null; then
@ -16,21 +32,11 @@ if ! pacman -Sl multilib &>/dev/null; then
exit 1 exit 1
fi fi
# NOTE on unattended pacman installing
# Option 1: Will assume the default choice
#--noconfirm
# Option 2: Will always choose "yes", locale override needed to work all the time (might fail for other locales)
#yes | LC_ALL=en_US.UTF-8 pacman ...
#
# excpect & send
# fix install problems # fix install problems
echo Updating keyring echo Updating keyring
sudo pacman -Sy --noconfirm archlinux-keyring sudo pacman -Sy --noconfirm archlinux-keyring
echo Updating repos and packages echo Updating repos and packages
sudo pacman -Syu --noconfirm sudo pacman -Syu --noconfirm
echo Installing pip
sudo pacman -S --needed --noconfirm python-pip
echo Select packages to install echo Select packages to install
cmd=(dialog --separate-output --checklist "Select Desktop environment/Window manager:" 22 76 16) cmd=(dialog --separate-output --checklist "Select Desktop environment/Window manager:" 22 76 16)
@ -129,7 +135,6 @@ for choice in $choices; do
;; ;;
60) 60)
echo "discord" >>"$setupdir/selectedpkgs.txt" echo "discord" >>"$setupdir/selectedpkgs.txt"
#echo "discord_arch_electron" >> "$setupdir/aurselectedpkgs.txt"
;; ;;
61) 61)
echo "element-desktop" >>"$setupdir/selectedpkgs.txt" echo "element-desktop" >>"$setupdir/selectedpkgs.txt"
@ -146,29 +151,6 @@ for choice in $choices; do
esac esac
done done
: '
in_acpufreq=0
cmd=(dialog --separate-output --checklist "Performance and Battery life" 22 76 16)
options=(0 "auto-cpufreq" off
1 "corectrl" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
for choice in $choices
do
case $choice in
0)
in_acpufreq=1
echo "auto-cpufreq-git" >> "$setupdir/aurselectedpkgs.txt"
# TODO Handle rest of installation
;;
1)
echo "corectrl" >> "$setupdir/aurselectedpkgs.txt"
;;
esac
done
'
in_doomemacs=0 in_doomemacs=0
in_podman=0 in_podman=0
@ -198,7 +180,6 @@ done
cmd=(dialog --separate-output --checklist "School and work communication" 22 76 16) cmd=(dialog --separate-output --checklist "School and work communication" 22 76 16)
options=(0 "Teams" off options=(0 "Teams" off
1 "Slack" off
10 "OneNote" off) 10 "OneNote" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear clear
@ -207,10 +188,6 @@ for choice in $choices; do
0) 0)
echo "teams" >>"$setupdir/aurselectedpkgs.txt" echo "teams" >>"$setupdir/aurselectedpkgs.txt"
;; ;;
1)
#echo "slack-desktop" >> "$setupdir/aurselectedpkgs.txt"
echo "slack-electron" >>"$setupdir/aurselectedpkgs.txt"
;;
10) 10)
echo "p3x-onenote" >>"$setupdir/aurselectedpkgs.txt" echo "p3x-onenote" >>"$setupdir/aurselectedpkgs.txt"
;; ;;
@ -251,43 +228,52 @@ for choice in $choices; do
done done
' '
rm "$setupdir/notfoundpackages.txt"
# NOTE on unattended pacman installing
# Option 1: Will assume the default choice
#--noconfirm
# Option 2: Will always choose "yes", locale override needed to work all the time (might fail for other locales)
#yes | LC_ALL=en_US.UTF-8 pacman ...
#
# excpect & send
#uninstalling unused packages #uninstalling unused packages
echo Uninstalling unused packages echo Uninstalling unused packages
# || true to pass set -e (error when encountering packages not installed) #sudo pacman -Rns - <"$setupdir/packages/uninstall.txt"
sudo pacman -Rns --noconfirm - <"$setupdir/packages/uninstall.txt" 2>/dev/null || true while read package; do
sudo pacman -Rns --noconfirm "$package"
done <"$setupdir/packages/uninstall.txt"
echo Uninstalled unused packages echo Uninstalled unused packages
#pacman programs #pacman programs
echo Installing default pacman programs echo Installing default pacman programs
sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt" 2>/dev/null #sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt"
# TODO for jack, use pipewire-jack (2) while read package; do
# TODO for pipewire-session-manager, use wireplumber (2) sudo pacman -S --needed --noconfirm "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt"
# TODO for phonon-qt5-backend, use phonon-qt5-gstreamer (1) done <"$setupdir/packages/officialpkgs.txt"
echo Installed official programs echo Installed official programs
# pip #install wine
#echo Installing python programs echo Installing wine
# TODO AUR package exists #sudo pacman -S --needed - <"$setupdir/packages/winepkgs.txt"
#pip install --user autotrash while read package; do
#echo Installed python programs sudo pacman -S --needed --noconfirm "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt"
done <"$setupdir/packages/winepkgs.txt"
echo Installed wine
# install paru-bin if not already present # install paru-bin
if [[ ! $(pacman -Q | grep paru-bin) ]]; then if [[ ! $(pacman -Q | grep paru) ]]; then
echo "Installing paru-bin" echo "Installing paru from the AUR"
git clone https://aur.archlinux.org/paru-bin.git git clone https://aur.archlinux.org/paru-bin.git
cd paru-bin cd paru-bin
makepkg -si --noconfirm yes | LC_ALL=en_US.UTF-8 makepkg -si
cd .. cd ..
fi fi
# audio # AUR
echo Installing audio programs
paru -S --needed --noconfirm - <"$setupdir/packages/audiopkgs.txt" 2>/dev/null
echo Installed audio programs
#AUR
echo Installing default AUR programs echo Installing default AUR programs
paru -S --needed --noconfirm - <"$setupdir/packages/aurpkgs.txt" 2>/dev/null paru -S --needed - <"$setupdir/packages/aurpkgs.txt"
# TODO for btrfsmaintenance, use btrfsmaintenance (1) # TODO for btrfsmaintenance, use btrfsmaintenance (1)
# TODO for jellyfin-media-player, use jellyfin-media-player (1) # TODO for jellyfin-media-player, use jellyfin-media-player (1)
# TODO for java-environment, use jdk-openjdk (1) # TODO for java-environment, use jdk-openjdk (1)
@ -305,11 +291,6 @@ echo Installing themes and icons
paru -S --needed --noconfirm - <"$setupdir/packages/theme-packages.txt" paru -S --needed --noconfirm - <"$setupdir/packages/theme-packages.txt"
echo Installed themes and icons echo Installed themes and icons
#install wine
echo Installing wine
sudo pacman -S --needed --noconfirm - <"$setupdir/packages/winepkgs.txt"
echo Installed wine
################### ###################
#selected programs# #selected programs#
################### ###################
@ -319,7 +300,7 @@ echo Installing selected programs
if [ -f "$setupdir/selectedpkgs.txt" ]; then if [ -f "$setupdir/selectedpkgs.txt" ]; then
echo Installing from official repository echo Installing from official repository
# NOTE || true to continue if no packages have been selected # NOTE || true to continue if no packages have been selected
sudo pacman -S --needed - <"$setupdir/selectedpkgs.txt" || true sudo pacman -S --needed --noconfirm - <"$setupdir/selectedpkgs.txt" || true
fi fi
# install selected aur packages # install selected aur packages
@ -347,10 +328,25 @@ if [ $in_podman -eq 1 ]; then
sudo usermod --add-subuids 100000-165536 --add-subgids 100000-165536 "$USER" sudo usermod --add-subuids 100000-165536 --add-subgids 100000-165536 "$USER"
sudo groupadd -f podman sudo groupadd -f podman
sudo usermod -aG podman "$USER" sudo usermod -aG podman "$USER"
else
echo "Skipping podman"
fi
# other system configs
# arco pc
if [ $in_arco_pc -eq 1 ]; then
echo "Installing arco pc packages"
paru -S --needed - <"$setupdir/packages/lupusregina-packages.txt"
fi
# arco hp
if [ $in_arco_hp -eq 1 ]; then
echo "Installing arch hp packages"
paru -S --needed - <"$setupdir/packages/arch-hp-packages.txt"
fi fi
# install nix # install nix
curl -sSf -L https://install.determinate.systems/nix | sh -s -- install #curl -sSf -L https://install.determinate.systems/nix | sh -s -- install
############################## ##############################
##### Configuration ##### ##### Configuration #####
@ -360,21 +356,9 @@ echo Configuring packages
#change shell #change shell
chsh -s /usr/bin/fish "$USER" chsh -s /usr/bin/fish "$USER"
#enable vnstat
sudo systemctl enable --now vnstat
# NOTE unsets set -e temporarily
set +e
# setup autotrash # setup autotrash
# NOTE without this directory autotrash.service fails to run
mkdir -p "$HOME/.local/share/Trash/info" mkdir -p "$HOME/.local/share/Trash/info"
autotrash -d 5 --install
systemctl --user enable autotrash.timer
set -e
# setup autotrash
autotrash -td 5 --install autotrash -td 5 --install
systemctl --user start autotrash
systemctl --user enable autotrash.timer systemctl --user enable autotrash.timer
# enable lockscreen for systemd # enable lockscreen for systemd
@ -403,31 +387,8 @@ fi
# update fonts cache # update fonts cache
fc-cache -f fc-cache -f
# download grub theme
#git clone https://github.com/xenlism/Grub-themes.git
#cd "Grub-themes/xenlism-grub-arch-1080p/"
#sudo bash install.sh
# go back
#cd ../../
#Changes to home folder automatically now, no need to be extra careful anymore.
# TODO make config script independent of download location
cd "$HOME"
# NOTE remove directory if it exists already and redownload
rm -rf config
git clone https://gitlab.com/RealStickman-arch/config
echo Finished downloading config
#cleanup
rm -rf "$setupdir"
echo Removed setup files
#downloading config
echo Setting config echo Setting config
# TODO temporary bash ~/configs/arch-config/install.sh
cd config
git checkout wayland
bash ~/config/install.sh
if [[ $(pacman -Q pkgstats 2>/dev/null >/dev/null) ]]; then if [[ $(pacman -Q pkgstats 2>/dev/null >/dev/null) ]]; then
sudo systemctl enable --now pkgstats.timer sudo systemctl enable --now pkgstats.timer

View File

@ -3,7 +3,6 @@ bitwarden
btrfsmaintenance btrfsmaintenance
davfs2 davfs2
downgrade downgrade
ffmpeg-normalize
greetd greetd
greetd-gtkgreet greetd-gtkgreet
jellyamp jellyamp

View File

@ -13,6 +13,7 @@ dnsutils
dosfstools dosfstools
dunst dunst
e2fsprogs e2fsprogs
easyeffects
exfatprogs exfatprogs
f2fs-tools f2fs-tools
fakeroot fakeroot
@ -46,6 +47,7 @@ hyphen-de
hyphen-en hyphen-en
jre-openjdk jre-openjdk
kcm-wacomtablet kcm-wacomtablet
kdeconnect
kitty kitty
libaacs libaacs
libbluray libbluray
@ -68,7 +70,6 @@ nemo-preview
nemo-share nemo-share
neovim neovim
nextcloud-client nextcloud-client
nomacs
notification-daemon notification-daemon
noto-fonts noto-fonts
noto-fonts-cjk noto-fonts-cjk
@ -81,9 +82,14 @@ os-prober
os-prober os-prober
p7zip p7zip
pacman-contrib pacman-contrib
pavucontrol
phonon-qt5-gstreamer
picom picom
piper piper
pipewire
pipewire-alsa
pipewire-jack pipewire-jack
pipewire-pulse
playerctl playerctl
polkit-gnome polkit-gnome
python-dbus python-dbus
@ -120,6 +126,7 @@ whois
wireguard-tools wireguard-tools
xdg-desktop-portal xdg-desktop-portal
xdg-desktop-portal-wlr xdg-desktop-portal-wlr
wireplumber
xdg-user-dirs xdg-user-dirs
xdotool xdotool
xf86-input-elographics xf86-input-elographics

View File

@ -1,12 +1,11 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
cd "$HOME/GitProjects/setup/packages/" cd "$HOME/GitProjects/configs/arch-setup/packages/"
readarray -d '' packagefiles < <(find "$HOME/GitProjects/configs/arch-setup/packages/" -name "*\.txt" -print0)
readarray -d '' packagefiles < <(find "$HOME/GitProjects/setup/packages/" -name "*\.txt" -print0)
for file in "${packagefiles[@]}"; do for file in "${packagefiles[@]}"; do
echo "Sorting $file" echo "Sorting $file"
cat "$file" | sort > "${file}.tmp" && mv "${file}.tmp" "$file" cat "$file" | sort >"${file}.tmp" && mv "${file}.tmp" "$file"
done done

View File

@ -132,7 +132,7 @@ def convert(inputfile, outputfile, loudness) -> Optional[list[Any]]:
" " " "
"-filter:a" "-filter:a"
" " " "
"loudnorm=I=-30.0:" "loudnorm=I=-24.0:"
"LRA=7.0:" "LRA=7.0:"
"measured_I={input_i}:" "measured_I={input_i}:"
"measured_LRA={input_lra}:" "measured_LRA={input_lra}:"