From cf00dabeb022ae6fcf36a5ee01331297db8860fc Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 11 Mar 2019 20:24:06 +0000 Subject: [PATCH 01/16] Allow Choice of package group presets when provisioning Choice is presented at beginning of provisioning and can choose from 3 different package groups (desktop, laptop, headless) with emphasis on different deployment functionality. Additional packages to run installation against can also be passed in as command option with -f "/path/to/packages.csv /path/to/more.csv" which will get installed alongside the selected package group. When choosing -F the packages will get installed as the only packages instead. --- .config/bootstrap/install.sh | 76 ++++++++++++++++++++++++------ .config/bootstrap/packages.csv | 34 ------------- .config/bootstrap/pkg/dev.csv | 5 ++ .config/bootstrap/pkg/fs.csv | 2 + .config/bootstrap/pkg/media.csv | 11 +++++ .config/bootstrap/pkg/network.csv | 2 + .config/bootstrap/pkg/shell.csv | 8 ++++ .config/bootstrap/pkg/untested.csv | 3 ++ .config/bootstrap/pkg/x.csv | 13 +++++ 9 files changed, 105 insertions(+), 49 deletions(-) delete mode 100644 .config/bootstrap/packages.csv create mode 100644 .config/bootstrap/pkg/dev.csv create mode 100644 .config/bootstrap/pkg/fs.csv create mode 100644 .config/bootstrap/pkg/media.csv create mode 100644 .config/bootstrap/pkg/network.csv create mode 100644 .config/bootstrap/pkg/shell.csv create mode 100644 .config/bootstrap/pkg/untested.csv create mode 100644 .config/bootstrap/pkg/x.csv diff --git a/.config/bootstrap/install.sh b/.config/bootstrap/install.sh index 799228d..a2be8e5 100644 --- a/.config/bootstrap/install.sh +++ b/.config/bootstrap/install.sh @@ -5,17 +5,22 @@ ### OPTIONS AND VARIABLES ### -while getopts ":a:r:p:h" o; do case "${o}" in +# unset our temp variables, just in case they were used for something else in shell +unset pkgfiles dotfilesrepo targetuser targetpassword targetdeployment quietmode aurhelper + +while getopts ":a:r:p:u:U:f:F:hq" o; do case "${o}" in h) printf "Optional arguments for custom use:\\n -r: Dotfiles repository (local file or url)\\n -p: Dependencies and programs csv (local file or url)\\n -a: AUR helper (must have pacman-like syntax)\\n -h: Show this message\\n" && exit ;; r) dotfilesrepo=${OPTARG} && git ls-remote "$dotfilesrepo" || exit ;; - p) progsfile=${OPTARG} ;; a) aurhelper=${OPTARG} ;; + f) pkgfiles=${OPTARG} ;; + F) pkgfiles=${OPTARG} && exclusivepkgfiles=true ;; + t) targetdeployment=${OPTARG} ;; *) printf "Invalid option: -%s\\n" "$OPTARG" && exit ;; esac done # DEFAULTS: [ -z "$dotfilesrepo" ] && dotfilesrepo="https://gitlab.com/marty-oehme/dotfiles.git" -[ -z "$progsfile" ] && progsfile="https://gitlab.com/marty-oehme/dotfiles/snippets/1828258/raw" +[ -z "$pkgfiles" ] && pkgfiles="" [ -z "$aurhelper" ] && aurhelper="yay" ### FUNCTIONS ### @@ -57,6 +62,10 @@ adduserandpass() { \ echo "$name:$pass1" | chpasswd unset pass1 pass2 ;} +deploydialog() { + targetdeployment=$(dialog --title "Deployment Configuration" --radiolist "Select a target package configuration." 0 0 5 desktop "base, network, shell, gui, multimedia, development" on laptop "base, network, shell, gui, multimedia, development, battery, touchpad" off headless "base, network, shell" off none "Installs no packages." off 3>&1 1>&2 2>&3 3>&1) +} + refreshkeys() { \ dialog --infobox "Refreshing Arch Keyring..." 4 40 pacman --noconfirm -Sy archlinux-keyring >/dev/null 2>&1 @@ -97,9 +106,29 @@ aurinstall() { \ sudo -u "$name" $aurhelper -S --noconfirm "$1" >/dev/null 2>&1 } +# get the link to the package collection +getpackagegrouplink() { + case "$1" in + "none") pkggroup="";; + "desktop") pkggroup="https://gitlab.com/marty-oehme/dotfiles/snippets/1828258/raw" ;; + "laptop") pkggroup="https://gitlab.com/marty-oehme/dotfiles/snippets/1834307/raw" ;; + "headless") pkggroup="https://gitlab.com/marty-oehme/dotfiles/snippets/1834308/raw" ;; + esac +} + +# can be called with as many csv files filled with packages as necessary +# appends them all to one temporary file for the installation +gatherpackages() { + concfile=$1 + shift + touch $concfile + for progs in "$@"; do + ([ -f "$progs" ] && cat "$progs" >> $concfile) || curl -Ls "$progs" | sed '/^#/d' >> $concfile + done +} + installationloop() { \ - ([ -f "$progsfile" ] && cp "$progsfile" /tmp/progs.csv) || curl -Ls "$progsfile" | sed '/^#/d' > /tmp/progs.csv - total=$(wc -l < /tmp/progs.csv) + total=$(wc -l < $1) aurinstalled=$(pacman -Qm | awk '{print $1}') while IFS=, read -r tag program comment; do n=$((n+1)) @@ -109,7 +138,7 @@ installationloop() { \ "A") aurinstall "$program" "$comment" ;; "G") gitmakeinstall "$program" "$comment" ;; esac - done < /tmp/progs.csv ;} + done < $1 ;} dotfiles() { \ gpath=$1 @@ -144,7 +173,7 @@ serviceinit() { for service in "$@"; do systemctl start "$service" done ;} -systembeepoff() { dialog --infobox "Getting rid of that retarded error beep sound..." 10 50 +systembeepoff() { dialog --infobox "Getting rid of error beep sound..." 10 50 rmmod pcspkr echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf ;} @@ -173,6 +202,11 @@ getuserandpass || error "User exited." # Give warning if user already exists. usercheck || error "User exited." +# Let user select groups of packages to pre-install. +if [ -z "$targetdeployment" ]; then + deploydialog || error "User exited." +fi + # Last chance for user to back out before install. preinstallmsg || error "User exited." @@ -199,11 +233,23 @@ sed -i "s/-j2/-j$(nproc)/;s/^#MAKEFLAGS/MAKEFLAGS/" /etc/makepkg.conf manualinstall $aurhelper || error "Failed to install AUR helper." +# the command that sets the correct link to gather our package files from +# correct link depends on target deployment: desktop, laptop, server,.. +getpackagegrouplink $targetdeployment + +# append the default packages to whatever custom package csv links were passed in or +# only use the custom packages if forced with -F +[ ! "$exclusivepkgfiles" ] && pkgfiles="$(curl -Ls $pkggroup | cat ) $pkgfiles" + +tmpfile=/tmp/pkgs.csv +# actually gather the individual package installation lines from the various links and files +gatherpackages $tmpfile $pkgfiles + # The command that does all the installing. Reads the progs.csv file and # installs each needed program the way required. Be sure to run this only after -# the user has been created and has priviledges to run sudo without a password +# the user has been created and has privileges to run sudo without a password # and all build dependencies are installed. -installationloop +installationloop $tmpfile # Install the dotfiles in the user's home directory putgitrepo "$dotfilesrepo" "/home/$name" @@ -212,11 +258,6 @@ rm "/home/$name/README.md" # Pulseaudio, if/when initially installed, often needs a restart to work immediately. [ -f /usr/bin/pulseaudio ] && resetpulse -# Install vim `plugged` plugins. -dialog --infobox "Installing (neo)vim plugins..." 4 50 -(sleep 30 && killall nvim) & -sudo -u "$name" nvim -E -c "PlugUpdate|visual|q|q" >/dev/null 2>&1 - # Enable services here. serviceinit NetworkManager cronie @@ -228,6 +269,11 @@ systembeepoff newperms "%wheel ALL=(ALL) ALL #LARBS %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" +# Install vim `plugged` plugins. +dialog --infobox "Installing (neo)vim plugins..." 4 50 +(sleep 30 && killall nvim) & +sudo -u "$name" nvim -E -c "PlugUpdate|visual|q|q" >/dev/null 2>&1 + # Last message! Install complete! finalize -clear \ No newline at end of file +clear diff --git a/.config/bootstrap/packages.csv b/.config/bootstrap/packages.csv deleted file mode 100644 index a3b9a49..0000000 --- a/.config/bootstrap/packages.csv +++ /dev/null @@ -1,34 +0,0 @@ -#TAG,NAME IN REPO (or git url),PURPOSE (should be a verb phrase to sound right while installing) -,i3-gaps,"is the main graphical user interface and window manager." -,i3blocks,"is the status bar block provider for i3." -,xorg-server,"is the graphical server." -,xorg-xinit,"starts the graphical server." -,ranger,"is an extensive terminal file manager that everyone likes." -,dosfstools,"allows your computer to access dos-like filesystems." -,neovim,"a tidier vim with some useful features" -,i3blocks,"is the status bar." -,i3lock,"is the screen lock." -,mpv,"is the patrician's choice video/gif player." -,networkmanager,"does exactly what it sounds like." -,ntfs-3g,"allows accessing NTFS partitions." -,pulseaudio,"is the audio system (>inb4 bloat)." -,pulseaudio-alsa,"is an audio interface with ALSA." -,pulsemixer,"is an intuitive ncurses audio controller." -,tmux,"is a terminal multiplexer and the dropdown window in LARBS." -,unrar,"extracts rar's." -,unzip,"unzips zips." -,xclip,"allows for copying and pasting from the command line." -,xdotool,"provides window action utilities on the command line." -,youtube-dl,"can download any YouTube video (or playlist or channel) when given the link." -,atool,"manages and gives information about archives." -,fzf,"is a fuzzy finder tool." -,zsh,"is a shell alternative to bash." -A,nerd-fonts-fira-code,"is the mono-space font of choice, patched with embedded icon symbols." -,qutebrowser,"is a keyboard focused browser with vim-keys enabled." -,mopidy,"is an extensible music server written in python." -A,mopidy-spotify,"is a mopidy extension to play music from spotify." -A,mopidy-scrobbler,"is a mopidy extension to scrobble to last.fm." -A,mopidy-spotify-tunigo,"is a mopidy extension to enable spotify browsing." -A,mopidy-podcast,"is a mopidy extension to search and browse podcasts." -,rxvt-unicode,"is a simple and efficient terminal emulator." - diff --git a/.config/bootstrap/pkg/dev.csv b/.config/bootstrap/pkg/dev.csv new file mode 100644 index 0000000..418002d --- /dev/null +++ b/.config/bootstrap/pkg/dev.csv @@ -0,0 +1,5 @@ +,code,"is an open source gui code editor in the style of atom/sublime - but better." +,vagrant,"is a development environment provisioning system which easily spins up virtual machines for you." +,virtualbox,"is a virtual machine framework which is mainly used by vagrant." +,docker,"should need no introduction, but allows you to run everything in a container." +,docker-compose,"allows you to run many, many containers much more easily." diff --git a/.config/bootstrap/pkg/fs.csv b/.config/bootstrap/pkg/fs.csv new file mode 100644 index 0000000..77db957 --- /dev/null +++ b/.config/bootstrap/pkg/fs.csv @@ -0,0 +1,2 @@ +,ntfs-3g,"allows accessing NTFS partitions." +,dosfstools,"allows your computer to access dos-like filesystems." diff --git a/.config/bootstrap/pkg/media.csv b/.config/bootstrap/pkg/media.csv new file mode 100644 index 0000000..980f135 --- /dev/null +++ b/.config/bootstrap/pkg/media.csv @@ -0,0 +1,11 @@ +,pulseaudio,"is the audio system (>inb4 bloat)." +,pulseaudio-alsa,"is an audio interface with ALSA." +,pulsemixer,"is an intuitive ncurses audio controller." +,mopidy,"is an extensible music server written in python." +,ncmpcpp,"is a client for the mopidy music server (or, optionally, for mpd)" +A,mopidy-spotify,"is a mopidy extension to play music from spotify." +A,mopidy-scrobbler,"is a mopidy extension to scrobble to last.fm." +A,mopidy-spotify-tunigo,"is a mopidy extension to enable spotify browsing." +A,mopidy-podcast,"is a mopidy extension to search and browse podcasts." +,mpv,"is the patrician's choice video/gif player." +,youtube-dl,"can download any YouTube video (or playlist or channel) when given the link." diff --git a/.config/bootstrap/pkg/network.csv b/.config/bootstrap/pkg/network.csv new file mode 100644 index 0000000..ea62e26 --- /dev/null +++ b/.config/bootstrap/pkg/network.csv @@ -0,0 +1,2 @@ +,networkmanager,"does exactly what it sounds like." +,openssh,"allows using ssh connections to connect to others or be connected to." diff --git a/.config/bootstrap/pkg/shell.csv b/.config/bootstrap/pkg/shell.csv new file mode 100644 index 0000000..19deaff --- /dev/null +++ b/.config/bootstrap/pkg/shell.csv @@ -0,0 +1,8 @@ +,zsh,"is a shell alternative to bash." +,tmux,"is a terminal multiplexer and the dropdown window in LARBS." +,neovim,"a tidier vim with some useful features" +,ranger,"is an extensive terminal file manager that everyone likes." +,fzf,"is a fuzzy finder tool." +,unrar,"extracts rar's." +,unzip,"unzips zips." +,atool,"manages and gives information about archives." diff --git a/.config/bootstrap/pkg/untested.csv b/.config/bootstrap/pkg/untested.csv new file mode 100644 index 0000000..0a22a67 --- /dev/null +++ b/.config/bootstrap/pkg/untested.csv @@ -0,0 +1,3 @@ +#TAG,NAME IN REPO (or git url),PURPOSE (should be a verb phrase to sound right while installing) +A,enpass-bin,"is a cross-platform personal password manager with gui." +,gtk3,"is a gui toolkit, necessary for enpass-bin to work. (enpass forgets to install it)" diff --git a/.config/bootstrap/pkg/x.csv b/.config/bootstrap/pkg/x.csv new file mode 100644 index 0000000..d809914 --- /dev/null +++ b/.config/bootstrap/pkg/x.csv @@ -0,0 +1,13 @@ +,xorg-server,"is the graphical server." +,xorg-xinit,"starts the graphical server." +,xorg-xauth,"manages X authentication settings." +,xclip,"allows for copying and pasting from the command line." +,xdotool,"provides window action utilities on the command line." +,i3-gaps,"is the main graphical user interface and window manager." +,i3blocks,"is the status bar block provider for i3." +,i3status,"is the status bar for i3." +,i3lock,"is the i3 screen lock provider." +A,j4-dmenu-desktop,"is a faster dmenu replacement, the application launcher of the i3 suite." +A,nerd-fonts-fira-code,"is the mono-space font of choice, patched with embedded icon symbols." +,rxvt-unicode,"is a simple and efficient terminal emulator." +,qutebrowser,"is a keyboard focused browser with vim-keys enabled." From afa79821cdd831b5b4ef8c7a8ed859b976e3bd73 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 11 Mar 2019 21:17:15 +0000 Subject: [PATCH 02/16] Resolve "Change shell to specified shell on installation" --- .config/bootstrap/install.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) mode change 100644 => 100755 .config/bootstrap/install.sh diff --git a/.config/bootstrap/install.sh b/.config/bootstrap/install.sh old mode 100644 new mode 100755 index a2be8e5..79cdb92 --- a/.config/bootstrap/install.sh +++ b/.config/bootstrap/install.sh @@ -6,15 +6,16 @@ ### OPTIONS AND VARIABLES ### # unset our temp variables, just in case they were used for something else in shell -unset pkgfiles dotfilesrepo targetuser targetpassword targetdeployment quietmode aurhelper +unset pkgfiles dotfilesrepo targetuser targetpassword targetdeployment quietmode aurhelper loginshell -while getopts ":a:r:p:u:U:f:F:hq" o; do case "${o}" in - h) printf "Optional arguments for custom use:\\n -r: Dotfiles repository (local file or url)\\n -p: Dependencies and programs csv (local file or url)\\n -a: AUR helper (must have pacman-like syntax)\\n -h: Show this message\\n" && exit ;; +while getopts ":a:r:f:F:t:s:h" o; do case "${o}" in + h) printf "Optional arguments for custom use:\\n -r: Dotfiles repository (local file or url)\\n -f: Dependencies and programs csv alongside defaults (local file or url)\\n -F: Dependencies and programs csv replacing defaults (local file or url)\\n -a: AUR helper (must have pacman-like syntax), defaults to yay\\n -t: Target deployment (laptop, desktop, headless, none) to set up relevant package function groups\\n -s: Default user shell. Must be a full path to the shell (/bin/zsh by default).\n -h: Show this message\\n" && exit ;; r) dotfilesrepo=${OPTARG} && git ls-remote "$dotfilesrepo" || exit ;; a) aurhelper=${OPTARG} ;; f) pkgfiles=${OPTARG} ;; F) pkgfiles=${OPTARG} && exclusivepkgfiles=true ;; t) targetdeployment=${OPTARG} ;; + s) loginshell=${OPTARG} ;; *) printf "Invalid option: -%s\\n" "$OPTARG" && exit ;; esac done @@ -22,6 +23,7 @@ esac done [ -z "$dotfilesrepo" ] && dotfilesrepo="https://gitlab.com/marty-oehme/dotfiles.git" [ -z "$pkgfiles" ] && pkgfiles="" [ -z "$aurhelper" ] && aurhelper="yay" +[ -z "$loginshell" ] && loginshell="/bin/zsh" ### FUNCTIONS ### @@ -255,6 +257,9 @@ installationloop $tmpfile putgitrepo "$dotfilesrepo" "/home/$name" rm "/home/$name/README.md" +# Set user login shell to desired shell - usually zsh +chsh -s $loginshell $name + # Pulseaudio, if/when initially installed, often needs a restart to work immediately. [ -f /usr/bin/pulseaudio ] && resetpulse From 51f74efecc67691129d6fba4253e4fcff330296a Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Mar 2019 11:08:42 +0100 Subject: [PATCH 03/16] Update README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 3b2498f..f8fe0c7 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,10 @@ Or, to **only** use these dotfiles two steps are necessary [VSCode & Vue focused dotfiles setup](https://github.com/sobolevn/dotfiles) -- looks interesting, maybe steal some tidbits +[Various tidbits and aliases](https://github.com/ahmedelgabri/talks/blob/master/cli-and-git/cli-and-git.md) + +[dotfiles from the author of above link](https://github.com/ahmedelgabri/dotfiles) + # Roadmap ## Perfectly setting up Arch From 0ce01cdd5d0590eeba1d98e00ae5b2ebbd9c8b05 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Mar 2019 13:49:36 +0100 Subject: [PATCH 04/16] Switch from urxvt to alacritty --- .config/alacritty/alacritty.yml | 549 ++++++++++++++++++++++++++++++++ .config/bootstrap/pkg/x.csv | 2 +- .config/i3/config | 2 +- 3 files changed, 551 insertions(+), 2 deletions(-) create mode 100644 .config/alacritty/alacritty.yml diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml new file mode 100644 index 0000000..ca5ecde --- /dev/null +++ b/.config/alacritty/alacritty.yml @@ -0,0 +1,549 @@ +# Configuration for Alacritty, the GPU enhanced terminal emulator. + +# Any items in the `env` entry below will be added as +# environment variables. Some entries may override variables +# set by alacritty itself. +#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: xterm-256color + +window: + # Window dimensions (changes require restart) + # + # Specified in number of columns/lines, not pixels. + # If both are `0`, this setting is ignored. + dimensions: + columns: 0 + lines: 0 + + # Window padding (changes require restart) + # + # Blank space added around the window in pixels. This padding is scaled + # by DPI and the specified value is always added at both opposing sides. + padding: + x: 2 + y: 2 + + # Spread additional padding evenly around the terminal content. + dynamic_padding: false + + # Window decorations + # + # Values for `decorations`: + # - full: Borders and title bar + # - none: Neither borders nor title bar + # + # Values for `decorations` (macOS only): + # - transparent: Title bar, transparent background and title bar buttons + # - buttonless: Title bar, transparent background, but no title bar buttons + decorations: full + + # When true, alacritty starts maximized. + start_maximized: false + +scrolling: + # Maximum number of lines in the scrollback buffer. + # Specifying '0' will disable scrolling. + history: 10000 + + # Number of lines the viewport will move for every line scrolled when + # scrollback is enabled (history > 0). + multiplier: 3 + + # Faux Scrolling + # + # The `faux_multiplier` setting controls the number of lines the terminal + # should scroll when the alternate screen buffer is active. This is used + # to allow mouse scrolling for applications like `man`. + # + # Specifying `0` will disable faux scrolling. + faux_multiplier: 3 + + # Scroll to the bottom when new text is written to the terminal. + auto_scroll: false + +# Spaces per Tab (changes require restart) +# +# This setting defines the width of a tab in cells. +# +# Some applications, like Emacs, rely on knowing about the width of a tab. +# To prevent unexpected behavior in these applications, it's also required to +# change the `it` value in terminfo when altering this setting. +tabspaces: 8 + +# Font configuration (changes require restart) +font: + # Normal (roman) font face + normal: + # Font family + # + # Default: + # - (macOS) Menlo + # - (Linux) monospace + # - (Windows) Consolas + family: Fira Code + + # The `style` can be specified to pick a specific face. + #style: Regular + + # Bold font face + bold: + # Font family + # + # If the bold family is not specified, it will fall back to the + # value specified for the normal font. + family: Fira Code + + # The `style` can be specified to pick a specific face. + #style: Bold + + # Italic font face + italic: + # Font family + # + # If the italic family is not specified, it will fall back to the + # value specified for the normal font. + family: Fira Code + + # The `style` can be specified to pick a specific face. + #style: Italic + + # Point size + size: 9.0 + + # Offset is the extra space around each character. `offset.y` can be thought of + # as modifying the line spacing, and `offset.x` as modifying the letter spacing. + offset: + x: -2 + y: 0 + + # Glyph offset determines the locations of the glyphs within their cells with + # the default being at the bottom. Increasing `x` moves the glyph to the right, + # increasing `y` moves the glyph upwards. + glyph_offset: + x: 0 + y: 0 + + # Thin stroke font rendering (macOS only) + # + # Thin strokes are suitable for retina displays, but for non-retina screens + # it is recommended to set `use_thin_strokes` to `false` + # + # macOS >= 10.14.x: + # + # If the font quality on non-retina display looks bad then set + # `use_thin_strokes` to `true` and enable font smoothing by running the + # following command: + # `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO` + # + # This is a global setting and will require a log out or restart to take + # effect. + use_thin_strokes: true + +# Display the time it takes to redraw each frame. +render_timer: false + +# Keep the log file after quitting Alacritty. +persistent_logging: false + +# If `true`, bold text is drawn using the bright color variants. +draw_bold_text_with_bright_colors: false +# Colors (Iceberg) +colors: + # Default colors + primary: + background: '0x161821' + foreground: '0xd2d4de' + + # Normal colors + normal: + black: '0x161821' + red: '0xe27878' + green: '0xb4be82' + yellow: '0xe2a478' + blue: '0x84a0c6' + magenta: '0xa093c7' + cyan: '0x89b8c2' + white: '0xc6c8d1' + + # Bright colors + bright: + black: '0x6b7089' + red: '0xe98989' + green: '0xc0ca8e' + yellow: '0xe9b189' + blue: '0x91acd1' + magenta: '0xada0d3' + cyan: '0x95c4ce' + white: '0xd2d4de' + # Dim colors + # + # If the dim colors are not set, they will be calculated automatically based + # on the `normal` colors. + #dim: + # black: '0x000000' + # red: '0x8c3336' + # green: '0x7a8530' + # yellow: '0x97822e' + # blue: '0x506d8f' + # magenta: '0x80638e' + # cyan: '0x497e7a' + # white: '0x9a9a9a' + + # Indexed Colors + # + # The indexed colors include all colors from 16 to 256. + # When these are not set, they're filled with sensible defaults. + # + # Example: + # `- { index: 16, color: '0xff00ff' }` + # + indexed_colors: [] + +# Visual Bell +# +# Any time the BEL code is received, Alacritty "rings" the visual bell. Once +# rung, the terminal background will be set to white and transition back to the +# default background color. You can control the rate of this transition by +# setting the `duration` property (represented in milliseconds). You can also +# configure the transition function by setting the `animation` property. +# +# Values for `animation`: +# - Ease +# - EaseOut +# - EaseOutSine +# - EaseOutQuad +# - EaseOutCubic +# - EaseOutQuart +# - EaseOutQuint +# - EaseOutExpo +# - EaseOutCirc +# - Linear +# +# Specifying a `duration` of `0` will disable the visual bell. +visual_bell: + animation: EaseOutCubic + duration: 0 + color: '0x222220' + +# Background opacity +# +# Window opacity as a floating point number from `0.0` to `1.0`. +# The value `0.0` is completely transparent and `1.0` is opaque. +background_opacity: 0.99 + +# Mouse bindings +# +# Available fields: +# - mouse +# - action +# - mods (optional) +# +# Values for `mouse`: +# - Middle +# - Left +# - Right +# - Numeric identifier such as `5` +# +# All available `mods` and `action` values are documented in the key binding +# section. +mouse_bindings: + - { mouse: Middle, action: PasteSelection } + +mouse: + # Click settings + # + # The `double_click` and `triple_click` settings control the time + # alacritty should wait for accepting multiple clicks as one double + # or triple click. + double_click: { threshold: 300 } + triple_click: { threshold: 300 } + + # If this is `true`, the cursor is temporarily hidden when typing. + hide_when_typing: false + + url: + # URL launcher + # + # This program is executed when clicking on a text which is recognized as a URL. + # The URL is always added to the command as the last parameter. + # + # When set to `None`, URL launching will be disabled completely. + # + # Default: + # - (macOS) open + # - (Linux) xdg-open + # - (Windows) explorer + #launcher: xdg-open + + # URL modifiers + # + # These are the modifiers that need to be held down for opening URLs when clicking + # on them. The available modifiers are documented in the key binding section. + modifiers: None + +selection: + semantic_escape_chars: ",│`|:\"' ()[]{}<>" + + # When set to `true`, selected text will be copied to the primary clipboard. + save_to_clipboard: true + +# Allow terminal applications to change Alacritty's window title. +dynamic_title: true + +cursor: + # Cursor style + # + # Values for `style`: + # - ▇ Block + # - _ Underline + # - | Beam + style: Beam + + # If this is `true`, the cursor will be rendered as a hollow box when the + # window is not focused. + unfocused_hollow: true + +# Live config reload (changes require restart) +live_config_reload: true + +# Shell +# +# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`. +# Entries in `shell.args` are passed unmodified as arguments to the shell. +# +# Default: +# - (Linux/macOS) /bin/bash --login +# - (Windows) powershell +#shell: +# program: /bin/bash +# args: +# - --login + +# Windows 10 ConPTY backend (Windows only) +# +# This will enable better color support and may resolve other issues, +# however this API and its implementation is still young and so is +# disabled by default, as stability may not be as good as the winpty +# backend. +# +# Alacritty will fall back to the WinPTY automatically if the ConPTY +# backend cannot be initialized. +enable_experimental_conpty_backend: false + +# Send ESC (\x1b) before characters when alt is pressed. +alt_send_esc: true + +# Key bindings +# +# Key bindings are specified as a list of objects. Each binding will specify a +# key and modifiers required to trigger it, terminal modes where the binding is +# applicable, and what should be done when the key binding fires. It can either +# send a byte sequence to the running application (`chars`), execute a +# predefined action (`action`) or fork and execute a specified command plus +# arguments (`command`). +# +# Bindings are always filled by default, but will be replaced when a new binding +# with the same triggers is defined. To unset a default binding, it can be +# mapped to the `None` action. +# +# Example: +# `- { key: V, mods: Control|Shift, action: Paste }` +# +# Available fields: +# - key +# - mods (optional) +# - chars | action | command (exactly one required) +# - mode (optional) +# +# Values for `key`: +# - `A` -> `Z` +# - `F1` -> `F12` +# - `Key1` -> `Key0` +# +# A full list with available key codes can be found here: +# https://docs.rs/glutin/*/glutin/enum.VirtualKeyCode.html#variants +# +# Instead of using the name of the keys, the `key` field also supports using +# the scancode of the desired key. Scancodes have to be specified as a +# decimal number. +# This command will allow you to display the hex scancodes for certain keys: +# `showkey --scancodes` +# +# Values for `mods`: +# - Command +# - Control +# - Super +# - Shift +# - Alt +# +# Multiple `mods` can be combined using `|` like this: `mods: Control|Shift`. +# Whitespace and capitalization is relevant and must match the example. +# +# Values for `chars`: +# The `chars` field writes the specified string to the terminal. This makes +# it possible to pass escape sequences. +# To find escape codes for bindings like `PageUp` ("\x1b[5~"), you can run +# the command `showkey -a` outside of tmux. +# Note that applications use terminfo to map escape sequences back to +# keys. It is therefore required to update the terminfo when +# changing an escape sequence. +# +# Values for `action`: +# - Paste +# - PasteSelection +# - Copy +# - IncreaseFontSize +# - DecreaseFontSize +# - ResetFontSize +# - ScrollPageUp +# - ScrollPageDown +# - ScrollToTop +# - ScrollToBottom +# - ClearHistory +# - Hide +# - Quit +# - ClearLogNotice +# - SpawnNewInstance +# - None +# +# Values for `command`: +# The `command` field must be a map containing a `program` string and +# an `args` array of command line parameter strings. +# +# Example: +# `command: { program: "alacritty", args: ["-e", "vttest"] }` +# +# Values for `mode`: +# - ~AppCursor +# - AppCursor +# - ~AppKeypad +# - AppKeypad +key_bindings: + # (Windows/Linux only) + #- { key: V, mods: Control|Shift, action: Paste } + #- { key: C, mods: Control|Shift, action: Copy } + #- { key: Insert, mods: Shift, action: PasteSelection } + #- { key: Key0, mods: Control, action: ResetFontSize } + #- { key: Equals, mods: Control, action: IncreaseFontSize } + #- { key: Subtract, mods: Control, action: DecreaseFontSize } + + # (macOS only) + #- { key: Key0, mods: Command, action: ResetFontSize } + #- { key: Equals, mods: Command, action: IncreaseFontSize } + #- { key: Minus, mods: Command, action: DecreaseFontSize } + #- { key: K, mods: Command, action: ClearHistory } + #- { key: K, mods: Command, chars: "\x0c" } + #- { key: V, mods: Command, action: Paste } + #- { key: C, mods: Command, action: Copy } + #- { key: H, mods: Command, action: Hide } + #- { key: Q, mods: Command, action: Quit } + #- { key: W, mods: Command, action: Quit } + + - { key: Paste, action: Paste } + - { key: Copy, action: Copy } + - { key: L, mods: Control, action: ClearLogNotice } + - { key: L, mods: Control, chars: "\x0c" } + - { key: Home, chars: "\x1bOH", mode: AppCursor } + - { key: Home, chars: "\x1b[H", mode: ~AppCursor } + - { key: End, chars: "\x1bOF", mode: AppCursor } + - { key: End, chars: "\x1b[F", mode: ~AppCursor } + - { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt } + - { key: PageUp, mods: Shift, chars: "\x1b[5;2~", mode: Alt } + - { key: PageUp, mods: Control, chars: "\x1b[5;5~" } + - { key: PageUp, chars: "\x1b[5~" } + - { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt } + - { key: PageDown, mods: Shift, chars: "\x1b[6;2~", mode: Alt } + - { key: PageDown, mods: Control, chars: "\x1b[6;5~" } + - { key: PageDown, chars: "\x1b[6~" } + - { key: Tab, mods: Shift, chars: "\x1b[Z" } + - { key: Back, chars: "\x7f" } + - { key: Back, mods: Alt, chars: "\x1b\x7f" } + - { key: Insert, chars: "\x1b[2~" } + - { key: Delete, chars: "\x1b[3~" } + - { key: Left, mods: Shift, chars: "\x1b[1;2D" } + - { key: Left, mods: Control, chars: "\x1b[1;5D" } + - { key: Left, mods: Alt, chars: "\x1b[1;3D" } + - { key: Left, chars: "\x1b[D", mode: ~AppCursor } + - { key: Left, chars: "\x1bOD", mode: AppCursor } + - { key: Right, mods: Shift, chars: "\x1b[1;2C" } + - { key: Right, mods: Control, chars: "\x1b[1;5C" } + - { key: Right, mods: Alt, chars: "\x1b[1;3C" } + - { key: Right, chars: "\x1b[C", mode: ~AppCursor } + - { key: Right, chars: "\x1bOC", mode: AppCursor } + - { key: Up, mods: Shift, chars: "\x1b[1;2A" } + - { key: Up, mods: Control, chars: "\x1b[1;5A" } + - { key: Up, mods: Alt, chars: "\x1b[1;3A" } + - { key: Up, chars: "\x1b[A", mode: ~AppCursor } + - { key: Up, chars: "\x1bOA", mode: AppCursor } + - { key: Down, mods: Shift, chars: "\x1b[1;2B" } + - { key: Down, mods: Control, chars: "\x1b[1;5B" } + - { key: Down, mods: Alt, chars: "\x1b[1;3B" } + - { key: Down, chars: "\x1b[B", mode: ~AppCursor } + - { key: Down, chars: "\x1bOB", mode: AppCursor } + - { key: F1, chars: "\x1bOP" } + - { key: F2, chars: "\x1bOQ" } + - { key: F3, chars: "\x1bOR" } + - { key: F4, chars: "\x1bOS" } + - { key: F5, chars: "\x1b[15~" } + - { key: F6, chars: "\x1b[17~" } + - { key: F7, chars: "\x1b[18~" } + - { key: F8, chars: "\x1b[19~" } + - { key: F9, chars: "\x1b[20~" } + - { key: F10, chars: "\x1b[21~" } + - { key: F11, chars: "\x1b[23~" } + - { key: F12, chars: "\x1b[24~" } + - { key: F1, mods: Shift, chars: "\x1b[1;2P" } + - { key: F2, mods: Shift, chars: "\x1b[1;2Q" } + - { key: F3, mods: Shift, chars: "\x1b[1;2R" } + - { key: F4, mods: Shift, chars: "\x1b[1;2S" } + - { key: F5, mods: Shift, chars: "\x1b[15;2~" } + - { key: F6, mods: Shift, chars: "\x1b[17;2~" } + - { key: F7, mods: Shift, chars: "\x1b[18;2~" } + - { key: F8, mods: Shift, chars: "\x1b[19;2~" } + - { key: F9, mods: Shift, chars: "\x1b[20;2~" } + - { key: F10, mods: Shift, chars: "\x1b[21;2~" } + - { key: F11, mods: Shift, chars: "\x1b[23;2~" } + - { key: F12, mods: Shift, chars: "\x1b[24;2~" } + - { key: F1, mods: Control, chars: "\x1b[1;5P" } + - { key: F2, mods: Control, chars: "\x1b[1;5Q" } + - { key: F3, mods: Control, chars: "\x1b[1;5R" } + - { key: F4, mods: Control, chars: "\x1b[1;5S" } + - { key: F5, mods: Control, chars: "\x1b[15;5~" } + - { key: F6, mods: Control, chars: "\x1b[17;5~" } + - { key: F7, mods: Control, chars: "\x1b[18;5~" } + - { key: F8, mods: Control, chars: "\x1b[19;5~" } + - { key: F9, mods: Control, chars: "\x1b[20;5~" } + - { key: F10, mods: Control, chars: "\x1b[21;5~" } + - { key: F11, mods: Control, chars: "\x1b[23;5~" } + - { key: F12, mods: Control, chars: "\x1b[24;5~" } + - { key: F1, mods: Alt, chars: "\x1b[1;6P" } + - { key: F2, mods: Alt, chars: "\x1b[1;6Q" } + - { key: F3, mods: Alt, chars: "\x1b[1;6R" } + - { key: F4, mods: Alt, chars: "\x1b[1;6S" } + - { key: F5, mods: Alt, chars: "\x1b[15;6~" } + - { key: F6, mods: Alt, chars: "\x1b[17;6~" } + - { key: F7, mods: Alt, chars: "\x1b[18;6~" } + - { key: F8, mods: Alt, chars: "\x1b[19;6~" } + - { key: F9, mods: Alt, chars: "\x1b[20;6~" } + - { key: F10, mods: Alt, chars: "\x1b[21;6~" } + - { key: F11, mods: Alt, chars: "\x1b[23;6~" } + - { key: F12, mods: Alt, chars: "\x1b[24;6~" } + - { key: F1, mods: Super, chars: "\x1b[1;3P" } + - { key: F2, mods: Super, chars: "\x1b[1;3Q" } + - { key: F3, mods: Super, chars: "\x1b[1;3R" } + - { key: F4, mods: Super, chars: "\x1b[1;3S" } + - { key: F5, mods: Super, chars: "\x1b[15;3~" } + - { key: F6, mods: Super, chars: "\x1b[17;3~" } + - { key: F7, mods: Super, chars: "\x1b[18;3~" } + - { key: F8, mods: Super, chars: "\x1b[19;3~" } + - { key: F9, mods: Super, chars: "\x1b[20;3~" } + - { key: F10, mods: Super, chars: "\x1b[21;3~" } + - { key: F11, mods: Super, chars: "\x1b[23;3~" } + - { key: F12, mods: Super, chars: "\x1b[24;3~" } + - { key: NumpadEnter, chars: "\n" } diff --git a/.config/bootstrap/pkg/x.csv b/.config/bootstrap/pkg/x.csv index d809914..3781719 100644 --- a/.config/bootstrap/pkg/x.csv +++ b/.config/bootstrap/pkg/x.csv @@ -9,5 +9,5 @@ ,i3lock,"is the i3 screen lock provider." A,j4-dmenu-desktop,"is a faster dmenu replacement, the application launcher of the i3 suite." A,nerd-fonts-fira-code,"is the mono-space font of choice, patched with embedded icon symbols." -,rxvt-unicode,"is a simple and efficient terminal emulator." +,alacritty,"is an efficient, unicode compatible terminal emulator." ,qutebrowser,"is a keyboard focused browser with vim-keys enabled." diff --git a/.config/i3/config b/.config/i3/config index 48f29bc..5a7945e 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -32,7 +32,7 @@ font $font floating_modifier $mod # start a terminal -bindsym $mod+Return exec i3-sensible-terminal +bindsym $mod+Return exec alacritty #i3-sensible-terminal # kill focused window bindsym $mod+Shift+x kill From 5935b8884af3f12f1dfef1a857cd3b1896532561 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Mar 2019 14:42:48 +0100 Subject: [PATCH 05/16] Fix home files owned by root after provision --- .config/bootstrap/install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/bootstrap/install.sh b/.config/bootstrap/install.sh index 79cdb92..c4d828f 100755 --- a/.config/bootstrap/install.sh +++ b/.config/bootstrap/install.sh @@ -157,16 +157,16 @@ putgitrepo() { # Downlods a gitrepo $1 and places the files in $2 only overwriti sudo -u "$name" git clone --bare "$1" "$dir/gitrepo" >/dev/null 2>&1 && sudo -u "$name" cp -rfT "$dir/gitrepo" $dfdir/.dotfiles - dotfiles $dfdir checkout + sudo -u "$name" dotfiles $dfdir checkout if [ $? = 0 ]; then echo "Checked out dotfiles."; else echo "Backing up existing dotfiles."; mkdir -p $2/.dotfiles-backup - dotfiles $dfdir checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} $2/.dotfiles-backup/{} + sudo -u "$name" dotfiles $dfdir checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} $2/.dotfiles-backup/{} fi; - dotfiles $dfdir checkout - dotfiles $dfdir config status.showUntrackedFiles no + sudo -u "$name" dotfiles $dfdir checkout + sudo -u "$name" dotfiles $dfdir config status.showUntrackedFiles no } serviceinit() { for service in "$@"; do From ed714702875225a95067a8bfcc30a5be82f183a9 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Mar 2019 14:55:08 +0100 Subject: [PATCH 06/16] shorten dotfiles command to interact with repo to dot --- .config/zsh/0-dotfiles-version-control-commands | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.config/zsh/0-dotfiles-version-control-commands b/.config/zsh/0-dotfiles-version-control-commands index c0e4f73..af51369 100644 --- a/.config/zsh/0-dotfiles-version-control-commands +++ b/.config/zsh/0-dotfiles-version-control-commands @@ -1,5 +1,5 @@ -# enables git management through dotfiles command -alias dotfiles='/usr/bin/git --git-dir=/home/marty/.dotfiles/ --work-tree=/home/marty' +# enables git management through dot command +alias dot='/usr/bin/git --git-dir=/home/marty/.dotfiles/ --work-tree=/home/marty' # The following commands are run on your git repo if you installed through the script # You can invoke them manually, but it's not recommended to keep them active in here. @@ -16,8 +16,8 @@ alias dotfiles='/usr/bin/git --git-dir=/home/marty/.dotfiles/ --work-tree=/home/ # Read more: https://stackoverflow.com/questions/4308610/how-to-ignore-certain-files-in-git # and: https://stackoverflow.com/questions/653454/how-do-you-make-git-ignore-files-without-using-gitignore # -#dotfiles update-index --no-assume-unchanged README.md -#dotfiles update-index --assume-unchanged README.md +#dot update-index --no-assume-unchanged README.md +#dot update-index --assume-unchanged README.md ## Make git not show untracked files (i.e. ALL other files in your home dir) -#dotfiles config status.showUntrackedFiles no +#dot config status.showUntrackedFiles no From 655967427f521a51b2a0950b58e67cd1808e4e60 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Mar 2019 14:55:38 +0100 Subject: [PATCH 07/16] add xcape as default package for x group used to map capslock both to control (when pressed together with other keys) and escape (when pressed on its own). --- .config/bootstrap/pkg/x.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/bootstrap/pkg/x.csv b/.config/bootstrap/pkg/x.csv index 3781719..cee4640 100644 --- a/.config/bootstrap/pkg/x.csv +++ b/.config/bootstrap/pkg/x.csv @@ -3,6 +3,7 @@ ,xorg-xauth,"manages X authentication settings." ,xclip,"allows for copying and pasting from the command line." ,xdotool,"provides window action utilities on the command line." +,xcape,"allows using keys for different things whether pressed on their own or with others. For example, map capslock to escape." ,i3-gaps,"is the main graphical user interface and window manager." ,i3blocks,"is the status bar block provider for i3." ,i3status,"is the status bar for i3." From 283f86a6ba99c44acbe9a85dd7975f25e34e9b51 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Mar 2019 15:22:17 +0100 Subject: [PATCH 08/16] rename fs to base packages, add topgrade --- .config/bootstrap/pkg/{fs.csv => base.csv} | 1 + .config/zsh/scripts/syu | 1 + 2 files changed, 2 insertions(+) rename .config/bootstrap/pkg/{fs.csv => base.csv} (59%) create mode 120000 .config/zsh/scripts/syu diff --git a/.config/bootstrap/pkg/fs.csv b/.config/bootstrap/pkg/base.csv similarity index 59% rename from .config/bootstrap/pkg/fs.csv rename to .config/bootstrap/pkg/base.csv index 77db957..45c8ad7 100644 --- a/.config/bootstrap/pkg/fs.csv +++ b/.config/bootstrap/pkg/base.csv @@ -1,2 +1,3 @@ ,ntfs-3g,"allows accessing NTFS partitions." ,dosfstools,"allows your computer to access dos-like filesystems." +,topgrade,"tries to be your universal updater running everything in one go." diff --git a/.config/zsh/scripts/syu b/.config/zsh/scripts/syu new file mode 120000 index 0000000..76b3f31 --- /dev/null +++ b/.config/zsh/scripts/syu @@ -0,0 +1 @@ +/usr/bin/topgrade \ No newline at end of file From 4eb00e69155baae256aa32fb20eb4a5f04c85ca3 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Mar 2019 15:47:07 +0100 Subject: [PATCH 09/16] fix XDG_CONFIG_HOME naming --- .config/tmux/tmux.conf | 4 +--- .config/zsh/5-install-tmux-plugin-manager | 2 +- .profile | 3 +-- .zshrc | 6 +++--- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 1232fcf..ed86395 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -50,13 +50,11 @@ set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' #run-shell ~/.tmux-plugins/resurrect/resurrect.tmux set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' -# Recently removed due to causing too many incompatibilities with how I want it set up -#set -g @plugin 'tmux-plugins/tmux-pain-control' set -g @plugin 'tmux-plugins/tmux-yank' set -g @plugin 'tmux-plugins/tmux-prefix-highlight' set -g @plugin 'Morantron/tmux-fingers' -run -b "${TMUX_PLUGIN_MANAGER_PATH}/tpm/tpm" +run "${TMUX_PLUGIN_MANAGER_PATH}/tpm/tpm" ##################### ## 3. KEYBINDINGS ## diff --git a/.config/zsh/5-install-tmux-plugin-manager b/.config/zsh/5-install-tmux-plugin-manager index f790f20..8452097 100644 --- a/.config/zsh/5-install-tmux-plugin-manager +++ b/.config/zsh/5-install-tmux-plugin-manager @@ -1,6 +1,6 @@ # Clone tmux plugin manager if not existing if [[ -z "$TPM_PARENT_DIR" ]]; then - TPM_PARENT_DIR=${XDG_CONFIG_DIR:-$HOME/.config}/tmux + TPM_PARENT_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/tmux fi if [[ ! -f $TPM_PARENT_DIR/plugins/tpm/tpm ]]; then diff --git a/.profile b/.profile index 2f62290..aaa87e5 100644 --- a/.profile +++ b/.profile @@ -1,5 +1,4 @@ -export XDG_CONFIG_DIR="$HOME/.config" -export XDG_CONFIG_HOME=$XDG_CONFIG_DIR +export XDG_CONFIG_HOME="$HOME/.config" export XDG_CACHE_HOME="$HOME/.cache" export EDITOR=nvim diff --git a/.zshrc b/.zshrc index c392c02..672ce74 100644 --- a/.zshrc +++ b/.zshrc @@ -29,7 +29,7 @@ print_dbg() { # Clone zgen if you haven't already check_zgen_installation() { if [[ -z "$ZGEN_PARENT_DIR" ]]; then - ZGEN_PARENT_DIR=${${XDG_CONFIG_DIR}:="$HOME/.config/"} + ZGEN_PARENT_DIR=${${XDG_CONFIG_HOME}:="$HOME/.config/"} ZGEN_DIR="$ZGEN_PARENT_DIR/zgen" fi if [[ ! -f $ZGEN_DIR/zgen.zsh ]]; then @@ -90,9 +90,9 @@ load_config_files() { # Set ZSH_CONFIG_DIR to default to ~/.config/zsh, or let user override # Exit early if no configuration directory has been found -if [ ! -d ${ZSH_CONFIG_DIR:="${XDG_CONFIG_DIR:-$HOME/.config}/zsh"} ]; then +if [ ! -d ${ZSH_CONFIG_DIR:="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"} ]; then # If the user explicitly overrode the path give him an error - if [ ! $ZSH_CONFIG_DIR = "${XDG_CONFIG_DIR:-$HOME/.config/}/zsh" ]; then + if [ ! $ZSH_CONFIG_DIR = "${XDG_CONFIG_HOME:-$HOME/.config/}/zsh" ]; then printf "\$ZSH_CONFIG_DIR=$ZSH_CONFIG_DIR/ does not exist.\n" fi PS1="$HOME $ " From d11f04dbf69f5e3c5e4afe9893e606b71b1b4a45 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Mar 2019 15:57:24 +0100 Subject: [PATCH 10/16] rename zsh script files to end with .zsh --- ...n-control-commands => 0-dotfiles-version-control-commands.zsh} | 0 .config/zsh/{0-history => 0-history.zsh} | 0 .../zsh/{0-inline-glob-expansion => 0-inline-glob-expansion.zsh} | 0 ...-screen-information-dialog => 0-screen-information-dialog.zsh} | 0 .../zsh/{0-set-locale-to-us-utf8 => 0-set-locale-to-us-utf8.zsh} | 0 ...elling-correction => 1-enable-command-spelling-correction.zsh} | 0 ...ing-processes => 1-report-time-for-long-running-processes.zsh} | 0 ...-up-powerlevel9k-theming => 1-set-up-powerlevel9k-theming.zsh} | 0 ...-agent-autoconfiguration => 1-ssh-agent-autoconfiguration.zsh} | 0 .config/zsh/{20-essential => 20-essential.zsh} | 0 .config/zsh/{21-integrations => 21-integrations.zsh} | 0 .config/zsh/{22-autocompletions => 22-autocompletions.zsh} | 0 ...{3-configure-autocompletion => 3-configure-autocompletion.zsh} | 0 ...cd-dot-dot-behavior => 3-disable-enhancd-dot-dot-behavior.zsh} | 0 ...tall-tmux-plugin-manager => 5-install-tmux-plugin-manager.zsh} | 0 .config/zsh/{6-base => 6-base.zsh} | 0 .config/zsh/{6-l-calls-k => 6-l-calls-k.zsh} | 0 .config/zsh/{6-mkcd => 6-mkcd.zsh} | 0 .config/zsh/{6-newest-files => 6-newest-files.zsh} | 0 ...{6-nvim-to-vim-if-installed => 6-nvim-to-vim-if-installed.zsh} | 0 .config/zsh/{6-ssht-tmux-attaching => 6-ssht-tmux-attaching.zsh} | 0 ...-deduplicate-path-variable => 9-deduplicate-path-variable.zsh} | 0 22 files changed, 0 insertions(+), 0 deletions(-) rename .config/zsh/{0-dotfiles-version-control-commands => 0-dotfiles-version-control-commands.zsh} (100%) rename .config/zsh/{0-history => 0-history.zsh} (100%) rename .config/zsh/{0-inline-glob-expansion => 0-inline-glob-expansion.zsh} (100%) rename .config/zsh/{0-screen-information-dialog => 0-screen-information-dialog.zsh} (100%) rename .config/zsh/{0-set-locale-to-us-utf8 => 0-set-locale-to-us-utf8.zsh} (100%) rename .config/zsh/{1-enable-command-spelling-correction => 1-enable-command-spelling-correction.zsh} (100%) rename .config/zsh/{1-report-time-for-long-running-processes => 1-report-time-for-long-running-processes.zsh} (100%) rename .config/zsh/{1-set-up-powerlevel9k-theming => 1-set-up-powerlevel9k-theming.zsh} (100%) rename .config/zsh/{1-ssh-agent-autoconfiguration => 1-ssh-agent-autoconfiguration.zsh} (100%) rename .config/zsh/{20-essential => 20-essential.zsh} (100%) rename .config/zsh/{21-integrations => 21-integrations.zsh} (100%) rename .config/zsh/{22-autocompletions => 22-autocompletions.zsh} (100%) rename .config/zsh/{3-configure-autocompletion => 3-configure-autocompletion.zsh} (100%) rename .config/zsh/{3-disable-enhancd-dot-dot-behavior => 3-disable-enhancd-dot-dot-behavior.zsh} (100%) rename .config/zsh/{5-install-tmux-plugin-manager => 5-install-tmux-plugin-manager.zsh} (100%) rename .config/zsh/{6-base => 6-base.zsh} (100%) rename .config/zsh/{6-l-calls-k => 6-l-calls-k.zsh} (100%) rename .config/zsh/{6-mkcd => 6-mkcd.zsh} (100%) rename .config/zsh/{6-newest-files => 6-newest-files.zsh} (100%) rename .config/zsh/{6-nvim-to-vim-if-installed => 6-nvim-to-vim-if-installed.zsh} (100%) rename .config/zsh/{6-ssht-tmux-attaching => 6-ssht-tmux-attaching.zsh} (100%) rename .config/zsh/{9-deduplicate-path-variable => 9-deduplicate-path-variable.zsh} (100%) diff --git a/.config/zsh/0-dotfiles-version-control-commands b/.config/zsh/0-dotfiles-version-control-commands.zsh similarity index 100% rename from .config/zsh/0-dotfiles-version-control-commands rename to .config/zsh/0-dotfiles-version-control-commands.zsh diff --git a/.config/zsh/0-history b/.config/zsh/0-history.zsh similarity index 100% rename from .config/zsh/0-history rename to .config/zsh/0-history.zsh diff --git a/.config/zsh/0-inline-glob-expansion b/.config/zsh/0-inline-glob-expansion.zsh similarity index 100% rename from .config/zsh/0-inline-glob-expansion rename to .config/zsh/0-inline-glob-expansion.zsh diff --git a/.config/zsh/0-screen-information-dialog b/.config/zsh/0-screen-information-dialog.zsh similarity index 100% rename from .config/zsh/0-screen-information-dialog rename to .config/zsh/0-screen-information-dialog.zsh diff --git a/.config/zsh/0-set-locale-to-us-utf8 b/.config/zsh/0-set-locale-to-us-utf8.zsh similarity index 100% rename from .config/zsh/0-set-locale-to-us-utf8 rename to .config/zsh/0-set-locale-to-us-utf8.zsh diff --git a/.config/zsh/1-enable-command-spelling-correction b/.config/zsh/1-enable-command-spelling-correction.zsh similarity index 100% rename from .config/zsh/1-enable-command-spelling-correction rename to .config/zsh/1-enable-command-spelling-correction.zsh diff --git a/.config/zsh/1-report-time-for-long-running-processes b/.config/zsh/1-report-time-for-long-running-processes.zsh similarity index 100% rename from .config/zsh/1-report-time-for-long-running-processes rename to .config/zsh/1-report-time-for-long-running-processes.zsh diff --git a/.config/zsh/1-set-up-powerlevel9k-theming b/.config/zsh/1-set-up-powerlevel9k-theming.zsh similarity index 100% rename from .config/zsh/1-set-up-powerlevel9k-theming rename to .config/zsh/1-set-up-powerlevel9k-theming.zsh diff --git a/.config/zsh/1-ssh-agent-autoconfiguration b/.config/zsh/1-ssh-agent-autoconfiguration.zsh similarity index 100% rename from .config/zsh/1-ssh-agent-autoconfiguration rename to .config/zsh/1-ssh-agent-autoconfiguration.zsh diff --git a/.config/zsh/20-essential b/.config/zsh/20-essential.zsh similarity index 100% rename from .config/zsh/20-essential rename to .config/zsh/20-essential.zsh diff --git a/.config/zsh/21-integrations b/.config/zsh/21-integrations.zsh similarity index 100% rename from .config/zsh/21-integrations rename to .config/zsh/21-integrations.zsh diff --git a/.config/zsh/22-autocompletions b/.config/zsh/22-autocompletions.zsh similarity index 100% rename from .config/zsh/22-autocompletions rename to .config/zsh/22-autocompletions.zsh diff --git a/.config/zsh/3-configure-autocompletion b/.config/zsh/3-configure-autocompletion.zsh similarity index 100% rename from .config/zsh/3-configure-autocompletion rename to .config/zsh/3-configure-autocompletion.zsh diff --git a/.config/zsh/3-disable-enhancd-dot-dot-behavior b/.config/zsh/3-disable-enhancd-dot-dot-behavior.zsh similarity index 100% rename from .config/zsh/3-disable-enhancd-dot-dot-behavior rename to .config/zsh/3-disable-enhancd-dot-dot-behavior.zsh diff --git a/.config/zsh/5-install-tmux-plugin-manager b/.config/zsh/5-install-tmux-plugin-manager.zsh similarity index 100% rename from .config/zsh/5-install-tmux-plugin-manager rename to .config/zsh/5-install-tmux-plugin-manager.zsh diff --git a/.config/zsh/6-base b/.config/zsh/6-base.zsh similarity index 100% rename from .config/zsh/6-base rename to .config/zsh/6-base.zsh diff --git a/.config/zsh/6-l-calls-k b/.config/zsh/6-l-calls-k.zsh similarity index 100% rename from .config/zsh/6-l-calls-k rename to .config/zsh/6-l-calls-k.zsh diff --git a/.config/zsh/6-mkcd b/.config/zsh/6-mkcd.zsh similarity index 100% rename from .config/zsh/6-mkcd rename to .config/zsh/6-mkcd.zsh diff --git a/.config/zsh/6-newest-files b/.config/zsh/6-newest-files.zsh similarity index 100% rename from .config/zsh/6-newest-files rename to .config/zsh/6-newest-files.zsh diff --git a/.config/zsh/6-nvim-to-vim-if-installed b/.config/zsh/6-nvim-to-vim-if-installed.zsh similarity index 100% rename from .config/zsh/6-nvim-to-vim-if-installed rename to .config/zsh/6-nvim-to-vim-if-installed.zsh diff --git a/.config/zsh/6-ssht-tmux-attaching b/.config/zsh/6-ssht-tmux-attaching.zsh similarity index 100% rename from .config/zsh/6-ssht-tmux-attaching rename to .config/zsh/6-ssht-tmux-attaching.zsh diff --git a/.config/zsh/9-deduplicate-path-variable b/.config/zsh/9-deduplicate-path-variable.zsh similarity index 100% rename from .config/zsh/9-deduplicate-path-variable rename to .config/zsh/9-deduplicate-path-variable.zsh From 23fe092d7f495b7d1eaa4a9c04fbbacad3fb70de Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Mar 2019 16:01:30 +0100 Subject: [PATCH 11/16] move scripts to script directory --- .config/{zsh/scripts => scripts/bin}/syu | 0 .config/{zsh/scripts => scripts/bin}/tm | 0 .config/{zsh/scripts => scripts/bin}/umpv | 0 .config/{ => scripts}/bootstrap/install.sh | 0 .config/{ => scripts}/bootstrap/pkg/base.csv | 0 .config/{ => scripts}/bootstrap/pkg/dev.csv | 0 .config/{ => scripts}/bootstrap/pkg/media.csv | 0 .config/{ => scripts}/bootstrap/pkg/network.csv | 0 .config/{ => scripts}/bootstrap/pkg/shell.csv | 0 .config/{ => scripts}/bootstrap/pkg/untested.csv | 0 .config/{ => scripts}/bootstrap/pkg/x.csv | 0 .zshrc | 4 +++- 12 files changed, 3 insertions(+), 1 deletion(-) rename .config/{zsh/scripts => scripts/bin}/syu (100%) rename .config/{zsh/scripts => scripts/bin}/tm (100%) rename .config/{zsh/scripts => scripts/bin}/umpv (100%) rename .config/{ => scripts}/bootstrap/install.sh (100%) rename .config/{ => scripts}/bootstrap/pkg/base.csv (100%) rename .config/{ => scripts}/bootstrap/pkg/dev.csv (100%) rename .config/{ => scripts}/bootstrap/pkg/media.csv (100%) rename .config/{ => scripts}/bootstrap/pkg/network.csv (100%) rename .config/{ => scripts}/bootstrap/pkg/shell.csv (100%) rename .config/{ => scripts}/bootstrap/pkg/untested.csv (100%) rename .config/{ => scripts}/bootstrap/pkg/x.csv (100%) diff --git a/.config/zsh/scripts/syu b/.config/scripts/bin/syu similarity index 100% rename from .config/zsh/scripts/syu rename to .config/scripts/bin/syu diff --git a/.config/zsh/scripts/tm b/.config/scripts/bin/tm similarity index 100% rename from .config/zsh/scripts/tm rename to .config/scripts/bin/tm diff --git a/.config/zsh/scripts/umpv b/.config/scripts/bin/umpv similarity index 100% rename from .config/zsh/scripts/umpv rename to .config/scripts/bin/umpv diff --git a/.config/bootstrap/install.sh b/.config/scripts/bootstrap/install.sh similarity index 100% rename from .config/bootstrap/install.sh rename to .config/scripts/bootstrap/install.sh diff --git a/.config/bootstrap/pkg/base.csv b/.config/scripts/bootstrap/pkg/base.csv similarity index 100% rename from .config/bootstrap/pkg/base.csv rename to .config/scripts/bootstrap/pkg/base.csv diff --git a/.config/bootstrap/pkg/dev.csv b/.config/scripts/bootstrap/pkg/dev.csv similarity index 100% rename from .config/bootstrap/pkg/dev.csv rename to .config/scripts/bootstrap/pkg/dev.csv diff --git a/.config/bootstrap/pkg/media.csv b/.config/scripts/bootstrap/pkg/media.csv similarity index 100% rename from .config/bootstrap/pkg/media.csv rename to .config/scripts/bootstrap/pkg/media.csv diff --git a/.config/bootstrap/pkg/network.csv b/.config/scripts/bootstrap/pkg/network.csv similarity index 100% rename from .config/bootstrap/pkg/network.csv rename to .config/scripts/bootstrap/pkg/network.csv diff --git a/.config/bootstrap/pkg/shell.csv b/.config/scripts/bootstrap/pkg/shell.csv similarity index 100% rename from .config/bootstrap/pkg/shell.csv rename to .config/scripts/bootstrap/pkg/shell.csv diff --git a/.config/bootstrap/pkg/untested.csv b/.config/scripts/bootstrap/pkg/untested.csv similarity index 100% rename from .config/bootstrap/pkg/untested.csv rename to .config/scripts/bootstrap/pkg/untested.csv diff --git a/.config/bootstrap/pkg/x.csv b/.config/scripts/bootstrap/pkg/x.csv similarity index 100% rename from .config/bootstrap/pkg/x.csv rename to .config/scripts/bootstrap/pkg/x.csv diff --git a/.zshrc b/.zshrc index 672ce74..3d8199a 100644 --- a/.zshrc +++ b/.zshrc @@ -15,6 +15,8 @@ # #### +autoload zmv + ## Show debug information # # ZSH_SETUP_SHOW_DEBUG="true" @@ -144,7 +146,7 @@ load_config_files $ZSH_CONFIG_DIR 3456789 # fi # put personal scripts on the PATH to be callable -export PATH="$(du $ZSH_CONFIG_DIR/scripts/ | cut -f2 | tr '\n' ':')$PATH" +export PATH="$(du $XDG_CONFIG_HOME/scripts/bin | cut -f2 | tr '\n' ':')$PATH" unset ZSH_CONFIG_DIR # unset ZGEN_DIR -- Needs to remain set for some plugins to function From 02277a3ae2212f94060d530a21e07b724a8049bd Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Mar 2019 16:50:04 +0100 Subject: [PATCH 12/16] allow toggling i3 gaps with mod+g/G --- .config/i3/config | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.config/i3/config b/.config/i3/config index 5a7945e..4d6531b 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -94,6 +94,14 @@ bindsym $mod+a focus parent # focus the child container #bindsym $mod+d focus child +# disable titles and borders, necessary for i3gaps to work apparently +for_window [class="^.*"] border pixel 0 +# no gaps if there is only 1 window - I am satisfied with choosing manually +#smart_gaps on +# enable / disable gaps (g disables, G enables) +bindsym $mod+shift+g gaps inner current set 10; gaps outer current set 10 +bindsym $mod+g gaps inner current set 0; gaps outer current set 0 + # Define names for default workspaces for which we configure key bindings later on. # We use variables to avoid repeating the names in multiple places. set $ws1 "1" From 926b73e1b8059ff5a6a79d4c292950ba412456eb Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Mar 2019 17:32:31 +0100 Subject: [PATCH 13/16] Switch static workspaces with icons --- .config/i3/config | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.config/i3/config b/.config/i3/config index 4d6531b..cb6aaf6 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -104,8 +104,8 @@ bindsym $mod+g gaps inner current set 0; gaps outer current set 0 # Define names for default workspaces for which we configure key bindings later on. # We use variables to avoid repeating the names in multiple places. -set $ws1 "1" -set $ws2 "2" +set $ws1 "1:" +set $ws2 "2:" set $ws3 "3" set $ws4 "4" set $ws5 "5" @@ -170,7 +170,8 @@ bindsym $mod+r mode "resize" # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) bar { - font $font + strip_workspace_numbers yes + font $font position bottom colors { background #232323 From 83a74058c859dc0fc0db1684b545a06bf5de15c0 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Mar 2019 17:54:27 +0100 Subject: [PATCH 14/16] rename testing package group --- .config/scripts/bootstrap/pkg/{untested.csv => testing.csv} | 2 ++ 1 file changed, 2 insertions(+) rename .config/scripts/bootstrap/pkg/{untested.csv => testing.csv} (66%) diff --git a/.config/scripts/bootstrap/pkg/untested.csv b/.config/scripts/bootstrap/pkg/testing.csv similarity index 66% rename from .config/scripts/bootstrap/pkg/untested.csv rename to .config/scripts/bootstrap/pkg/testing.csv index 0a22a67..8a867ea 100644 --- a/.config/scripts/bootstrap/pkg/untested.csv +++ b/.config/scripts/bootstrap/pkg/testing.csv @@ -1,3 +1,5 @@ #TAG,NAME IN REPO (or git url),PURPOSE (should be a verb phrase to sound right while installing) A,enpass-bin,"is a cross-platform personal password manager with gui." ,gtk3,"is a gui toolkit, necessary for enpass-bin to work. (enpass forgets to install it)" +,compton,"is a compositor for X that works well with i3." +A,flashfocus,"is a simple toll that flashes any window which gains focus." From 82aab0ce29ea387b88991b574c5941d384939faf Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Mar 2019 17:55:18 +0100 Subject: [PATCH 15/16] add compton and flashfocus to x startup if they exist --- .xinitrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.xinitrc b/.xinitrc index 7edb06b..1a7b5e2 100644 --- a/.xinitrc +++ b/.xinitrc @@ -48,4 +48,9 @@ setxkbmap -option terminate:ctrl_alt_bksp # Needs xcape package installed. https://github.com/alols/xcape type xcape >/dev/null 2>&1 && xcape -e 'Control_L=Escape' +# if compton exists then we can start it as our compositor +type compton >/dev/null 2>&1 && compton & +# same deal with flashfocus as our active window indicator +type flashfocus >/dev/null 2>&1 && flashfocus & + type i3 >/dev/null 2>&1 && exec i3 From 22e8c4b0c6c6f5f485eb264d236db4b7b94bec18 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Mar 2019 18:16:22 +0100 Subject: [PATCH 16/16] add feh for wallpaper --- .config/i3/config | 3 +++ .config/scripts/bootstrap/pkg/testing.csv | 1 + 2 files changed, 4 insertions(+) diff --git a/.config/i3/config b/.config/i3/config index cb6aaf6..f71dcb4 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -191,3 +191,6 @@ bindsym $mod+Shift+s exec --no-startup-id `[ $(printf "NO\nYES" | dmenu \ -nf "#7777bb" -i -p "Exit i3 X session?") = "YES" ] && i3-msg exit` # lock i3 screen bindsym $mod+Shift+p exec i3lock + +# set a pretty wallpaper +exec_always --no-startup-id feh --bg-scale ~/Pictures/wall.jpg diff --git a/.config/scripts/bootstrap/pkg/testing.csv b/.config/scripts/bootstrap/pkg/testing.csv index 8a867ea..f78d70d 100644 --- a/.config/scripts/bootstrap/pkg/testing.csv +++ b/.config/scripts/bootstrap/pkg/testing.csv @@ -3,3 +3,4 @@ A,enpass-bin,"is a cross-platform personal password manager with gui." ,gtk3,"is a gui toolkit, necessary for enpass-bin to work. (enpass forgets to install it)" ,compton,"is a compositor for X that works well with i3." A,flashfocus,"is a simple toll that flashes any window which gains focus." +,feh,"is a simple image viewer. Unfortunately it does not play well with tiled windows."