diff --git a/.config/assets/system_screenshot.png b/.config/assets/system_screenshot.png new file mode 100644 index 00000000..f533f6a8 Binary files /dev/null and b/.config/assets/system_screenshot.png differ diff --git a/.config/git/config b/.config/git/config index f2e33472..22070480 100644 --- a/.config/git/config +++ b/.config/git/config @@ -14,9 +14,13 @@ diff = auto branch = auto [alias] + a = add + au = add -u + p = push + pu = pull st = status -uno co = checkout - ci = commit + cm = commit -m br = branch ff = merge origin diff = diff --ignore-space-change diff --git a/.config/polybar/config b/.config/polybar/config index 7c487276..f51e0f0c 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -16,6 +16,7 @@ yellow = #fabd2f [bar/main] ; polybar settings enable-ipc = true +override-redirect = false height = 20 monitor = ${env:MONITOR:} width = 100% @@ -40,7 +41,7 @@ wm-restack = i3 scroll-up = i3wm-wsnext scroll-down = i3wm-wsprev modules-left = i3 -modules-right = sys_updates bluetooth sys_temp cpu memory volume wifi ethernet battery date +modules-right = sys_updates bluetooth sys_temp cpu memory volume wifi battery date ; Where to display programs that put something system tray tray-position = right @@ -52,8 +53,7 @@ full-at = 98 ; orange denotes charging format-charging = -format-charging-prefix = "Batt: " -label-charging = %percentage%% +label-charging = Batt: %percentage%% label-charging-overline=${colors.orange} label-charging-underline=${colors.orange} @@ -82,7 +82,7 @@ label = %{A1:$TERMINAL -e htop >/dev/null 2>&1 &:}CPU: %percentage%%%{A} [module/date] type = internal/date -interval = 1 +interval = 5 date = "(%a) %b %d %Y" time = "%I:%M:%S%p" format-prefix-foreground = ${colors.gray} diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 0e403b6f..762f374e 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -1,4 +1,4 @@ -# Config for the Zoomer Shell +#Config for the Zoomer Shell # Enable colors and change prompt: autoload -U colors && colors # Load colors @@ -9,7 +9,7 @@ stty stop undef # Disable ctrl-s to freeze terminal. # History in cache directory: HISTSIZE=10000 SAVEHIST=10000 -HISTFILE=~/.cache/zsh/history +HISTFILE=${XDG_CONFIG_HOME:-$HOME/.config}/zsh/history # Load aliases and shortcuts if existent. [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc" diff --git a/.local/bin/delete_certain_known_hosts b/.local/bin/delete_certain_known_hosts new file mode 100755 index 00000000..1eb2a2e3 --- /dev/null +++ b/.local/bin/delete_certain_known_hosts @@ -0,0 +1,32 @@ +#!/bin/bash +# Works on all GNU systems and tested on MacOS 10.15.13 +# Deletes certain lines of ~/.ssh/known_hosts +# Check if any args passed +if [ $# -eq 0 ]; then + echo "Usage: ./delete_certain_known_hosts 3 5 7 23" + echo "Will catch duplicate line numbers" + exit 1 +fi +# Set variables +known_hosts_path=~/.ssh/known_hosts +lines_in_known_hosts=$(wc -l "$known_hosts_path" | awk '{print $1}') +lines_to_delete="" +# Dedupe, sort numerically, and create array from args string +IFS=' ' +deduped_args=$(echo "$@" | xargs -n1 | sort -nu | xargs) +read -r -a delete_these_lines <<< "$deduped_args" +# Loop through creating sed expression +for var in "${delete_these_lines[@]}"; do +if [[ "$var" -gt "$lines_in_known_hosts" ]]; then + echo "$var is invalid line in $lines_in_known_hosts line $known_hosts_path" +else + lines_to_delete+="${var}d;" +fi +done +# Output information to user about what happened +if [[ -z "$lines_to_delete" ]]; then + echo "All arguments passed were invalid lines in $known_hosts_path" +else + sed -i'' -e "$lines_to_delete" "$known_hosts_path" + echo "Deleted lines $(echo $(echo "$lines_to_delete" | sed 's/d;/, /g') | sed 's/.$//' )" +fi diff --git a/.local/bin/dmenu_displayselect b/.local/bin/dmenu_displayselect index cba424f8..5788e4fd 100755 --- a/.local/bin/dmenu_displayselect +++ b/.local/bin/dmenu_displayselect @@ -1,5 +1,5 @@ #!/bin/sh -set -e +set -e # A UI for detecting and selecting all displays. Probes xrandr for connected # displays and lets user select one to use. User may also select "manual @@ -53,14 +53,14 @@ multimon() { # Multi-monitor handler. esac ;} load_screen_layout() { # ~/.screenlayout loader - # Get all screen configurations in ~.screenlayout/ + # Get all screen configurations in ~.screenlayout/ if [[ $(echo $screen_layouts | wc -l) -eq 2 ]]; then notify-send --urgency=critical "~/.screenlayout seems to be empty" else layout_name=$(echo "$screen_layouts" | dmenu -i -p "Screen layouts:") chosen_layout=$(find ~/.screenlayout -type f | grep $layout_name) echo "$chosen_layout" - arandr $chosen_layout 2>/dev/null || notify-send --urgency=critical "Error loading screen layout: ~/.screenlayout/$layout_name" && exit + arandr $chosen_layout 2>/dev/null || notify-send --urgency=critical "Error loading screen layout: ~/.screenlayout/$layout_name" fi } @@ -84,4 +84,4 @@ esac setbg # Fix background if screen size/arangement has changed. remaps # Re-remap keys if keyboard added (for laptop bases) -pgrep -x dunst >/dev/null && killall dunst && setsid dunst & # Restart dunst to ensure proper location on screen \ No newline at end of file +pgrep -x dunst >/dev/null && killall dunst && setsid dunst & # Restart dunst to ensure proper location on screen diff --git a/.local/bin/getkeys b/.local/bin/getkeys index 0a0e86e1..343fea34 100755 --- a/.local/bin/getkeys +++ b/.local/bin/getkeys @@ -1,5 +1,5 @@ #!/bin/sh -cat ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/getkeys/"$1" 2>/dev/null && exit +cat ${XDG_DATA_HOME:-$HOME/.local/share}/dotfiles/getkeys/"$1" 2>/dev/null && exit echo "Run command with one of the following arguments for info about that program:" -ls ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/getkeys +ls ${XDG_DATA_HOME:-$HOME/.local/share}/dotfiles/getkeys diff --git a/.local/bin/launch_polybar b/.local/bin/launch_polybar index 38ec8997..de441e91 100755 --- a/.local/bin/launch_polybar +++ b/.local/bin/launch_polybar @@ -4,7 +4,7 @@ #killall -q polybar # Wait until the processes have been shut down -while pgrep -x polybar >/dev/null; do killall -q polybar; done +while pidof polybar >/dev/null; do killall -q polybar; done for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do MONITOR=$m polybar --reload main & diff --git a/.local/bin/showclip b/.local/bin/showclip index d2faff8b..845da7d0 100755 --- a/.local/bin/showclip +++ b/.local/bin/showclip @@ -1,10 +1,9 @@ #!/bin/sh # Display contents of selection via dunst if running. -# Separate script for i3. clip=$(xclip -o -selection clipboard) prim=$(xclip -o -selection primary) -[ -n "$clip" ] && notify-send "Clipboard:" "$clip" -[ -n "$prim" ] && notify-send "Primary:" "$prim" +[ -z "$clip" ] && notify-send "Clipboard is empty" || notify-send "Clipboard:" "$clip" +[ -z "$prim" ] && notify-send "Primary is empty" || notify-send "Primary:" "$prim" diff --git a/README.md b/README.md index 45df141f..92cbd325 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,11 @@
# dotfiles -### personal system dotfiles for arch systems -Vlad Doster - +### personal system dotfiles for arch systems (License: GNU GPLv3) + -License: GNU GPLv3 - -![Image of Arch user](https://github.com/vladdoster/dotfiles/blob/master/.config/assets/arch-user.png) +--- +### Screenshot +