dotfiles

regexghost dotfiles and scripts
git clone https://git.regexghost.com/dotfiles.git
Log | Files | Refs | README

init.sh (2456B)


      1 #!/bin/sh
      2 
      3 # Exit on fail
      4 set -e
      5 
      6 # Have to load all the variables
      7 . dotfiles/.profile
      8 
      9 [ -d "$XDG_CACHE_HOME" ] || mkdir -p "$XDG_CACHE_HOME"
     10 [ -d "$XDG_DATA_HOME" ] || mkdir -p "$XDG_DATA_HOME"
     11 [ -d "$XDG_CONFIG_HOME" ] || mkdir -p "$XDG_CONFIG_HOME"
     12 [ -d "$XDG_STATE_HOME" ] || mkdir -p "$XDG_STATE_HOME"
     13 
     14 # Install programs
     15 if uname -a | grep -q Debian; then
     16 	./apt-install.sh
     17 fi
     18 
     19 # Make substitution program before running setup.sh
     20 cd helpers/subgo; make full; cd ../..
     21 
     22 ./setup.sh make dotfiles
     23 
     24 # Install dotfile scripts
     25 cd panel-scripts/; make; cd ../
     26 cd terminal-scripts/; make; cd ../
     27 cd other/; make; cd ../
     28 cd wm-scripts/; make; cd ../
     29 cd helpers/subgo/; make full; cd ../../
     30 
     31 # Compile programs
     32 ./otherPrograms.sh mine
     33 ./otherPrograms.sh notmine
     34 
     35 # Shell stuff
     36 if ! grep -q "/usr/local/bin/oksh" /etc/shells; then
     37 	cp /etc/shells ~/Downloads/shells_backup
     38 	echo "/usr/local/bin/oksh" | sudo tee -a /etc/shells
     39 fi
     40 chsh
     41 
     42 # Random setup
     43 mkdir ~/.cache/panel_volume
     44 echo "50" > ~/.cache/panel_volume/volume
     45 echo "no" > ~/.cache/panel_volume/muted
     46 echo "default" > ~/.cache/panel_volume/sink
     47 mkdir -p ~/.config/aspell/
     48 mkdir -p ~/.local/share/aspell/
     49 sudo systemctl enable --now bluetooth
     50 systemctl --user restart pulseaudio
     51 
     52 # Make dirs
     53 mkdir -p ~/Videos
     54 mkdir -p ~/Videos/Podcasts
     55 mkdir -p ~/Videos/YouTube
     56 mkdir -p ~/Videos/YouTube/Videos
     57 mkdir -p ~/Videos/YouTube/Shorts
     58 mkdir -p ~/Videos/YouTube/toDownload
     59 touch ~/Videos/Podcasts/toDownload.txt
     60 mkdir -p ~/.local/state/mpd
     61 mkdir -p ~/.cache/mpd
     62 
     63 # Python3 venv
     64 cd ~/.local/share/regexghost
     65 python3 -m venv .venv
     66 ~/.local/share/regexghost/.venv/bin/pip install music-tag pillow requests beautifulsoup4 howlongtobeatpy
     67 
     68 # nnn preview
     69 mkdir -p ~/.config/nnn/plugins
     70 curl "https://raw.githubusercontent.com/jarun/nnn/refs/heads/master/plugins/preview-tui" > ~/.config/nnn/plugins/preview-tui
     71 chmod +x ~/.config/nnn/plugins/preview-tui
     72 
     73 # Music icon
     74 sed 's/currentColor/white/g' /usr/share/icons/Papirus/24x24/symbolic/emblems/emblem-music-symbolic.svg > /tmp/temp.svg
     75 magick -background none -fill white -density 400 /tmp/temp.svg -resize 100x100 ~/.local/share/regexghost/panel/emblem-music-symbolic.png
     76 
     77 # For old intel systems <= 4th gen, stops an mpv error
     78 sudo apt remove intel-media-va-driver
     79 
     80 # Put chromium data in ~/.local/share
     81 [ -d ~/.config/chromium ] && mv ~/.config/chromium ~/.local/share/chromium || mkdir ~/.local/share/chromium
     82 ln -sf ~/.local/share/chromium ~/.config/chromium