dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 87d69da89ac444c31a3c0f81d8741566dd615e74
parent 1415df19eb9ea1695c8346e0be6fde166a1e05e9
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri,  7 Dec 2018 19:55:47 +0100

Change scripts for idkfa

Diffstat:
Dinit/00_arch.sh | 171-------------------------------------------------------------------------------
Mlinks/.Xresources | 3++-
Mlinks/.i3/config | 11++++++-----
Mlinks/.i3/status | 10+++++-----
Mlinks/.msmtprc | 2+-
Mlinks/.xinitrc | 4++--
Mlinks/bin/wallpaper.sh | 2+-
7 files changed, 17 insertions(+), 186 deletions(-)

diff --git a/init/00_arch.sh b/init/00_arch.sh @@ -1,171 +0,0 @@ -#!/usr/bin/env bash - -# Derived from @LukeSmithxyz's LARBS script -# License: GPLv3+ - -set -e - -aurhelper=yay -progsfile="progs/arch.csv" - -function info_msg { - echo -e "$(tput setaf 4)Info:$(tput sgr0) $*" -} -function warn_msg { - (>&2 echo -e "$(tput setaf 3)Warning:$(tput sgr0) $*") -} -function error_msg { - (>&2 echo -e "$(tput setaf 1)Error:$(tput sgr0) $*") -} - -if [ "$(whoami)" != "root" ]; then - error "00_arch.sh must be run as root. Bye." - exit -fi - -function prepare { - mount -o remount,size=2G /run/archiso/cowspace - pacman -Syuu --noconfirm --needed dialog -} - -function confirm { - dialog --title "Start install" --yesno "Configure Arch Linux?" \ - 6 60 || { clear; exit; } -} - -function refreshkeys { \ - info --infobox "Refreshing Arch Keyring" - pacman --noconfirm -Sy archlinux-keyring &>/dev/null -} - -function newperms { # Set special sudoers settings for install (or after). - sed -i "/# 00_arch.sh/d" /etc/sudoers - echo -e "$* # 00_arch.sh" >> /etc/sudoers -} - -function getuserandpass { - name=$(dialog --inputbox "Please enter a name for the user account." \ - 10 60 3>&1 1>&2 2>&3 3>&1) || exit - namere="^[a-z_][a-z0-9_-]*$" - while ! [[ "${name}" =~ ${namere} ]]; do - name=$(dialog --no-cancel \ - --inputbox "Username not valid. Give a username beginning \ - with a letter, with only lowercase letters, - or _." \ - 10 60 3>&1 1>&2 2>&3 3>&1) - done - pass1=$(dialog --no-cancel --passwordbox \ - "Enter a password for that user." 10 60 3>&1 1>&2 2>&3 3>&1) - pass2=$(dialog --no-cancel --passwordbox \ - "Retype password." 10 60 3>&1 1>&2 2>&3 3>&1) - while ! [[ "${pass1}" == "${pass2}" ]]; do - unset pass2 - pass1=$(dialog --no-cancel --passwordbox \ - "Passwords do not match.\\n\\nEnter password again." \ - 10 60 3>&1 1>&2 2>&3 3>&1) - pass2=$(dialog --no-cancel --passwordbox \ - "Retype password." 10 60 3>&1 1>&2 2>&3 3>&1) - done -} - -function adduserandpass { - info "Adding user \"$name\"" - useradd -m -g wheel -s /bin/bash "$name" &>/dev/null || - usermod -a -G wheel "$name" && \ - mkdir -p /home/"$name" && chown "$name":wheel /home/"$name" - echo "$name:$pass1" | chpasswd - unset pass1 pass2 -} - -function systembeepoff { - info "Disable pcspeaker beep sound" - rmmod pcspkr - echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf -} - -function resetpulse { - info "Reseting Pulseaudio" - killall pulseaudio - sudo -n "$name" pulseaudio --start -} - -function serviceinit { - for service in "$@"; do - info "Enabling \"$service\"..." - systemctl enable "$service" - systemctl start "$service" - done -} - -function manualinstall { # Installs $1 manually if not installed. Used only for AUR helper here. - [[ -f /usr/bin/$1 ]] || ( - info "Manually installing \"$1\", an AUR helper..." - cd /tmp - rm -rf /tmp/"$1"* - curl -sO https://aur.archlinux.org/cgit/aur.git/snapshot/"$1".tar.gz && - sudo -u "$name" tar -xvf "$1".tar.gz &>/dev/null && - cd "$1" && sudo -u "$name" makepkg --noconfirm -si &>/dev/null && - cd /tmp) -} - -gitmakeinstall() { - dir=$(mktemp -d) - info "Installing \`$(basename "$1")\` ($n of $total) via \`git\` and \ - \`make\`. $(basename "$1") $2" - git clone --depth 1 "$1" "$dir" &>/dev/null - cd "$dir" || exit - make &>/dev/null - make install &>/dev/null - cd /tmp -} - -function maininstall() { # Installs all needed programs from main repo. - info "Installing \`$1\` ($n of $total). $1 $2" - pacman --noconfirm --needed -S "$1" &>/dev/null -} - -function aurinstall { - info "Installing \`$1\` ($n of $total) from the AUR. $1 $2" - grep "^$1$" <<< "$aurinstalled" && return - sudo -u "$name" "$aurhelper" -S --noconfirm "$1" &>/dev/null -} - -function installationloop { - ([ -f "$progsfile" ] && cp "$progsfile" /tmp/progs.csv) || curl -Ls "$progsfile" > /tmp/progs.csv - total=$(wc -l < /tmp/progs.csv) - aurinstalled=$(pacman -Qm | awk '{print $1}') - while IFS=, read -r tag program comment; do - n=$((n+1)) - case "$tag" in - "") maininstall "$program" "$comment" ;; - "A") aurinstall "$program" "$comment" ;; - "G") gitmakeinstall "$program" "$comment" ;; - esac -done < /tmp/progs.csv -} - - - -prepare -confirm -getuserandpass -adduserandpass -refreshkeys - -pacman --noconfirm --needed -S base-devel &>/dev/null - -manualinstall "$aurhelper" -installationloop - -serviceinit NetworkManager cronie - -# This line, overwriting the `newperms` command above will allow the user to run -# serveral important commands, `shutdown`, `reboot`, updating, etc. without a -# password. -newperms "%wheel ALL=(ALL) ALL\\n%wheel ALL=(ALL) NOPASSWD: /usr/bin/shutdown,/usr/bin/reboot,/usr/bin/systemctl suspend,/usr/bin/wifi-menu,/usr/bin/mount,/usr/bin/umount,/usr/bin/pacman -Syu,/usr/bin/pacman -Syyu,/usr/bin/packer -Syu,/usr/bin/packer -Syyu,/usr/bin/systemctl restart NetworkManager,/usr/bin/rc-service NetworkManager restart,/usr/bin/pacman -Syyu --noconfirm,/usr/bin/loadkeys,/usr/bin/yay,/usr/bin/pacman -Syyuw --noconfirm" - -# Make pacman and yay colorful because why not. -sed -i "s/^#Color/Color/g" /etc/pacman.conf - -systembeepoff - -info "Arch install script complete" diff --git a/links/.Xresources b/links/.Xresources @@ -13,7 +13,8 @@ Xcursor.size: 22 !TomorrowNight *.foreground: #c5c8c6 -*.background: #1d1f21 +!*.background: #1d1f21 +*.background: #000000 /* black */ *color0: #434944 diff --git a/links/.i3/config b/links/.i3/config @@ -10,12 +10,12 @@ # Please see http://i3wm.org/docs/userguide.html for a complete reference! # Super as modifier -#set $mod Mod4 -#set $alt Mod1 +set $mod Mod4 +set $alt Mod1 # Alt as modifier -set $mod Mod1 -set $alt Control +#set $mod Mod1 +#set $alt Control # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. ISO 10646 = Unicode @@ -300,5 +300,6 @@ exec --no-startup-id nm-applet #exec --no-startup-id i3-msg 'workspace 1; exec urxvt -e tmuxinator utility; exec tor-browser.sh' #exec --no-startup-id i3-msg 'workspace 1; exec urxvt -e tmuxinator utility; exec torbrowser-launcher' #exec --no-startup-id i3-msg 'workspace 1; exec bash ~/bin/export_x_info.sh; exec mpd; exec xrdb ~/.Xresources' -exec --no-startup-id i3-msg 'workspace 2; exec firefox; layout tabbed; exec tor-browser.sh' +#exec --no-startup-id i3-msg 'workspace 2; exec firefox; layout tabbed; exec tor-browser.sh' +exec --no-startup-id i3-msg 'workspace 2; exec firefox; layout tabbed' exec --no-startup-id i3-msg 'workspace 1; exec urxvt -e tmux-utility.sh' diff --git a/links/.i3/status b/links/.i3/status @@ -9,22 +9,22 @@ general { #order += "ipv6" #order += "disk /" -order += "run_watch DHCP" +#order += "run_watch DHCP" #order += "run_watch VPN" -order += "wireless wlan1" -order += "ethernet eth0" +order += "wireless wlp3s0" +order += "ethernet enp0s25" order += "volume master" order += "battery 0" order += "load" #order += "cpu_usage" order += "time" -wireless wlan1 { +wireless wlp3s0 { format_up = "W: (%quality at %essid) %ip" format_down = "W: down" } -ethernet eth0 { +ethernet enp0s25 { # if you use %speed, i3status requires root privileges format_up = "E: %ip (%speed)" format_down = "E: down" diff --git a/links/.msmtprc b/links/.msmtprc @@ -58,7 +58,7 @@ tls_trust_file ~/.mutt/ca-certificates.crt #tls on #tls_certcheck on -#tls_trust_file ~/.mutt/ca-certificates.crt +tls_trust_file ~/.mutt/ca-certificates.crt #tls_starttls off account princeton diff --git a/links/.xinitrc b/links/.xinitrc @@ -81,7 +81,7 @@ export GPG_AGENT_INFO SSH_AUTH_SOCK eval $(ssh-agent) # Enable tap-to-click on touchpad -synclient TapButton1=1 TapButton2=2 TapButton3=3 +#synclient TapButton1=1 TapButton2=2 TapButton3=3 # Automatically suspend system after 20 mins of inactivity #xautolock -time 20 -locker "sudo pm-suspend" & @@ -117,7 +117,7 @@ fi #/usr/bin/xscreensaver -no-splash & # Typing breaks (optionally add +lock) -xwrits breaktime=5:00 typetime=55:00 +clock +breakclock +mouse & +#xwrits breaktime=5:00 typetime=55:00 +clock +breakclock +mouse & xset dpms 300 600 900 # Automatic display configuration script diff --git a/links/bin/wallpaper.sh b/links/bin/wallpaper.sh @@ -2,4 +2,4 @@ #hsetroot -fill ~/wallpapers/fall.jpg # single screen #hsetroot -full ~/wallpapers/hackingtheloop_1920.jpg # single screen #hsetroot -fill ~/wallpapers/polygon-art-17498.jpg -hsetroot -fill ~/photos/wallpapers/current_wallpapers/overdeepenings-Edit-Edit.jpg +#hsetroot -fill ~/photos/wallpapers/current_wallpapers/overdeepenings-Edit-Edit.jpg