summaryrefslogtreecommitdiff
path: root/archsetup
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-05-26 14:45:15 -0500
committerCraig Jennings <c@cjennings.net>2025-05-26 14:45:15 -0500
commitbe8324bd73b0fd6c47c4e3be648983e69cf430ad (patch)
tree0f0e0b649c0f1d9ef80fa7afd5fc82855ca9d9f3 /archsetup
parent14f7a1f4458abaf802a1a2b28a19fc7f107807ab (diff)
integrated redshift into archsetup (blue light filter)
Diffstat (limited to 'archsetup')
-rwxr-xr-xarchsetup168
1 files changed, 94 insertions, 74 deletions
diff --git a/archsetup b/archsetup
index 67644eb..12cf33f 100755
--- a/archsetup
+++ b/archsetup
@@ -190,8 +190,8 @@ prerequisites() {
display "subtitle" "Required Software"
for software in linux-firmware base-devel ca-certificates \
- coreutils curl git go ntp openssh python \
- stow tar vi zsh; do
+ coreutils curl git go ntp openssh python \
+ stow tar vi zsh; do
pacman_install "$software"
done
@@ -293,11 +293,11 @@ user_customizations() {
action="linking dotfiles into place" && display "task" "$action"
(cd $dotfiles_dir && stow --target=/home/$username --no-folding --adopt system \
- >> "$logfile" 2>&1 ) || error "error" "$action" "$?"
+ >> "$logfile" 2>&1 ) || error "error" "$action" "$?"
action="restoring dotfile versions" && display "task" "$action"
(cd "$dotfiles_dir" && git restore . \
- >> "$logfile" 2>&1 ) || error "error" "$action" "$?"
+ >> "$logfile" 2>&1 ) || error "error" "$action" "$?"
action="creating common directories" && display "task" "$action"
# Create default directories and grant permissions
@@ -391,11 +391,11 @@ essential_services() {
action="configuring ufw to deny by default" && display "task" "$action"
ufw default deny incoming >> "$logfile" 2>&1 || error "error" "$action"
- # note on the numbered protocols
- # "80,443,8080/tcp" ## http and https traffic
- # "9040,9050,9051,9053,9119/tcp" ## tor network
- # "55353/udp" ## DNS
- # "22000/tcp" "22000/udp" "21027/udp" ## syncthing
+ # note on the numbered protocols
+ # "80,443,8080/tcp" ## http and https traffic
+ # "9040,9050,9051,9053,9119/tcp" ## tor network
+ # "55353/udp" ## DNS
+ # "22000/tcp" "22000/udp" "21027/udp" ## syncthing
for protocol in \
"80,443,8080/tcp" \
@@ -423,9 +423,9 @@ essential_services() {
# Service Discovery
- display "subtitle" "Network Service Discovery"
- pacman_install nss-mdns # GNU Name Service Switch host name resolution
- pacman_install avahi # service discovery on a local network using mdns
+ display "subtitle" "Network Service Discovery"
+ pacman_install nss-mdns # GNU Name Service Switch host name resolution
+ pacman_install avahi # service discovery on a local network using mdns
action="configuring avahi" && display "task" "$action"
systemctl disable systemd-resolved.service >> "$logfile" 2>&1 || error "error" "$action" "$?"
@@ -506,19 +506,19 @@ dwm() {
desktop_environment() {
display "title" "Desktop Environment"
- # Fonts
+ # Fonts
- action="Fonts" && display "subtitle" "$action"
- pacman_install noto-fonts-emoji
- pacman_install ttf-firacode-nerd
- pacman_install ttf-hack-nerd
- pacman_install ttf-jetbrains-mono-nerd
- pacman_install ttf-meslo-nerd
- pacman_install ttf-nerd-fonts-symbols-mono
- aur_install ttf-all-the-icons
- aur_install ttf-lato
- aur_install ttf-ms-fonts
- aur_install ttf-ubraille
+ action="Fonts" && display "subtitle" "$action"
+ pacman_install noto-fonts-emoji
+ pacman_install ttf-firacode-nerd
+ pacman_install ttf-hack-nerd
+ pacman_install ttf-jetbrains-mono-nerd
+ pacman_install ttf-meslo-nerd
+ pacman_install ttf-nerd-fonts-symbols-mono
+ aur_install ttf-all-the-icons
+ aur_install ttf-lato
+ aur_install ttf-ms-fonts
+ aur_install ttf-ubraille
# System Utilities
@@ -529,8 +529,6 @@ desktop_environment() {
pacman_install exfat-utils
pacman_install lshw
pacman_install ntfs-3g
- pacman_install redshift
- pacman_install libappindicator-gtk3 # required by some applets
pacman_install sshfs
pacman_install testdisk
pacman_install tickrs
@@ -553,7 +551,7 @@ desktop_environment() {
pacman_install gnupg
pacman_install polkit
pacman_install gnome-keyring
- pacman_install seahorse
+ pacman_install seahorse
pacman_install pass
# ensure correct permissions on .gpg directory
@@ -614,11 +612,11 @@ desktop_environment() {
# Help And Documentation
- action="Help and Documentation" && display "subtitle" "$action"
- pacman_install man
- pacman_install arch-wiki-docs
- pacman_install tealdeer
- aur_install cht.sh-git
+ action="Help and Documentation" && display "subtitle" "$action"
+ pacman_install man
+ pacman_install arch-wiki-docs
+ pacman_install tealdeer
+ aur_install cht.sh-git
# Sync Services
@@ -636,11 +634,11 @@ desktop_environment() {
pacman_install $software
done;
- aur_install caffeine-ng
- aur_install flameshot
- aur_install python-pulsectl
- aur_install xautolock
- aur_install xcolor
+ aur_install caffeine-ng
+ aur_install flameshot
+ aur_install python-pulsectl
+ aur_install xautolock
+ aur_install xcolor
# Theme and Cursor
@@ -655,26 +653,48 @@ desktop_environment() {
aur_install $software
done;
+ # Blue Light Filter
+
+ action="Blue Light Filter" && display "subtitle" "$action"
+ pacman_install redshift
+ pacman_install libappindicator-gtk3 # required by some applets
+ action="configuring blue light filter" && display "task" "$action"
+ mkdir -p /home/$username/.config/systemd/user/ >> "$logfile" 2>&1 || error "error" "$action" "$?"
+ cat << EOF > /home/$username/.config/systemd/user/geoclue-agent.service
+[Unit]
+Description=redshift needs to get a (geo)clue
+
+[Service]
+ExecStart=/usr/lib/geoclue-2.0/demos/agent
+
+[Install]
+WantedBy=default.target
+EOF
+
+ # clean up permissions and enable user service
+ chown -R $username: /home/$username/.config/systemd/ >> "$logfile" 2>&1 || error "error" "$action" "$?"
+ systemctl enable geoclue-agent@$username.service >> "$logfile" 2>&1 || error "error" "$action" "$?"
+
# Browsers
action="Browsers" && display "subtitle" "$action"
pacman_install firefox
- ## TESTING IF NEEDED aur_install librewolf-bin
+ ## TESTING IF NEEDED aur_install librewolf-bin
aur_install tor-browser-bin
aur_install google-chrome
# Install Printing
action="Print System" && display "subtitle" "$action"
- pacman_install cups # the printing service
- pacman_install cups-pdf # allows printing to pdf
- pacman_install foomatic-db-engine # generates printer drivers, queues, and jobs
- pacman_install foomatic-db-ppds # printer driver descriptions
- pacman_install foomatic-db-nonfree-ppds # non-free printer driver descriptions
- pacman_install gutenprint # printer driver engine for older computers
- pacman_install foomatic-db-gutenprint-ppds # gutenprint prebuilt ppd files
-
- action="enabling printing service to launch at boot" && display "task" "$action"
+ pacman_install cups # the printing service
+ pacman_install cups-pdf # allows printing to pdf
+ pacman_install foomatic-db-engine # generates printer drivers, queues, and jobs
+ pacman_install foomatic-db-ppds # printer driver descriptions
+ pacman_install foomatic-db-nonfree-ppds # non-free printer driver descriptions
+ pacman_install gutenprint # printer driver engine for older computers
+ pacman_install foomatic-db-gutenprint-ppds # gutenprint prebuilt ppd files
+
+ action="enabling printing service to launch at boot" && display "task" "$action"
(systemctl enable cups.service >> "$logfile" 2>&1) || error "error" "$action" "$?"
}
@@ -704,8 +724,8 @@ developer_workstation () {
pacman_install rust # Rust programming language
# Python
- pacman_install pyright # Python language server
- pacman_install pyenv # Python environment manager
+ pacman_install pyright # Python language server
+ pacman_install pyenv # Python environment manager
# Shell
pacman_install shellcheck # Shell script linter
@@ -718,11 +738,11 @@ developer_workstation () {
pacman_install staticcheck # Go programming language linter
# Typescript
- pacman_install jq # JSON processor
- pacman_install typescript # Typescript programming language
- pacman_install nodejs # Node-js JavaScript runtime environment
- pacman_install npm # Node-js package manager
- aur_install nvm # Node-js version manager
+ pacman_install jq # JSON processor
+ pacman_install typescript # Typescript programming language
+ pacman_install nodejs # Node-js JavaScript runtime environment
+ pacman_install npm # Node-js package manager
+ aur_install nvm # Node-js version manager
# HTML
pacman_install tidy # HTML formatter
@@ -792,23 +812,23 @@ developer_workstation () {
pacman_install gnome-boxes
# virtualbox related
- # ensure headers exist before installing virtualbox*dkms
- pacman_install linux-headers
- pacman_install linux-lts-headers
+ # ensure headers exist before installing virtualbox*dkms
+ pacman_install linux-headers
+ pacman_install linux-lts-headers
- pacman_install virtualbox
- pacman_install virtualbox-guest-iso
- pacman_install virtualbox-host-dkms
+ pacman_install virtualbox
+ pacman_install virtualbox-guest-iso
+ pacman_install virtualbox-host-dkms
# docker
- action="adding user to vboxusers group" && display "task" "$action"
- (gpasswd -a $username vboxusers >> "$logfile" 2>&1) || error "error" "$action" "$?"
- pacman_install docker
- pacman_install docker-compose
- action="adding user to docker group" && display "task" "$action"
- (gpasswd -a $username docker >> "$logfile" 2>&1) || error "error" "$action" "$?"
- action="enabling docker service to launch on boot" && display "task" "$action"
- systemctl enable docker.service >> "$logfile" 2>&1 || error "error" "$action" "$?"
+ action="adding user to vboxusers group" && display "task" "$action"
+ (gpasswd -a $username vboxusers >> "$logfile" 2>&1) || error "error" "$action" "$?"
+ pacman_install docker
+ pacman_install docker-compose
+ action="adding user to docker group" && display "task" "$action"
+ (gpasswd -a $username docker >> "$logfile" 2>&1) || error "error" "$action" "$?"
+ action="enabling docker service to launch on boot" && display "task" "$action"
+ systemctl enable docker.service >> "$logfile" 2>&1 || error "error" "$action" "$?"
}
### Supplemental Software
@@ -931,11 +951,11 @@ boot_ux() {
# action="removing hostname from login prompt" && display "task" "$action"
# sed -i "s/--noclear/--nohostname --noclear/g" /usr/lib/systemd/system/getty@.service \
- # || error "error" "$action" "$?"
+ # || error "error" "$action" "$?"
# sed -i "s/--noclear/--nohostname --noclear/g" /usr/lib/systemd/system/container-getty@.service \
- # || error "error" "$action" "$?"
+ # || error "error" "$action" "$?"
# sed -i "s/--noclear/--nohostname --noclear/g" /usr/lib/systemd/system/console-getty.service \
- # || error "error" "$action" "$?"
+ # || error "error" "$action" "$?"
action="silencing the unneeded and chatty watchdog module" && display "task" "$action"
echo "blacklist iTCO_wdt" >/etc/modprobe.d/nowatchdog.conf || error "error" "$action" "$?"
@@ -957,10 +977,10 @@ boot_ux() {
action="installing login manager and dependencies" && display "task" "$action"
pacman_install gdm
(systemctl enable gdm.service >> "$logfile" 2>&1) || error "error" "$action" "$?"
-
+
action="creating DWM entry for login manager" && display "task" "$action"
- # Create DWM Entry for GDM
- cat << EOF > /usr/share/xsessions/dwm.desktop
+ # Create DWM Entry for GDM
+ cat << EOF > /usr/share/xsessions/dwm.desktop
[Desktop Entry]
Encoding=UTF-8
Name=dwm