From cc3ac87ba40d63c113b89f277e3245be3a415b88 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 15:02:33 +0200 Subject: [PATCH 01/36] Add global readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..40ebb844 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# 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. + +- [arch-config](./arch-config) +- [arch-setup](./arch-setup) +- [easyffmpeg](./easyffmpeg) From 34769bd1a2641a7a54f418cba699e9ffac914629 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 15:03:59 +0200 Subject: [PATCH 02/36] Link to all folders --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 40ebb844..25102848 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,7 @@ Mostly focused on ArchLinux, although there is also a NixOS configuration and in - [arch-config](./arch-config) - [arch-setup](./arch-setup) +- [arch-themes](./arch-themes) - [easyffmpeg](./easyffmpeg) +- [music-normalize](./music-normalize) +- [nixos-config](./nixos-config) From 3f9736c3503d098fdca2d6dc2905486535fb2cd5 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 15:51:52 +0200 Subject: [PATCH 03/36] Modify installation scripts to use new paths --- arch-config/install.sh | 6 +- arch-config/scripts/arch-config.sh | 129 ++++---- arch-config/scripts/dunst-backlight.sh | 36 +-- arch-config/scripts/dunst-volume.sh | 40 +-- arch-config/scripts/startup.sh | 2 +- arch-setup/install.sh | 403 +------------------------ 6 files changed, 96 insertions(+), 520 deletions(-) diff --git a/arch-config/install.sh b/arch-config/install.sh index 3b26e5a5..ca2f3fbf 100755 --- a/arch-config/install.sh +++ b/arch-config/install.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash 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) cd $HOME @@ -9,6 +9,6 @@ cd $HOME echo Launching arch-config.sh #make executable & launch arch-config.sh -chmod +x ~/config/scripts/arch-config.sh -bash ~/config/scripts/arch-config.sh +chmod +x ~/configs/arch-config/scripts/arch-config.sh +bash ~/configs/arch-config/scripts/arch-config.sh exit 0 diff --git a/arch-config/scripts/arch-config.sh b/arch-config/scripts/arch-config.sh index 164d1b44..43d42d48 100755 --- a/arch-config/scripts/arch-config.sh +++ b/arch-config/scripts/arch-config.sh @@ -42,23 +42,18 @@ EOF cd "$HOME" # remove old installs -rm -rf ~/config +rm -rf ~/configs echo "Checking config file" #clone this repo -git clone https://gitlab.com/RealStickman-arch/config.git &>/dev/null - -# make sure to use master branch -#cd config -#git checkout master &>/dev/null -#cd .. +git clone https://gitea.exu.li/realstickman/configs.git &>/dev/null # check if the install scripts are the same # 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. - 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 # if no seltheme file exists, ask to select a theme @@ -192,6 +187,21 @@ if [[ -d ~/scripts/in_path ]]; then rm -r ~/scripts/in_path 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 cat </dev/null seltheme="$(cat "$HOME/.seltheme")" if [[ "$seltheme" == "nyarch" ]]; then #cp -r "./themes/nyarch/i3" "$HOME/.config/" - cat "./themes/nyarch/i3/color" >>"$HOME/.config/i3/config" - cp -r "./themes/nyarch/polybar" "$HOME/.config/" + cat "$HOME/configs/arch-themes/nyarch/i3/color" >>"$HOME/.config/i3/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 "./themes/.fehbg-nyarch" "$HOME/.fehbg" #sed -i 's/^NAME=".*"/NAME="Rawrch Linyux"/' /etc/os-release elif [[ "$seltheme" == "space-pink" ]]; then #cp -r "./themes/space-pink/i3" "$HOME/.config/" - cat "./themes/space-pink/i3/color" >>"$HOME/.config/i3/config" - cp -r "./themes/space-pink/polybar" "$HOME/.config/" + cat "$HOME/configs/arch-themes/space-pink/i3/color" >>"$HOME/.config/i3/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 "./themes/.fehbg-space-pink" "$HOME/.fehbg" fi -rm -rf ./themes # make fehbg executable chmod +x ~/.fehbg @@ -310,16 +312,6 @@ git clone https://github.com/RealStickman/PSipcalc &>/dev/null cp ./PSipcalc/PSipcalc.ps1 "$HOME/scripts/in_path/sc-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 cat < temp && mv temp "$HOME/.ssh/config" -#fi - # set permissions for sudoers.d to root only sudo chown root:root -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 # disable screensaver & locker /usr/bin/xfconf-query -c xfce4-session -n -t bool -p /startup/screensaver/enabled -s false @@ -450,9 +432,6 @@ chmod +x -R ~/scripts # make applications executable chmod +x -R ~/.local/share/applications -# set settings for nemo -#bash ~/config/scripts/nemo-config.sh - #remove downloaded folder rm -rf ~/config @@ -488,11 +467,6 @@ fi # execute feh "$HOME/.fehbg" -# 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 i3-msg restart 1>/dev/null fi @@ -522,5 +496,4 @@ fi exec "$(getent passwd $LOGNAME | cut -d: -f7)" # exit successfully -$(exit 0) -echo "$?" +exit 0 diff --git a/arch-config/scripts/dunst-backlight.sh b/arch-config/scripts/dunst-backlight.sh index c6456af2..7d71130b 100755 --- a/arch-config/scripts/dunst-backlight.sh +++ b/arch-config/scripts/dunst-backlight.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # You can call this script like this: # $./dunst-backlight.sh up @@ -13,28 +13,28 @@ send_notification() { light=$(get_light) # Make the bar with the special character ─ (it's not dash -) # 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 dunstify -i whitebalance -r 2489 -a backlight-script "$light $bar " } case $1 in up) - # Increase backlight - xbacklight -inc 10 > /dev/null - #xbacklight -inc 10% > /dev/null # legacy xorg-xbacklight - send_notification - #backlightraw=$(xbacklight -get) - #backlight=${backlightraw::-8} - #xbacklight -set "${backlight}0" - ;; + # Increase backlight + xbacklight -inc 10 >/dev/null + #xbacklight -inc 10% > /dev/null # legacy xorg-xbacklight + send_notification + #backlightraw=$(xbacklight -get) + #backlight=${backlightraw::-8} + #xbacklight -set "${backlight}0" + ;; down) - # Decrease backlight - xbacklight -dec 10 > /dev/null - #xbacklight -dec 9% > /dev/null # legacy xorg-xbacklight - send_notification - #backlightraw=$(xbacklight -get) - #backlight=${backlightraw::-8} - #xbacklight -set "${backlight}0" - ;; + # Decrease backlight + xbacklight -dec 10 >/dev/null + #xbacklight -dec 9% > /dev/null # legacy xorg-xbacklight + send_notification + #backlightraw=$(xbacklight -get) + #backlight=${backlightraw::-8} + #xbacklight -set "${backlight}0" + ;; esac diff --git a/arch-config/scripts/dunst-volume.sh b/arch-config/scripts/dunst-volume.sh index 55114f05..c0410496 100755 --- a/arch-config/scripts/dunst-volume.sh +++ b/arch-config/scripts/dunst-volume.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail @@ -12,7 +12,7 @@ get_volume() { } 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() { @@ -26,24 +26,24 @@ send_notification() { case $1 in up) - # Set the volume on (if it was muted) - amixer -D pulse set Master on > /dev/null - # Up the volume (+ 5%) - amixer -D pulse sset Master 5%+ > /dev/null - send_notification - ;; + # Set the volume on (if it was muted) + amixer -D pulse set Master on >/dev/null + # Up the volume (+ 5%) + amixer -D pulse sset Master 5%+ >/dev/null + send_notification + ;; down) - amixer -D pulse set Master on > /dev/null - amixer -D pulse sset Master 5%- > /dev/null - send_notification - ;; + amixer -D pulse set Master on >/dev/null + amixer -D pulse sset Master 5%- >/dev/null + send_notification + ;; mute) - # Toggle mute - amixer -D pulse set Master 1+ toggle > /dev/null - if is_mute ; then - dunstify -i audio-volume-muted -r 2593 -u normal "Mute" - else - send_notification - fi - ;; + # Toggle mute + amixer -D pulse set Master 1+ toggle >/dev/null + if is_mute; then + dunstify -i audio-volume-muted -r 2593 -u normal "Mute" + else + send_notification + fi + ;; esac diff --git a/arch-config/scripts/startup.sh b/arch-config/scripts/startup.sh index 8720e96c..c8113711 100755 --- a/arch-config/scripts/startup.sh +++ b/arch-config/scripts/startup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail diff --git a/arch-setup/install.sh b/arch-setup/install.sh index 98a03af9..f299d89a 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -20,9 +20,6 @@ fi sudo pacman -Syu sudo pacman -S --needed python-pip -#in_xfce=0 -#in_i3gaps=0 - cmd=(dialog --separate-output --checklist "Select Desktop environment/Window manager:" 22 76 16) options=(0 "[DE] xfce4" off # any option can be set to default to "on" 100 "[WM] i3-gaps" off) @@ -31,20 +28,14 @@ clear for choice in $choices; do case $choice in 0) - #in_xfce=1 echo "xfce4" >>"$setupdir/selectedpkgs.txt" ;; 100) - #in_i3gaps=1 echo "i3-gaps" >>"$setupdir/selectedpkgs.txt" ;; esac done -#in_firefox=0 -#in_chromium=0 -#in_tor=0 - cmd=(dialog --separate-output --checklist "Select browsers:" 22 76 16) options=(0 "Firefox" on # any option can be set to default to "on" 10 "Chromium" off @@ -54,39 +45,17 @@ clear for choice in $choices; do case $choice in 0) - #in_firefox=1 echo "firefox" >>"$setupdir/selectedpkgs.txt" ;; 10) - #in_chromium=1 echo "chromium" >>"$setupdir/selectedpkgs.txt" ;; 20) - #in_tor=1 echo "torbrowser-launcher" >>"$setupdir/selectedpkgs.txt" ;; esac done -#in_virtmanager=0 -#in_vmware15=0 -#in_steam=0 -#in_lutris=0 -#in_blender=0 -#in_krita=0 -#in_youtubedl=0 -#in_discord=0 -#in_handbrake=0 -#in_gimp=0 -#in_audacity=0 -#in_mangohud=0 -#in_liferea=0 -#in_fractal=0 -#in_bettergram=0 -#in_waifu2x=0 -#in_telegram=0 -#in_element=0 - cmd=(dialog --separate-output --checklist "Select other programs:" 22 76 16) options=(0 "VirtManager" off # any option can be set to default to "on" 1 "VMWare Workstation" off @@ -96,7 +65,6 @@ options=(0 "VirtManager" off # any option can be set to default to "on" 13 "Minigalaxy" off 20 "Krita" off 21 "Gimp" off - #30 "Youtube-dl" off 31 "YT-dlp" on 32 "Megatools" off 40 "Handbrake" off @@ -112,19 +80,15 @@ clear for choice in $choices; do case $choice in 0) - #in_virtmanager=1 printf '%s\n' 'qemu' 'virt-manager' 'ebtables' 'dnsmasq' >>"$setupdir/selectedpkgs.txt" ;; 1) - #in_vmware15=1 echo "vmware-workstation" >>"$setupdir/aurselectedpkgs.txt" ;; 10) - #in_steam=1 printf '%s\n' 'steam' 'steam-native-runtime' >>"$setupdir/selectedpkgs.txt" ;; 11) - #in_lutris=1 echo "lutris" >>"$setupdir/selectedpkgs.txt" ;; 12) @@ -134,17 +98,11 @@ for choice in $choices; do echo "minigalaxy" >>"$setupdir/aurselectedpkgs.txt" ;; 20) - #in_krita=1 echo "krita" >>"$setupdir/selectedpkgs.txt" ;; 21) - #in_gimp=1 echo "gimp" >>"$setupdir/selectedpkgs.txt" ;; - 30) - #in_youtubedl=1 - echo "youtube-dl" >>"$setupdir/selectedpkgs.txt" - ;; 31) printf '%s\n' 'yt-dlp' 'yt-dlp-drop-in' >>"$setupdir/aurselectedpkgs.txt" ;; @@ -152,29 +110,21 @@ for choice in $choices; do echo "megatools-bin" >>"$setupdir/aurselectedpkgs.txt" ;; 40) - #in_handbrake=1 echo "handbrake" >>"$setupdir/selectedpkgs.txt" ;; 41) - # TODO - #in_audacity=1 - #echo "audacity" >> "$setupdir/selectedpkgs.txt" - echo "The situation with audacity is unknown right now. Check for FOSS no-telemetry forks" + echo "audacity" >>"$setupdir/selectedpkgs.txt" ;; 42) printf '%s\n' 'k3b' 'cdparanoia' 'cdrdao' 'cdrtools' 'dvd+rw-tools' 'emovix' 'transcode' 'vcdimager' >>"$setupdir/selectedpkgs.txt" ;; 60) - #in_discord=1 - #echo "discord" >> "$setupdir/selectedpkgs.txt" - echo "discord_arch_electron" >>"$setupdir/aurselectedpkgs.txt" + echo "discord" >>"$setupdir/selectedpkgs.txt" ;; 61) - #in_element=1 echo "element-desktop" >>"$setupdir/selectedpkgs.txt" ;; 62) - #in_telegram=1 echo "telegram-desktop" >>"$setupdir/selectedpkgs.txt" ;; 70) @@ -186,31 +136,7 @@ for choice in $choices; do esac done -: ' -in_acpufreq=0 - -cmd=(dialog --separate-output --checklist "Performance and Battery life" 22 76 16) -options=(0 "auto-cpufreq" 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) - #in_corectrl=1 - echo "corectrl" >> "$setupdir/aurselectedpkgs.txt" - ;; - esac -done -' - in_doomemacs=0 -#in_vscodium=0 in_podman=0 cmd=(dialog --separate-output --checklist "Devtools" 22 76 16) @@ -229,7 +155,6 @@ for choice in $choices; do # TODO handle rest of installation ;; 1) - #in_vscodium=1 echo "vscodium-bin" >>"$setupdir/aurselectedpkgs.txt" ;; 10) @@ -238,34 +163,22 @@ for choice in $choices; do esac done -#in_teams=0 -#in_slack=0 - cmd=(dialog --separate-output --checklist "School and work communication" 22 76 16) options=(0 "Teams" off - 1 "Slack" off 10 "OneNote" off) choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) clear for choice in $choices; do case $choice in 0) - #in_teams=1 echo "teams" >>"$setupdir/aurselectedpkgs.txt" ;; - 1) - #in_slack=1 - #echo "slack-desktop" >> "$setupdir/aurselectedpkgs.txt" - echo "slack-electron" >>"$setupdir/aurselectedpkgs.txt" - ;; 10) echo "p3x-onenote" >>"$setupdir/aurselectedpkgs.txt" ;; esac done -#in_pkgstats=0 - cmd=(dialog --separate-output --checklist "Report installed packages?" 22 76 16) options=(0 "pkgstats" off) choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) @@ -273,7 +186,6 @@ clear for choice in $choices; do case $choice in 0) - #in_pkgstats=1 echo "pkgstats" >>"$setupdir/selectedpkgs.txt" ;; esac @@ -317,18 +229,6 @@ echo Installing default pacman programs sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt" echo Installed official programs -# pip -#echo Installing python programs -#pip install --user autotrash -#echo Installed python programs - -# REVIEW Patched neofetch version to remove Color codes -#git clone https://github.com/RealStickman/neofetch -#cd neofetch -#sudo make install -#cd .. -#rm -rf neofetch - # install paru-bin with yay, or download paru from github if [[ $(pacman -Q | grep yay) ]] && [[ ! $(pacman -Q | grep paru) ]]; then echo "Installing paru" @@ -374,249 +274,6 @@ sudo pacman -S --needed - <"$setupdir/selectedpkgs.txt" echo Installing from AUR paru -S --needed - <"$setupdir/aurselectedpkgs.txt" -: ' -if [ $in_vmware15 -eq 1 ]; then - echo "Installing VMWare Workstation 15" - paru -S --needed vmware-workstation15 -else - echo "Skipping VMWare Workstation 15" -fi -' - -#DEs & WMs -: ' -if [ $in_xfce -eq 1 ]; then - echo "Installing xfce" - sudo pacman -S --needed xfce4 -else - echo "Skipping xfce" -fi -' - -: ' -if [ $in_i3gaps -eq 1 ]; then - echo "Installing i3-gaps" - sudo pacman -S --needed i3-gaps -else - echo "Skipping i3-gaps" -fi -' - -: ' -#browsers -if [ $in_firefox -eq 1 ]; then - echo "Installing Firefox" - sudo pacman -S --needed firefox -else - echo "Skipping Firefox" -fi -' - -: ' -if [ $in_chromium -eq 1 ]; then - echo "Installing Chromium" - sudo pacman -S --needed chromium -else - echo "Skipping Chromium" -fi -' - -: ' -if [ $in_netsurf -eq 1 ]; then - echo "Installing Netsurf" - sudo pacman -S --needed netsurf -else - echo "Skipping Netsurf" -fi -' - -: ' -if [ $in_icecat -eq 1 ]; then - echo "Installing Icecat" - paru -S --needed icecat-bin -else - echo "Skipping Icecat" -fi -' - -: ' -if [ $in_tor -eq 1 ]; then - echo "Installing Tor" - sudo pacman -S --needed torbrowser-launcher -else - echo "Skipping Tor" -fi -' - -#other programs -: ' -if [ $in_virtmanager -eq 1 ]; then - echo "Installing VirtManager" - sudo pacman -S --needed qemu virt-manager -else - echo "Skipping VirtManager" -fi -' - -: ' -if [ $in_steam -eq 1 ]; then - echo "Installing Steam" - sudo pacman -S --needed steam steam-native-runtime -else - echo "Skipping Steam" -fi -' - -: ' -if [ $in_lutris -eq 1 ]; then - echo "Installing Lutris" - sudo pacman -S --needed lutris -else - echo "Skipping Lutris" -fi -' - -: ' -if [ $in_blender -eq 1 ]; then - echo "Installing Blender" - sudo pacman -S --needed blender -else - echo "Skipping Blender" -fi -' - -: ' -if [ $in_krita -eq 1 ]; then - echo "Installing Krita" - sudo pacman -S --needed krita -else - echo "Skipping Krita" -fi -' - -: ' -if [ $in_youtubedl -eq 1 ]; then - echo "Installing Youtube-dl" - sudo pacman -S --needed youtube-dl -else - echo "Skipping Youtube-dl" -fi -' - -: ' -if [ $in_discord -eq 1 ]; then - echo "Installing Discord" - #sudo pacman -S --needed discord - paru -S discord_arch_electron -else - echo "Skipping Discord" -fi -' - -: ' -if [ $in_handbrake -eq 1 ]; then - echo "Installing Handbrake" - sudo pacman -S --needed handbrake -else - echo "Skipping Handbrake" -fi -' - -: ' -if [ $in_gimp -eq 1 ]; then - echo "Installing Gimp" - sudo pacman -S --needed gimp -else - echo "Skipping Gimp" -fi -' - -: ' -if [ $in_audacity -eq 1 ]; then - echo "Installing Audacity" - sudo pacman -S --needed audacity -else - echo "Skipping Audacity" -fi -' - -: ' -if [ $in_mangohud -eq 1 ]; then - echo "Installing MangoHud" - git clone --recurse-submodules https://github.com/flightlessmango/MangoHud.git - ./MangoHud/build.sh install -else - echo "Skipping MangoHud" -fi -' - -: ' -if [ $in_liferea -eq 1 ]; then - echo "Installing Liferea" - paru -S --needed liferea -else - echo "Skipping Liferea" -fi -' - -: ' -if [ $in_fractal -eq 1 ]; then - echo "Installing Fractal" - sudo pacman -S --needed fractal -else - echo "Skipping Fractal" -fi -' - -: ' -if [ $in_bettergram -eq 1 ]; then - echo "Installing Bettergram" - paru -S --needed bettergram -else - echo "Skipping Bettergram" -fi -' - -: ' -if [ $in_waifu2x -eq 1 ]; then - echo "Installing Waifu2x" - paru -S --needed waifu2x-ncnn-vulkan -else - echo "Skipping Waifu2x" -fi -' - -: ' -if [ $in_telegram -eq 1 ]; then - echo "Installing Telegram" - sudo pacman -S --needed telegram-desktop -else - echo "Skipping Telegram" -fi -' - -: ' -if [ $in_element -eq 1 ]; then - echo "Installing Element" - sudo pacman -S --needed element-desktop -else - echo "Skipping Element" -fi -' - -: ' -#performance and battery life -if [ $in_acpufreq -eq 1 ]; then - echo "Installing auto-cpufreq" - paru -S --needed auto-cpufreq-git - sudo auto-cpufreq --install - sudo systemctl start auto-cpufreq - sudo systemctl enable auto-cpufreq -else - echo "Skipping auto-cpufreq" -fi -' - #devtools if [ $in_doomemacs -eq 1 ]; then echo "Installing doom-emacs" @@ -630,15 +287,6 @@ else echo "Skipping doom-emacs" fi -: ' -if [ $in_vscodium -eq 1 ]; then - echo "Installing vscodium" - paru -S --needed vscodium-bin -else - echo "Skipping vscodium" -fi -' - if [ $in_podman -eq 1 ]; then echo "Installing podman" sudo pacman -S --needed podman podman-dnsname fuse-overlayfs buildah @@ -650,36 +298,6 @@ else echo "Skipping podman" fi -: ' -#other social stuff -if [ $in_teams -eq 1 ]; then - echo "Installing teams" - paru -S --needed teams -else - echo "Skipping teams" -fi -' - -: ' -if [ $in_slack -eq 1 ]; then - echo "Installing slack" - #paru -S --needed slack-desktop - paru -s --needed slack-electron -else - echo "Skipping slack" -fi -' - -: ' -#stats -if [ $in_pkgstats -eq 1 ]; then - echo "Installing pkgstats" - sudo pacman -S --needed pkgstats -else - echo "Skipping pkgstats" -fi -' - # other system configs # arco pc if [ $in_arco_pc -eq 1 ]; then @@ -717,9 +335,6 @@ sudo systemctl enable betterlockscreen@$USER # enable firewall echo "Enabling Firewall" -#sudo ufw enable -#sudo systemctl enable ufw -#sudo systemctl start ufw sudo systemctl enable --now firewalld sudo firewall-cmd --zone=public --permanent --remove-service=ssh @@ -740,20 +355,8 @@ sudo bash install.sh # go back cd ../../ -#Changes to home folder automatically now, no need to be extra careful anymore. -git clone https://gitlab.com/RealStickman-arch/config -echo Finished downloading config - -# Download git repos -bash ~/config/scripts/sc-git-pull - -#cleanup -rm -rf ~/setup -echo Removed setup files - -#downloading config echo Setting config -bash ~/config/install.sh +bash ~/configs/arch-config/install.sh if [[ $(pacman -Q pkgstats 2>/dev/null >/dev/null) ]]; then pkgstats From 135ace00d0b6f0f23cd13e09942103e7851b52ee Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 16:08:00 +0200 Subject: [PATCH 04/36] Modify install script to be less hands-on --- README.md | 17 ++++++++++ arch-setup/install.sh | 49 +++++++++++++++++----------- arch-setup/packages/officialpkgs.txt | 3 ++ arch-setup/packages/sort-lists.sh | 7 ++-- 4 files changed, 53 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 25102848..14456b4c 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,26 @@ 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 + +## Other + - [easyffmpeg](./easyffmpeg) - [music-normalize](./music-normalize) - [nixos-config](./nixos-config) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index f299d89a..01574439 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -16,9 +16,22 @@ if ! pacman -Sl multilib &>/dev/null; then exit 1 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 -sudo pacman -Syu -sudo pacman -S --needed python-pip +echo Updating keyring +sudo pacman -Sy --noconfirm archlinux-keyring +echo Updating repos and packages +sudo pacman -Syu --noconfirm +echo Installing pip +sudo pacman -S --needed --noconfirm python-pip +echo Select packages to install cmd=(dialog --separate-output --checklist "Select Desktop environment/Window manager:" 22 76 16) options=(0 "[DE] xfce4" off # any option can be set to default to "on" @@ -213,20 +226,12 @@ done #uninstalling unused packages echo Uninstalling unused packages -sudo pacman -Rns - <"$setupdir/packages/uninstall.txt" +sudo pacman -Rns --noconfirm - <"$setupdir/packages/uninstall.txt" echo Uninstalled unused packages -# find all repos -sudo pacman -Sy - -#update stuff -echo Updating packages -sudo pacman -Syu -echo Updated packages - #pacman programs echo Installing default pacman programs -sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt" +sudo pacman -S --needed --noconfirm - <"$setupdir/packages/officialpkgs.txt" echo Installed official programs # install paru-bin with yay, or download paru from github @@ -243,7 +248,7 @@ fi # audio echo Installing audio programs -paru -S --needed - <"$setupdir/packages/audiopkgs.txt" +paru -S --needed --noconfirm - <"$setupdir/packages/audiopkgs.txt" echo Installed audio programs #AUR @@ -253,12 +258,12 @@ echo Installed AUR programs # theming echo Installing themes and icons -paru -S --needed - <"$setupdir/packages/theme-packages.txt" +paru -S --needed --noconfirm - <"$setupdir/packages/theme-packages.txt" echo Installed themes and icons #install wine echo Installing wine -sudo pacman -S --needed - <"$setupdir/packages/winepkgs.txt" +sudo pacman -S --noconfirm --needed - <"$setupdir/packages/winepkgs.txt" echo Installed wine ################### @@ -267,12 +272,18 @@ echo Installed wine echo Installing selected programs # install selected packages -echo Installing from official repository -sudo pacman -S --needed - <"$setupdir/selectedpkgs.txt" +if [ -f "$setupdir/selectedpkgs.txt" ]; then + echo Installing from official repository + # NOTE || true to continue if no packages have been selected + sudo pacman -S --needed --noconfirm - <"$setupdir/selectedpkgs.txt" || true +fi # install selected aur packages -echo Installing from AUR -paru -S --needed - <"$setupdir/aurselectedpkgs.txt" +if [ -f "$setupdir/aurselectedpkgs.txt" ]; then + echo Installing from AUR + # NOTE || true to continue if no packages have been selected + paru -S --needed --noconfirm - <"$setupdir/aurselectedpkgs.txt" || true +fi #devtools if [ $in_doomemacs -eq 1 ]; then diff --git a/arch-setup/packages/officialpkgs.txt b/arch-setup/packages/officialpkgs.txt index 2d1f7d6b..e9ab3d66 100644 --- a/arch-setup/packages/officialpkgs.txt +++ b/arch-setup/packages/officialpkgs.txt @@ -83,8 +83,10 @@ os-prober os-prober p7zip pacman-contrib +phonon-qt5-gstreamer picom piper +pipewire-jack playerctl polkit-gnome python-dbus @@ -119,6 +121,7 @@ webkit2gtk wget whois wireguard-tools +wireplumber xdg-user-dirs xdotool xf86-input-elographics diff --git a/arch-setup/packages/sort-lists.sh b/arch-setup/packages/sort-lists.sh index f15e1353..d5b207a1 100755 --- a/arch-setup/packages/sort-lists.sh +++ b/arch-setup/packages/sort-lists.sh @@ -1,12 +1,11 @@ #!/usr/bin/env bash set -euo pipefail -cd "$HOME/GitProjects/setup/packages/" +cd "$HOME/GitProjects/configs/arch-setup/packages/" - -readarray -d '' packagefiles < <(find "$HOME/GitProjects/setup/packages/" -name "*\.txt" -print0) +readarray -d '' packagefiles < <(find "$HOME/GitProjects/configs/arch-setup/packages/" -name "*\.txt" -print0) for file in "${packagefiles[@]}"; do echo "Sorting $file" - cat "$file" | sort > "${file}.tmp" && mv "${file}.tmp" "$file" + cat "$file" | sort >"${file}.tmp" && mv "${file}.tmp" "$file" done From d2a9f4443b989ca6bf054870af28e5fbbe1873f9 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 16:16:56 +0200 Subject: [PATCH 05/36] Change package installation order All packages from official sources are installed before AUR-packages Audio packages merged into officialpkgs list --- arch-setup/install.sh | 35 +++++++++++++++------------ arch-setup/packages/audiopkgs-old.txt | 10 -------- arch-setup/packages/audiopkgs.txt | 8 ------ arch-setup/packages/officialpkgs.txt | 7 ++++++ 4 files changed, 27 insertions(+), 33 deletions(-) delete mode 100644 arch-setup/packages/audiopkgs-old.txt delete mode 100644 arch-setup/packages/audiopkgs.txt diff --git a/arch-setup/install.sh b/arch-setup/install.sh index 01574439..e9c3c607 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -234,6 +234,16 @@ echo Installing default pacman programs sudo pacman -S --needed --noconfirm - <"$setupdir/packages/officialpkgs.txt" echo Installed official programs +# theming +echo Installing themes and icons +paru -S --needed --noconfirm - <"$setupdir/packages/theme-packages.txt" +echo Installed themes and icons + +#install wine +echo Installing wine +sudo pacman -S --noconfirm --needed - <"$setupdir/packages/winepkgs.txt" +echo Installed wine + # install paru-bin with yay, or download paru from github if [[ $(pacman -Q | grep yay) ]] && [[ ! $(pacman -Q | grep paru) ]]; then echo "Installing paru" @@ -246,26 +256,21 @@ elif [[ ! $(pacman -Q | grep yay) ]] && [[ ! $(pacman -Q | grep paru) ]]; then cd .. fi -# audio -echo Installing audio programs -paru -S --needed --noconfirm - <"$setupdir/packages/audiopkgs.txt" -echo Installed audio programs - #AUR echo Installing default AUR programs paru -S --needed - <"$setupdir/packages/aurpkgs.txt" +# TODO for btrfsmaintenance, use btrfsmaintenance (1) +# TODO for jellyfin-media-player, use jellyfin-media-player (1) +# TODO for java-environment, use jdk-openjdk (1) +# TODO for cargo, use rust (1) +# TODO for ttf-iosevka, use ttf-iosevka (1) +# TODO for ttf-ms-fonts, use ttf-ms-fonts (1) +# TODO for ttf-vista-fonts, use ttf-vista-fonts (1) +# TODO for wps-office, use wps-office (1) +# TODO for ffmpeg-normalize, use ffmpeg-normalize (1) +# TODO for nohang, use nohang (1) echo Installed AUR programs -# theming -echo Installing themes and icons -paru -S --needed --noconfirm - <"$setupdir/packages/theme-packages.txt" -echo Installed themes and icons - -#install wine -echo Installing wine -sudo pacman -S --noconfirm --needed - <"$setupdir/packages/winepkgs.txt" -echo Installed wine - ################### #selected programs# ################### diff --git a/arch-setup/packages/audiopkgs-old.txt b/arch-setup/packages/audiopkgs-old.txt deleted file mode 100644 index 78c616b0..00000000 --- a/arch-setup/packages/audiopkgs-old.txt +++ /dev/null @@ -1,10 +0,0 @@ -alsa-card-profiles -alsa-utils -lib32-libpulse -libcanberra-pulse -libpulse -pavucontrol -pulseaudio -pulseaudio-alsa -pulseaudio-bluetooth -pulseeffects-legacy diff --git a/arch-setup/packages/audiopkgs.txt b/arch-setup/packages/audiopkgs.txt deleted file mode 100644 index 52965f57..00000000 --- a/arch-setup/packages/audiopkgs.txt +++ /dev/null @@ -1,8 +0,0 @@ -alsa-utils -easyeffects -pavucontrol -pipewire -pipewire-alsa -pipewire-jack -pipewire-media-session -pipewire-pulse diff --git a/arch-setup/packages/officialpkgs.txt b/arch-setup/packages/officialpkgs.txt index e9ab3d66..7df371a6 100644 --- a/arch-setup/packages/officialpkgs.txt +++ b/arch-setup/packages/officialpkgs.txt @@ -1,5 +1,6 @@ acpilight age +alsa-utils arandr bandwhich base-devel @@ -14,6 +15,7 @@ dnsutils dosfstools dunst e2fsprogs +easyeffects exfatprogs f2fs-tools fakeroot @@ -83,10 +85,15 @@ os-prober os-prober p7zip pacman-contrib +pavucontrol phonon-qt5-gstreamer picom piper +pipewire +pipewire-alsa pipewire-jack +pipewire-media-session +pipewire-pulse playerctl polkit-gnome python-dbus From d1c1c51a5e26222429bad64de2420befd6006af4 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 16:36:52 +0200 Subject: [PATCH 06/36] Check if user has sudo rights and keep sudo from timing out --- arch-setup/install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index e9c3c607..570b471c 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -4,6 +4,22 @@ # NOTE ignore errors from missing "||". Try getting the line below to work #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 +if [ "$EUID" -ne 0 ]; then + sudo -v +fi + +# keep sudo active in background +func_dont_timeout & + # get current directory setupdir=$(pwd) From 4d6e0716c937bcd7bfea588a3f2a429df8849f5c Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 16:44:09 +0200 Subject: [PATCH 07/36] Disable nix installer --- arch-setup/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index 570b471c..28b5da0b 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -344,7 +344,7 @@ if [ $in_arco_hp -eq 1 ]; then fi # 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 ##### From 3cefaef5fac20e7649a213cda6972e90575bda63 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 16:47:30 +0200 Subject: [PATCH 08/36] Remove noconfirms --- arch-setup/install.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index 28b5da0b..433c4ae8 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -42,11 +42,11 @@ fi # fix install problems echo Updating keyring -sudo pacman -Sy --noconfirm archlinux-keyring +sudo pacman -Sy archlinux-keyring echo Updating repos and packages -sudo pacman -Syu --noconfirm +sudo pacman -Syu echo Installing pip -sudo pacman -S --needed --noconfirm python-pip +sudo pacman -S --needed python-pip echo Select packages to install cmd=(dialog --separate-output --checklist "Select Desktop environment/Window manager:" 22 76 16) @@ -242,22 +242,22 @@ done #uninstalling unused packages echo Uninstalling unused packages -sudo pacman -Rns --noconfirm - <"$setupdir/packages/uninstall.txt" +sudo pacman -Rns - <"$setupdir/packages/uninstall.txt" echo Uninstalled unused packages #pacman programs echo Installing default pacman programs -sudo pacman -S --needed --noconfirm - <"$setupdir/packages/officialpkgs.txt" +sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt" echo Installed official programs # theming echo Installing themes and icons -paru -S --needed --noconfirm - <"$setupdir/packages/theme-packages.txt" +paru -S --needed - <"$setupdir/packages/theme-packages.txt" echo Installed themes and icons #install wine echo Installing wine -sudo pacman -S --noconfirm --needed - <"$setupdir/packages/winepkgs.txt" +sudo pacman -S --needed - <"$setupdir/packages/winepkgs.txt" echo Installed wine # install paru-bin with yay, or download paru from github @@ -296,14 +296,14 @@ echo Installing selected programs if [ -f "$setupdir/selectedpkgs.txt" ]; then echo Installing from official repository # NOTE || true to continue if no packages have been selected - sudo pacman -S --needed --noconfirm - <"$setupdir/selectedpkgs.txt" || true + sudo pacman -S --needed - <"$setupdir/selectedpkgs.txt" || true fi # install selected aur packages if [ -f "$setupdir/aurselectedpkgs.txt" ]; then echo Installing from AUR # NOTE || true to continue if no packages have been selected - paru -S --needed --noconfirm - <"$setupdir/aurselectedpkgs.txt" || true + paru -S --needed - <"$setupdir/aurselectedpkgs.txt" || true fi #devtools From eb2fb5d98d891425f432625ba18cd6cb51b0971b Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 16:52:53 +0200 Subject: [PATCH 09/36] Move theming after AUR --- arch-setup/install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index 433c4ae8..44d0884f 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -42,7 +42,7 @@ fi # fix install problems echo Updating keyring -sudo pacman -Sy archlinux-keyring +sudo pacman -Sy --noconfirm archlinux-keyring echo Updating repos and packages sudo pacman -Syu echo Installing pip @@ -250,11 +250,6 @@ echo Installing default pacman programs sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt" echo Installed official programs -# theming -echo Installing themes and icons -paru -S --needed - <"$setupdir/packages/theme-packages.txt" -echo Installed themes and icons - #install wine echo Installing wine sudo pacman -S --needed - <"$setupdir/packages/winepkgs.txt" @@ -287,6 +282,11 @@ paru -S --needed - <"$setupdir/packages/aurpkgs.txt" # TODO for nohang, use nohang (1) echo Installed AUR programs +# theming +echo Installing themes and icons +paru -S --needed - <"$setupdir/packages/theme-packages.txt" +echo Installed themes and icons + ################### #selected programs# ################### From 2aacd6d3e93b248d4da40bef9595308a7fd6bbae Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 17:04:59 +0200 Subject: [PATCH 10/36] Remove pip installation. Use font-manager from official repos --- arch-setup/install.sh | 4 +--- arch-setup/packages/aurpkgs.txt | 2 -- arch-setup/packages/officialpkgs.txt | 1 + 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index 44d0884f..bed30bfb 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -45,8 +45,6 @@ echo Updating keyring sudo pacman -Sy --noconfirm archlinux-keyring echo Updating repos and packages sudo pacman -Syu -echo Installing pip -sudo pacman -S --needed python-pip echo Select packages to install cmd=(dialog --separate-output --checklist "Select Desktop environment/Window manager:" 22 76 16) @@ -267,7 +265,7 @@ elif [[ ! $(pacman -Q | grep yay) ]] && [[ ! $(pacman -Q | grep paru) ]]; then cd .. fi -#AUR +# AUR echo Installing default AUR programs paru -S --needed - <"$setupdir/packages/aurpkgs.txt" # TODO for btrfsmaintenance, use btrfsmaintenance (1) diff --git a/arch-setup/packages/aurpkgs.txt b/arch-setup/packages/aurpkgs.txt index 21fa6add..14a823df 100644 --- a/arch-setup/packages/aurpkgs.txt +++ b/arch-setup/packages/aurpkgs.txt @@ -4,8 +4,6 @@ bitwarden btrfsmaintenance davfs2 downgrade -ffmpeg-normalize-git -font-manager-git jellyamp jellyfin-media-player joplin-appimage diff --git a/arch-setup/packages/officialpkgs.txt b/arch-setup/packages/officialpkgs.txt index 7df371a6..58f84127 100644 --- a/arch-setup/packages/officialpkgs.txt +++ b/arch-setup/packages/officialpkgs.txt @@ -25,6 +25,7 @@ firewalld fish flameshot foliate +font-manager-git freetype2 fwupd fwupd-efi From 2c263a4eae24e9350680cbbbe699b7584545b8d6 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 17:39:37 +0200 Subject: [PATCH 11/36] Fix package names --- arch-setup/packages/officialpkgs.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch-setup/packages/officialpkgs.txt b/arch-setup/packages/officialpkgs.txt index 58f84127..3f695b2b 100644 --- a/arch-setup/packages/officialpkgs.txt +++ b/arch-setup/packages/officialpkgs.txt @@ -25,7 +25,7 @@ firewalld fish flameshot foliate -font-manager-git +font-manager freetype2 fwupd fwupd-efi @@ -73,7 +73,6 @@ nemo-preview nemo-share neovim nextcloud-client -nomacs notification-daemon noto-fonts noto-fonts-cjk From 62e3e4728f83751066234b746433846d7c48c569 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 17:40:16 +0200 Subject: [PATCH 12/36] Remove conflicting package --- arch-setup/packages/officialpkgs.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/arch-setup/packages/officialpkgs.txt b/arch-setup/packages/officialpkgs.txt index 3f695b2b..6a450127 100644 --- a/arch-setup/packages/officialpkgs.txt +++ b/arch-setup/packages/officialpkgs.txt @@ -92,7 +92,6 @@ piper pipewire pipewire-alsa pipewire-jack -pipewire-media-session pipewire-pulse playerctl polkit-gnome From f861658cd268ab6217ad9e4cb91e252f4150188c Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 18:29:38 +0200 Subject: [PATCH 13/36] Add obviously bogus package --- arch-setup/packages/officialpkgs.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/arch-setup/packages/officialpkgs.txt b/arch-setup/packages/officialpkgs.txt index 6a450127..53fd37b4 100644 --- a/arch-setup/packages/officialpkgs.txt +++ b/arch-setup/packages/officialpkgs.txt @@ -92,6 +92,7 @@ piper pipewire pipewire-alsa pipewire-jack +obviousbogus pipewire-pulse playerctl polkit-gnome From f3beae1cb69bf9e026538aa1589f6c45d4153dfc Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 18:29:46 +0200 Subject: [PATCH 14/36] 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. --- arch-setup/install.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index bed30bfb..e767fd2b 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -240,17 +240,26 @@ done #uninstalling unused packages echo Uninstalling unused packages -sudo pacman -Rns - <"$setupdir/packages/uninstall.txt" +#sudo pacman -Rns - <"$setupdir/packages/uninstall.txt" +while read package; do + sudo pacman -Rns "$package" +done <"$setupdir/packages/uninstall.txt" echo Uninstalled unused packages #pacman programs echo Installing default pacman programs -sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt" +#sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt" +while read package; do + sudo pacman -S --needed "$package" || echo "$package" >>notfoundpackages.txt +done <"$setupdir/packages/officialpkgs.txt" echo Installed official programs #install wine echo Installing wine -sudo pacman -S --needed - <"$setupdir/packages/winepkgs.txt" +#sudo pacman -S --needed - <"$setupdir/packages/winepkgs.txt" +while read package; do + sudo pacman -S --needed "$package" || echo "$package" >>notfoundpackages.txt +done <"$setupdir/packages/winepkgs.txt" echo Installed wine # install paru-bin with yay, or download paru from github From 759599e8ec48ea1f3ddcc85b486372db17b580ec Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 18:34:13 +0200 Subject: [PATCH 15/36] Put list of packages not found in setup directory --- arch-setup/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index e767fd2b..36c9a7b1 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -250,7 +250,7 @@ echo Uninstalled unused packages echo Installing default pacman programs #sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt" while read package; do - sudo pacman -S --needed "$package" || echo "$package" >>notfoundpackages.txt + sudo pacman -S --needed "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt" done <"$setupdir/packages/officialpkgs.txt" echo Installed official programs @@ -258,7 +258,7 @@ echo Installed official programs echo Installing wine #sudo pacman -S --needed - <"$setupdir/packages/winepkgs.txt" while read package; do - sudo pacman -S --needed "$package" || echo "$package" >>notfoundpackages.txt + sudo pacman -S --needed "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt" done <"$setupdir/packages/winepkgs.txt" echo Installed wine From e9c8587a2bb6dd3a2cdd674ee1c49708491bf3e7 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 18:37:20 +0200 Subject: [PATCH 16/36] Remove bogus package --- arch-setup/packages/officialpkgs.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/arch-setup/packages/officialpkgs.txt b/arch-setup/packages/officialpkgs.txt index 53fd37b4..6a450127 100644 --- a/arch-setup/packages/officialpkgs.txt +++ b/arch-setup/packages/officialpkgs.txt @@ -92,7 +92,6 @@ piper pipewire pipewire-alsa pipewire-jack -obviousbogus pipewire-pulse playerctl polkit-gnome From 19a529992e3fc5b223b9df99bf8dff17e1228b79 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 18:38:12 +0200 Subject: [PATCH 17/36] Testing --- arch-setup/install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index 36c9a7b1..ac14d2b9 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -238,6 +238,8 @@ for choice in $choices; do esac done +rm "$setupdir/notfoundpackages.txt" + #uninstalling unused packages echo Uninstalling unused packages #sudo pacman -Rns - <"$setupdir/packages/uninstall.txt" @@ -251,6 +253,7 @@ echo Installing default pacman programs #sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt" while read package; do sudo pacman -S --needed "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt" + exit done <"$setupdir/packages/officialpkgs.txt" echo Installed official programs From 877bfb66d149f49eb9ea3eb57569d34addb930cd Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 18:41:46 +0200 Subject: [PATCH 18/36] Set confirmation for pacman commands --- arch-setup/install.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index ac14d2b9..a8f0c5f6 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -32,14 +32,6 @@ if ! pacman -Sl multilib &>/dev/null; then exit 1 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 echo Updating keyring sudo pacman -Sy --noconfirm archlinux-keyring @@ -240,11 +232,19 @@ 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 echo Uninstalling unused packages #sudo pacman -Rns - <"$setupdir/packages/uninstall.txt" while read package; do - sudo pacman -Rns "$package" + yes | LC_ALL=en_US.UTF-8 sudo pacman -Rns "$package" done <"$setupdir/packages/uninstall.txt" echo Uninstalled unused packages @@ -252,7 +252,7 @@ echo Uninstalled unused packages echo Installing default pacman programs #sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt" while read package; do - sudo pacman -S --needed "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt" + yes | LC_ALL=en_US.UTF-8 sudo pacman -S --needed "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt" exit done <"$setupdir/packages/officialpkgs.txt" echo Installed official programs @@ -261,7 +261,7 @@ echo Installed official programs echo Installing wine #sudo pacman -S --needed - <"$setupdir/packages/winepkgs.txt" while read package; do - sudo pacman -S --needed "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt" + yes | LC_ALL=en_US.UTF-8 sudo pacman -S --needed "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt" done <"$setupdir/packages/winepkgs.txt" echo Installed wine From b60e5bc5e81d829720b60da32bcb78856e236380 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 18:43:43 +0200 Subject: [PATCH 19/36] Remove LC_ALL --- arch-setup/install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index a8f0c5f6..acac2cd7 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -244,7 +244,7 @@ rm "$setupdir/notfoundpackages.txt" echo Uninstalling unused packages #sudo pacman -Rns - <"$setupdir/packages/uninstall.txt" while read package; do - yes | LC_ALL=en_US.UTF-8 sudo pacman -Rns "$package" + yes | sudo pacman -Rns "$package" done <"$setupdir/packages/uninstall.txt" echo Uninstalled unused packages @@ -252,7 +252,7 @@ echo Uninstalled unused packages echo Installing default pacman programs #sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt" while read package; do - yes | LC_ALL=en_US.UTF-8 sudo pacman -S --needed "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt" + yes | sudo pacman -S --needed "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt" exit done <"$setupdir/packages/officialpkgs.txt" echo Installed official programs @@ -261,7 +261,7 @@ echo Installed official programs echo Installing wine #sudo pacman -S --needed - <"$setupdir/packages/winepkgs.txt" while read package; do - yes | LC_ALL=en_US.UTF-8 sudo pacman -S --needed "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt" + yes | sudo pacman -S --needed "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt" done <"$setupdir/packages/winepkgs.txt" echo Installed wine From 3e216fa134d17445180264f358e410a90ea72c11 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 18:43:56 +0200 Subject: [PATCH 20/36] Remove exit for debugging --- arch-setup/install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index acac2cd7..618d90bd 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -253,7 +253,6 @@ echo Installing default pacman programs #sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt" while read package; do yes | sudo pacman -S --needed "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt" - exit done <"$setupdir/packages/officialpkgs.txt" echo Installed official programs From 226f07e16d0f867bd172f0fc341ee2ec09280478 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 18:46:30 +0200 Subject: [PATCH 21/36] Use --noconfirm for pacman --- arch-setup/install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index 618d90bd..79d22141 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -244,7 +244,7 @@ rm "$setupdir/notfoundpackages.txt" echo Uninstalling unused packages #sudo pacman -Rns - <"$setupdir/packages/uninstall.txt" while read package; do - yes | sudo pacman -Rns "$package" + sudo pacman -Rns --noconfirm "$package" done <"$setupdir/packages/uninstall.txt" echo Uninstalled unused packages @@ -252,7 +252,7 @@ echo Uninstalled unused packages echo Installing default pacman programs #sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt" while read package; do - yes | sudo pacman -S --needed "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt" + sudo pacman -S --needed --noconfirm "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt" done <"$setupdir/packages/officialpkgs.txt" echo Installed official programs @@ -260,7 +260,7 @@ echo Installed official programs echo Installing wine #sudo pacman -S --needed - <"$setupdir/packages/winepkgs.txt" while read package; do - yes | sudo pacman -S --needed "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt" + sudo pacman -S --needed --noconfirm "$package" || echo "$package" >>"$setupdir/notfoundpackages.txt" done <"$setupdir/packages/winepkgs.txt" echo Installed wine From f85eb2631615c70bbe5fd8f9c1256777db624eb1 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 18:58:22 +0200 Subject: [PATCH 22/36] Disable grub theme --- arch-setup/install.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index 79d22141..ea5d28fe 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -368,7 +368,6 @@ sudo systemctl start vnstat # setup autotrash autotrash -td 5 --install -systemctl --user start autotrash systemctl --user enable autotrash.timer # enable lockscreen for systemd @@ -390,11 +389,11 @@ sudo locale-gen 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 +#git clone https://github.com/xenlism/Grub-themes.git +#cd "Grub-themes/xenlism-grub-arch-1080p/" +#sudo bash install.sh # go back -cd ../../ +#cd ../../ echo Setting config bash ~/configs/arch-config/install.sh From 765d63a800dcc569ef09aa6d67dec53159fe8b0d Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 19:10:21 +0200 Subject: [PATCH 23/36] Remove grub theme download --- arch-setup/install.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index ea5d28fe..8e02f5dc 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -388,13 +388,6 @@ sudo locale-gen # update fonts cache 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 ../../ - echo Setting config bash ~/configs/arch-config/install.sh From c737fd5577faa6766ac9a667436d7457a4fca906 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 19:26:19 +0200 Subject: [PATCH 24/36] Install paru if it is not installed --- arch-setup/install.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index 8e02f5dc..34cdc63f 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -264,15 +264,12 @@ while read package; do done <"$setupdir/packages/winepkgs.txt" echo Installed wine -# install paru-bin with yay, or download paru from github -if [[ $(pacman -Q | grep yay) ]] && [[ ! $(pacman -Q | grep paru) ]]; then - echo "Installing paru" - yay -S paru-bin -elif [[ ! $(pacman -Q | grep yay) ]] && [[ ! $(pacman -Q | grep paru) ]]; then - echo "Installing paru from git" +# install paru-bin +if [[ ! $(pacman -Q | grep paru) ]]; then + echo "Installing paru from the AUR" git clone https://aur.archlinux.org/paru-bin.git cd paru-bin - makepkg -si + yes | LC_ALL=en_US.UTF-8 makepkg -si cd .. fi From cd120b2e6cabc6575e74d689770a20ebff874a4d Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 19:47:40 +0200 Subject: [PATCH 25/36] Main repository location --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 14456b4c..8f931248 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +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. From 7f2978ef250082810ea8901c819b8ad9c2d7abbb Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 20:08:27 +0200 Subject: [PATCH 26/36] more noconfirm --- arch-setup/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index 34cdc63f..22fedc86 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -302,7 +302,7 @@ echo Installing selected programs if [ -f "$setupdir/selectedpkgs.txt" ]; then echo Installing from official repository # 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 # install selected aur packages From 9bfd0f163cbcce7b24dfe98fab8f110351ea7ebb Mon Sep 17 00:00:00 2001 From: RealStickman Date: Mon, 22 May 2023 19:51:45 +0200 Subject: [PATCH 27/36] Move some systemd services to config Enable timer for reflector Move vnstat service to config --- arch-config/scripts/arch-config.sh | 12 +++++++++--- arch-setup/install.sh | 4 ---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/arch-config/scripts/arch-config.sh b/arch-config/scripts/arch-config.sh index 43d42d48..acbfed5d 100755 --- a/arch-config/scripts/arch-config.sh +++ b/arch-config/scripts/arch-config.sh @@ -331,6 +331,9 @@ cat < Date: Mon, 22 May 2023 19:57:33 +0200 Subject: [PATCH 28/36] Set loudness normalization to -24 --- music-normalize/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/music-normalize/main.py b/music-normalize/main.py index c36e3e83..7b81b912 100755 --- a/music-normalize/main.py +++ b/music-normalize/main.py @@ -132,7 +132,7 @@ def convert(inputfile, outputfile, loudness) -> Optional[list[Any]]: " " "-filter:a" " " - "loudnorm=I=-30.0:" + "loudnorm=I=-24.0:" "LRA=7.0:" "measured_I={input_i}:" "measured_LRA={input_lra}:" From 76872f7fef658a855c31602dac402ef488098052 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Mon, 22 May 2023 20:08:11 +0200 Subject: [PATCH 29/36] chmod .fehbg if possible --- .gitignore | 1 + README.md | 5 ++++- arch-config/scripts/arch-config.sh | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..450a1087 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/music-normalize/venv/ diff --git a/README.md b/README.md index 8f931248..af3d50f0 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,11 @@ cd configs/arch-setup ### Config updates +## NixOS + +- [nixos-config](./nixos-config) + ## Other - [easyffmpeg](./easyffmpeg) - [music-normalize](./music-normalize) -- [nixos-config](./nixos-config) diff --git a/arch-config/scripts/arch-config.sh b/arch-config/scripts/arch-config.sh index acbfed5d..72ca15bf 100755 --- a/arch-config/scripts/arch-config.sh +++ b/arch-config/scripts/arch-config.sh @@ -290,7 +290,9 @@ elif [[ "$seltheme" == "space-pink" ]]; then fi # make fehbg executable -chmod +x ~/.fehbg +if [[ -f "$HOME/.fehbg" ]]; then + chmod +x ~/.fehbg +fi #################### ##### Bash Cat ##### From 15f07ee4e957337a512dbb6578122bfa075d444c Mon Sep 17 00:00:00 2001 From: RealStickman Date: Mon, 22 May 2023 20:11:30 +0200 Subject: [PATCH 30/36] Add instructions about how to update the config --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index af3d50f0..6098df82 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,18 @@ cd configs/arch-setup ### Config updates +Either use the included alias + +```sh +upconf +``` + +or run the script directly. + +```sh +~/scripts/arch-config.sh +``` + ## NixOS - [nixos-config](./nixos-config) From 73f8d7268e37a80d557ea626aa4a765fe0887989 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Mon, 22 May 2023 20:13:32 +0200 Subject: [PATCH 31/36] Add kdeconnect to official packages --- arch-setup/packages/officialpkgs.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/arch-setup/packages/officialpkgs.txt b/arch-setup/packages/officialpkgs.txt index 6a450127..d14020e0 100644 --- a/arch-setup/packages/officialpkgs.txt +++ b/arch-setup/packages/officialpkgs.txt @@ -48,6 +48,7 @@ hyphen-de hyphen-en jre-openjdk kcm-wacomtablet +kdeconnect kitty libaacs libbluray From 7822fc15ca9e97334047d20263ee312a5d4e7c01 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Mon, 22 May 2023 20:19:08 +0200 Subject: [PATCH 32/36] if statement around .fehbg --- arch-config/scripts/arch-config.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch-config/scripts/arch-config.sh b/arch-config/scripts/arch-config.sh index 72ca15bf..64a05409 100755 --- a/arch-config/scripts/arch-config.sh +++ b/arch-config/scripts/arch-config.sh @@ -473,7 +473,9 @@ if [[ -f "$HOME/.Xresources" ]]; then fi # execute feh -"$HOME/.fehbg" +if [[ -f "$HOME/.fehbg" ]]; then + "$HOME/.fehbg" +fi if ps aux | grep -E "\si3(\s|$)" &>/dev/null; then i3-msg restart 1>/dev/null From 6a0dfeba25d422eb408e8f189830c51fb067ed50 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Mon, 22 May 2023 20:20:17 +0200 Subject: [PATCH 33/36] Keep sudo active during script --- arch-config/scripts/arch-config.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch-config/scripts/arch-config.sh b/arch-config/scripts/arch-config.sh index 64a05409..23a287cb 100755 --- a/arch-config/scripts/arch-config.sh +++ b/arch-config/scripts/arch-config.sh @@ -1,11 +1,22 @@ #!/usr/bin/env bash 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 if [ "$EUID" -ne 0 ]; then sudo -v fi +# keep sudo active in background +func_dont_timeout & + cat < Date: Mon, 22 May 2023 21:16:01 +0200 Subject: [PATCH 34/36] Make updating firefox config optional --- arch-config/scripts/arch-config.sh | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/arch-config/scripts/arch-config.sh b/arch-config/scripts/arch-config.sh index 23a287cb..b6948134 100755 --- a/arch-config/scripts/arch-config.sh +++ b/arch-config/scripts/arch-config.sh @@ -76,14 +76,19 @@ fi #### Arguments #### #################### +copy_firefox=0 + # handle arguments if [[ "$#" -eq 1 ]]; then # -t/--theme to change theme if [[ "$1" == "-t" || "$1" == "--theme" ]]; then func_seltheme + elif [[ "$1" == "-f" || "$1" == "--firefox" ]]; then + copy_firefox=1 elif [[ "$1" == "-h" || "$1" == "--help" ]]; then - echo "-h, --help Show help menu" - echo "-t, --theme Show theme selection screen" + echo "-h, --help Show help menu" + echo "-t, --theme Show theme selection screen" + echo "-f, --firefox Update firefox config" fi elif [[ "$#" -gt 1 ]]; then echo "Too many arguments" @@ -229,17 +234,22 @@ cp -r ~/configs/arch-config/.local/ ~/ #cp -r ~/config/.elvish ~/ cp -r ~/configs/arch-config/.doom.d ~/ cp -r ~/configs/arch-config/.ssh ~/ -if [[ -d ~/.mozilla/firefox ]]; then - # NOTE check if firefox default-release directory exists. 1 is good, 0 is bad - firefoxdir=$(find ~/.mozilla/firefox/ -name \*.default-release | wc -l) - if [[ $firefoxdir -eq 1 ]]; then - cp -r ~/config/.mozilla/firefox/default-release/* ~/.mozilla/firefox/*.default-release/ + +# 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 + firefoxdir=$(find ~/.mozilla/firefox/ -name \*.default-release | wc -l) + if [[ $firefoxdir -eq 1 ]]; then + cp -r ~/config/.mozilla/firefox/default-release/* ~/.mozilla/firefox/*.default-release/ + else + echo "Please launch firefox and then update the config again" + fi else echo "Please launch firefox and then update the config again" fi -else - echo "Please launch firefox and then update the config again" fi + echo Copied folders #copy single files From 2fd089165540e1eea3d1e76414535dbff083757b Mon Sep 17 00:00:00 2001 From: RealStickman Date: Mon, 22 May 2023 21:18:20 +0200 Subject: [PATCH 35/36] Fix firefox config path --- arch-config/scripts/arch-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch-config/scripts/arch-config.sh b/arch-config/scripts/arch-config.sh index b6948134..a6d5d43f 100755 --- a/arch-config/scripts/arch-config.sh +++ b/arch-config/scripts/arch-config.sh @@ -241,7 +241,7 @@ if [[ copy_firefox -eq 1 ]]; then # NOTE check if firefox default-release directory exists. 1 is good, 0 is bad firefoxdir=$(find ~/.mozilla/firefox/ -name \*.default-release | wc -l) 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 echo "Please launch firefox and then update the config again" fi From 4f67115b254382d74044eb53f6db0a8539cd5e30 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Mon, 22 May 2023 21:20:33 +0200 Subject: [PATCH 36/36] Add exit after help menu --- arch-config/scripts/arch-config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/arch-config/scripts/arch-config.sh b/arch-config/scripts/arch-config.sh index a6d5d43f..39b8258c 100755 --- a/arch-config/scripts/arch-config.sh +++ b/arch-config/scripts/arch-config.sh @@ -89,6 +89,7 @@ if [[ "$#" -eq 1 ]]; then echo "-h, --help Show help menu" echo "-t, --theme Show theme selection screen" echo "-f, --firefox Update firefox config" + exit 0 fi elif [[ "$#" -gt 1 ]]; then echo "Too many arguments"