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 9b0da3a2477ac90a53677a0416ea0aba37330d9f
parent d4f896840121a2bf23936cb34ae6cfb4c3e99794
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Thu,  6 Jun 2019 10:44:57 +0200

Remove shortcuts, add dwm status refresh script

Diffstat:
M.Xresources | 4++--
D.bmdirs | 48------------------------------------------------
D.bmfiles | 19-------------------
A.local/bin/dwmstatus-refresh | 6++++++
D.local/bin/shortcuts | 36------------------------------------
5 files changed, 8 insertions(+), 105 deletions(-)

diff --git a/.Xresources b/.Xresources @@ -5,8 +5,8 @@ Xcursor.size: 16 ! terminal colors ------------------------------------------------------------ ! see https://ciembor.github.io/4bit -*.foreground: #c5c8c6 -*.background: #1d1f21 +*.foreground: #4d4d4c +*.background: #ffffff /* black */ *color0: #434944 diff --git a/.bmdirs b/.bmdirs @@ -1,48 +0,0 @@ -# Run ~/bin/shortcuts after editing -aa ~/articles -ao ~/articles/own -ag ~/articles/glaciology_sedimentology -bin ~/bin -bb ~/books -bc ~/books/cheatsheets -bd ~/books/db -bf ~/books/fiction -bg ~/books/golang -bl ~/books/linux -bn ~/books/netsec -bp ~/books/photography -by ~/books/python -bs ~/books/science -bv ~/books/vim -cf ~/.config -cc ~/code/ -c1 ~/code/continuum_till_water/1d_fd_simple_shear/ -cg ~/code/geodatahub -cm ~/code/mst -cs ~/code/sphere -cw ~/code/webpage -dd ~/doc -dc ~/doc/camera -df ~/doc/finances -dg ~/doc/geodatahub -dp ~/doc/photography -dr ~/doc/receipts -dt ~/doc/thinkpad_x220 -dv ~/doc/vigtige_papirer -e /etc -h ~/ -mnt /mnt -M ~/music -pp ~/photos -srv /mnt/ad-server-volumes/ext2 -t ~/tmp -u ~/uni -ue ~/uni/events -up ~/uni/postdoc -upr ~/uni/presentations -uj ~/uni/job -ujc ~/uni/job/cv -vv ~/videos -vp ~/videos/photo -vs ~/videos/science -vt ~/videos/tech diff --git a/.bmfiles b/.bmfiles @@ -1,19 +0,0 @@ -# Run ~/bin/shortcuts after editing -bf ~/.bmfiles -bd ~/.bmdirs -cfb ~/.config/i3/i3blocks -cfd ~/lib/dwm/config.h -cfm ~/.mutt/muttrc -cfn ~/.config/newsboat/config -cfr ~/.config/ranger/rc.conf -cfs ~/lib/st/config.h -cfS ~/lib/slstatus/config.h -cft ~/lib/tabbed/config.h -cfi ~/.config/i3/config -cfu ~/.config/newsboat/urls -cfv ~/.vim/vimrc -cfx ~/.xinitrc -cfX ~/.Xresources -cfz ~/.zshrc -cv ~/uni/job/cv/cv.tex -eb ~/articles/own/BIB.bib diff --git a/.local/bin/dwmstatus-refresh b/.local/bin/dwmstatus-refresh @@ -0,0 +1,6 @@ +#!/bin/sh + +# From lukesmithxyz/voidrice + +kill "$(pstree -lp |\ + grep -- -dwmstatus\([0-9] | sed "s/.*sleep(\([0-9]\+\)).*/\1/")" diff --git a/.local/bin/shortcuts b/.local/bin/shortcuts @@ -1,36 +0,0 @@ -#!/bin/bash -# By Luke Smith, https://lukesmith.xyz with modifications by Anders Damsgaard - -# Shell rc file (i.e. bash vs. zsh, etc.) -shellrc="$HOME/.commands.sh" - -# Bookmark file locations -bmdirs="$HOME/.bmdirs" -bmfiles="$HOME/.bmfiles" - -# Output locations. Unactivated progs should go to /dev/null. -shell_shortcuts="$HOME/.shortcuts" -ranger_shortcuts="$HOME/.config/ranger/shortcuts.conf" -vifm_shortcuts="$HOME/.config/vifm/vifmshortcuts" - -# Remove, prepare files -#echo "abbr \\" > "$fish_shortcuts" -printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts" -echo "alias \\" > "$shell_shortcuts" -printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts" - -# Ensure text of argument 1 exists in the file argument 2 -ensure() { (grep "$1" "$2")>/dev/null 2>&1 || echo "$1" >> "$2" ;} - -ensure "[ -f ~/.shortcuts ] && source ~/.shortcuts" "$shellrc" -ensure 'source ~/.config/ranger/shortcuts.conf' "$HOME/.config/ranger/rc.conf" - -# Format the `bmdirs` file in the correct syntax and sent it to all three configs. -sed "s/#.*$//;/^$/d" "$bmdirs" | tee >(awk '{print "g"$1"=\"cd "$2"\" \\"}' >> "$shell_shortcuts") \ - >(awk '{print "map g" $1, ":cd", $2 "<CR>\nmap t" $1, "<tab>:cd", $2 "<CR><tab>\nmap M" $1, "<tab>:cd", $2 "<CR><tab>:mo<CR>\nmap Y" $1, "<tab>:cd", $2 "<CR><tab>:co<CR>" }' >> "$vifm_shortcuts") \ - | awk '{print "map g"$1" cd "$2"\nmap t"$1" tab_new "$2"\nmap m"$1" shell mv -v %s "$2"\nmap Y"$1" shell cp -rv %s "$2}' >> "$ranger_shortcuts" - -# Format the `configs` file in the correct syntax and sent it to both configs. -sed "s/#.*$//;/^$/d" "$bmfiles" | tee >(awk '{print $1"=\"$EDITOR "$2"\" \\"}' >> "$shell_shortcuts") \ - >(awk '{print "map", $1, ":e", $2 "<CR>" }' >> "$vifm_shortcuts") \ - | awk '{print "map "$1" shell $EDITOR "$2}' >> "$ranger_shortcuts"