commit d2db33988f38b29de003c34f502b05ff15ba52bf
parent 0512d7e6ee62a8e121b6721be7c58d6f4a1c40b0
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date:   Wed, 12 May 2021 21:30:45 +0200

Change config for Arch

Diffstat:
M.config/alacritty/alacritty.yml | 4++--
A.config/zsh/.zshenv | 35+++++++++++++++++++++++++++++++++++
M.config/zsh/aliases | 26+++++++++++++++++++-------
R.local/bin/passmenu -> .local/bin/altpassmenu | 0
M.local/bin/dotfiles-check | 2+-
D.local/bin/dwmblocks/dwmb-apt-updates | 5-----
M.local/bin/dwmblocks/dwmb-disk | 2+-
M.local/bin/session-dmenu | 2+-
D.profile | 34----------------------------------
A.zshenv | 2++
MREADME.md | 47+++++++++++++++++++++++++++++++++++++++++++----
11 files changed, 104 insertions(+), 55 deletions(-)

diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml @@ -3,14 +3,14 @@ # Any items in the `env` entry below will be added as # environment variables. Some entries may override variables # set by alacritty itself. -#env: +env: # TERM variable # # This value is used to set the `$TERM` environment variable for # each instance of Alacritty. If it is not present, alacritty will # check the local terminfo database and use `alacritty` if it is # available, otherwise `xterm-256color` is used. - #TERM: alacritty + TERM: xterm-256color window: # Window dimensions (changes require restart) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv @@ -0,0 +1,35 @@ +# vim: filetype=zsh + +# Local bin to path +[ -d "$HOME/.local/bin" ] && \ + export PATH="$PATH:$(du "$HOME/.local/bin/" | cut -f2 | sed 's/\/$//g' | paste -sd ':')" + +# XDG dirs +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_CACHE_HOME="$HOME/.cache" + +# XDG paths +export R_LIBS_USER="$XDG_DATA_HOME/R" +export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store" +export ATOM_HOME="$XDG_DATA_HOME/atom" +export GOPATH="$XDG_DATA_HOME/go" +export ZDOTDIR="$XDG_CONFIG_HOME/zsh" +export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc" +export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME/jupyter" +export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc +export ICEAUTHORITY="$XDG_CACHE_HOME/ICEauthority" +export RXVT_SOCKET="$XDG_RUNTIME_DIR/urxvtd" +export LESSHISTFILE="-" +export XINITRC="$XDG_CONFIG_HOME/xinitrc" + +# Environment variables +export VISUAL="nvim" +export EDITOR="nvim" +export PAGER="less" +export TERMINAL="alacritty" +export SUDO_ASKPASS="$HOME/.local/bin/sudoaskpass-dmenu" +export GPG_TTY="$(tty)" + +# Go bin to path +[ -d "$GOPATH/bin" ] && export PATH="$PATH:$GOPATH/bin" diff --git a/.config/zsh/aliases b/.config/zsh/aliases @@ -19,6 +19,7 @@ alias tmux="TERM=screen-256color tmux" # shortcuts alias v="nvim" alias vim="nvim" +alias vimdiff="nvim -d" alias g="git" alias ..="cd .." alias ...="cd ../.." @@ -29,9 +30,10 @@ alias vw="cd $HOME/Documents/wiki && vim index.md" alias bvw="firefox $HOME/Documents/wiki/build/html/index.html" alias c="git --git-dir=$HOME/.local/share/dotfiles --work-tree=$HOME" alias cv="GIT_DIR=$HOME/.local/share/dotfiles GIT_WORK_TREE=$HOME nvim -c Git -c only" -alias up="sudo apt update && sudo apt -y upgrade; pkill -RTMIN+4 dwmblocks" -# alias up="sudo pacman -Syyu --noconfirm" -alias ca="ncal -b -M -B1 -A1" +# alias up="sudo apt update && sudo apt -y upgrade; pkill -RTMIN+4 dwmblocks" +alias up="sudo pacman -Syu && yes | sudo pacman -Scc; pkill -RTMIN+4 dwmblocks" +alias autoremove="sudo pacman -Qtdq | sudo pacman -Rns -; yes | sudo pacman -Scc" +alias ca="cal -m -3" # frequent files and directories alias cfa="$EDITOR $XDG_CONFIG_HOME/zsh/aliases" @@ -41,6 +43,7 @@ alias cfv="$EDITOR $XDG_CONFIG_HOME/nvim/init.vim" alias cfx="$EDITOR $XDG_CONFIG_HOME/Xresources" alias cfz="$EDITOR $XDG_CONFIG_HOME/zsh/.zshrc" alias db="cd $HOME/.local/bin && ls" +alias dbanc="cd /run/media/oscar/banc && ls" alias dc="cd $HOME/Documents && ls" alias dg="cd $HOME/Git && ls" alias ds="cd $HOME/.local/src && ls" @@ -76,8 +79,17 @@ restart-wifi-daemon() { done } -# Backup to external HD -alias backup_all='rsync -loptruzvP --delete --exclude "/.*" "$HOME/" "/media/$USER/OSCAR/.backup_$(hostname)/"' +mount-banc() { + sudo mkdir -p /run/media/oscar/banc || return + sudo chown oscar:oscar /run/media/oscar/banc + sshfs maroon:/media/banc /run/media/oscar/banc + echo "ls /run/media/oscar" + ls /run/media/oscar +} -# Backup the contents of the USB -alias backup_usb='rsync -gloptruzvP --delete --exclude "/Varis/copia-gris.hc" --exclude "/Varis/copia-gris-git.hc" --exclude "/.Trash-1000" --exclude "/.Trashes" --exclude "/.Spotlight-V100" "/media/$USER/Oscar/" "$HOME/Documents/Backups/USB/"' +umount-banc() { + sudo umount /run/media/oscar/banc + sudo rmdir /run/media/oscar/banc + echo "ls /run/media/oscar" + ls /run/media/oscar +} diff --git a/.local/bin/passmenu b/.local/bin/altpassmenu diff --git a/.local/bin/dotfiles-check b/.local/bin/dotfiles-check @@ -4,7 +4,7 @@ ndf="" for f in $(ls -A "$HOME" | grep "^\."); do case $f in - .cache|.config|.gnupg|.local|.mozilla|.pki|.ssh|.profile|.thunderbird) continue ;; + .cache|.config|.gnupg|.local|.mozilla|.pki|.ssh|.zshenv|.thunderbird) continue ;; *) [ -z "$ndf" ] && ndf="$f" || ndf="$ndf, $f" ;; esac done diff --git a/.local/bin/dwmblocks/dwmb-apt-updates b/.local/bin/dwmblocks/dwmb-apt-updates @@ -1,5 +0,0 @@ -#!/bin/sh - -sudo apt update > /dev/null 2> /dev/null -UPDATES="$(apt upgrade -s |grep -P '^\d+ upgraded'|cut -d" " -f1)" -[ "0" != "$UPDATES" ] && echo " $UPDATES" diff --git a/.local/bin/dwmblocks/dwmb-disk b/.local/bin/dwmblocks/dwmb-disk @@ -1,4 +1,4 @@ #!/bin/sh #echo -n " "; df -h -l --output='used' "$HOME" | grep -E -o '[0-9\.]+G' -echo -n " "; df -h -l --output='avail' "$HOME" | tail -n 1 | cut -d" " -f 2 +echo -n " "; df -h -l --output='avail' "$HOME" | tail -n 1 | cut -d" " -f 3 diff --git a/.local/bin/session-dmenu b/.local/bin/session-dmenu @@ -5,7 +5,7 @@ lock | slock exit | kill -TERM $(pidof -s dwm) hibernate | sudo -A systemctl suspend-then-hibernate reboot | sudo -A reboot -shutdown | sudo -A shutdown -h now" +shutdown | sudo -A shutdown now" choice="$(echo "$cmds" | sed "s/ *|/|/g" | cut -d'|' -f 1 | dmenu)" || exit 1 diff --git a/.profile b/.profile @@ -1,34 +0,0 @@ -# vim: filetype=zsh - -# Local bin to path -[ -d "$HOME/.local/bin" ] && \ - export PATH="$PATH:$(du "$HOME/.local/bin/" | cut -f2 | sed 's/\/$//g' | paste -sd ':')" - -# XDG dirs -export XDG_DATA_HOME="$HOME/.local/share" -export XDG_CONFIG_HOME="$HOME/.config" -export XDG_CACHE_HOME="$HOME/.cache" - -# XDG paths -export R_LIBS_USER="$XDG_DATA_HOME/R" -export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store" -export ATOM_HOME="$XDG_DATA_HOME/atom" -export GOPATH="$XDG_DATA_HOME/go" -export ZDOTDIR="$XDG_CONFIG_HOME/zsh" -export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc" -export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME/jupyter" -export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc -export ICEAUTHORITY="$XDG_CACHE_HOME/ICEauthority" -export RXVT_SOCKET="$XDG_RUNTIME_DIR/urxvtd" -export LESSHISTFILE="-" -export XINITRC="$XDG_CONFIG_HOME/xinitrc" - -# Environment variables -export VISUAL="nvim" -export EDITOR="nvim" -export PAGER="less" -export TERMINAL="alacritty" -export SUDO_ASKPASS="$HOME/.local/bin/sudoaskpass-dmenu" - -# Go bin to path -[ -d "$GOPATH/bin" ] && export PATH="$PATH:$GOPATH/bin" diff --git a/.zshenv b/.zshenv @@ -0,0 +1 @@ +.config/zsh/.zshenv +\ No newline at end of file diff --git a/README.md b/README.md @@ -37,9 +37,7 @@ alias c='/usr/bin/git --git-dir=$XDG_DATA_HOME/dotfiles --work-tree=$HOME' c config --local status.showUntrackedFiles no c config --local core.bare false c config --local core.worktree "$HOME" -# I'm unsure about the following lines c push --set-upstream origin master -c branch --set-upstream-to=origin/master master ``` You should put the alias line on your `.zshrc` or `.bashrc`. @@ -55,9 +53,7 @@ c checkout c config --local status.showUntrackedFiles no c config --local core.bare false c config --local core.worktree "$HOME" -# I'm unsure about the following lines c push --set-upstream origin master -c branch --set-upstream-to=origin/master master ``` You might need to add the following line to the file @@ -107,6 +103,49 @@ On Debian, you might need to change ZSH's syntax highlightning plugin location from `/usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh` to `/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh`. +### Other programs you might/will need + +Some of the programs you will need (and some you won't) are the following +(package names for Arch Linux, install with `pacman -S package1 package2 ...`: + +``` +# basic +xf86-video-intel zsh zsh-syntax-highlighting fzf neovim wget man cronie htop sshfs dash pacman-contrib +# xorg +xorg-server xorg-xinit +# utils +xorg-xrandr xorg-xbacklight alsa-utils alsa-lib alsa-plugins xwallpaper xcape xautolock pulseaudio xorg-xsetroot dunst xdotool udisks2 acpi scrot mlocate +# gnome +gnome gnome-extra +# fonts +noto-fonts ttf-font-awesome ttf-dejavu +# software +mpv thunderbird alacritty firefox signal-desktop pass transmission-cli syncthing youtube-dl jq +# other +texlive-most texlive-lang biber gtk2 gtk3 gvfs zathura mupdf zathura-pdf-mupdf pdftk +``` + +and don't forget to install `dwm`, `dmenu`, `slock` and `dwmblocks`: + +```sh +mkdir -p ~/.local/src +git clone https://git.oscarbenedito.com/dwm ~/.local/src/dwm +git clone https://git.oscarbenedito.com/dmenu ~/.local/src/dmenu +git clone https://git.oscarbenedito.com/slock ~/.local/src/slock +git clone https://git.oscarbenedito.com/dwmblocks ~/.local/src/blocks +sudo make -C ~/.local/src/dwm install +sudo make -C ~/.local/src/dmenu install +sudo make -C ~/.local/src/slock install +sudo make -C ~/.local/src/blocks install +``` + +Also don't forget to put your wallpaper under +`~/.local/share/dwm/wallpaper.png` as well as enable PulseAudio: + +``` +systemctl --user enable pulseaudio.service +``` + ## License This repository is licensed under the CC0 1.0 Universal license and therefore is