Pushing several updates.

This commit is contained in:
Derek Taylor 2019-05-27 21:05:24 -05:00
parent 2a179d4cac
commit fc9beffc5e
12 changed files with 12 additions and 154 deletions

View File

@ -151,7 +151,7 @@ ex ()
export YAOURT_COLORS="nb=1:pkg=1:ver=1;32:lver=1;45:installed=1;42:grp=1;34:od=1;41;5:votes=1;44:dsc=0:other=1;35"
neofetch
alias lynx='lynx -cfg=~/.lynx/lynx.cfg -lss=~/.lynx/lynx.lss'
alias lynx='lynx -cfg=~/.lynx/lynx.cfg -lss=~/.lynx/lynx.lss -vikeys'
alias config='/usr/bin/git --git-dir=/home/dt/dotfiles --work-tree=/home/dt'
alias tb="nc termbin.com 9999"

View File

@ -2,7 +2,7 @@
-- install xmobar with these flags: --flags="with_alsa" --flags="with_mpd" --flags="with_xft" OR --flags="all_extensions"
-- you can find weather location codes here: http://weather.noaa.gov/index.html
Config { font = "xft:Mononoki Nerd Font:pixelsize=14:antialias=true:hinting=true"
Config { font = "xft:Mononoki Nerd Font:pixelsize=12:antialias=true:hinting=true"
, bgColor = "#292d3e"
, fgColor = "#bbc5ff"
, position = Top

View File

@ -2,7 +2,7 @@
-- install xmobar with these flags: --flags="with_alsa" --flags="with_mpd" --flags="with_xft" OR --flags="all_extensions"
-- you can find weather location codes here: http://weather.noaa.gov/index.html
Config { font = "xft:Mononoki Nerd Font:pixelsize=14:antialias=true:hinting=true"
Config { font = "xft:Mononoki Nerd Font:pixelsize=12:antialias=true:hinting=true"
, bgColor = "#292d3e"
, fgColor = "#bbc5ff"
, position = Top

View File

@ -2,7 +2,7 @@
-- install xmobar with these flags: --flags="with_alsa" --flags="with_mpd" --flags="with_xft" OR --flags="all_extensions"
-- you can find weather location codes here: http://weather.noaa.gov/index.html
Config { font = "xft:Mononoki Nerd Font:pixelsize=14:antialias=true:hinting=true"
Config { font = "xft:Mononoki Nerd Font:pixelsize=12:antialias=true:hinting=true"
, additionalFonts = [ "xft:FontAwesome:pixelsize=13" ]
, bgColor = "#292d3e"
, fgColor = "#bbc5ff"

View File

@ -1,18 +0,0 @@
#!/bin/sh
# dmenu-based directory browser
# to run from terminal:
# source /path/to/dbdb.sh
# or bind it to shortcut:
# echo bind \'\"\\C-o\":\"source /path/to/dbdb.sh\\n\"\' >> ~/.bashrc
chosen="placeholder"
while [ ! -z "$chosen" ]; do
DIRs=$( ls -a1p | grep -P '^\w[^\$/]+/$' | awk -vRS="\n" -vORS="\t" '1')
DOTDs=$( ls -a1p | grep -P '^\.[^\$/]+/$' | awk -vRS="\n" -vORS="\t" '1')
FILEs=$( ls -a1p | grep -P '^\w[^\$/]+$' | awk -vRS="\n" -vORS=" \t" '1')
DOTFs=$( ls -a1p | grep -P '^\.[^\$/]+$' | awk -vRS="\n" -vORS=" \t" '1')
clear && printf "\e[1;7;33m $(pwd) \e[0m\n$FILEs\n\e[0;38;5;238m$DOTFs\e[0m\n"
chosen=`( ( echo -e "$DIRs$DOTDs" | awk -vRS="\t" -vORS="\n" '1' ) | dmenu -i )`
cd "$chosen"
done

View File

@ -1,29 +0,0 @@
#!/bin/sh
# TODO: multisel
target="$1"
[ -z "$target" ] && target="$(realpath .)"
prompt="$2"
while true; do
p="$prompt"
[ -z "$p" ] && p="$target"
sel="$(ls -1a "$target" |grep -v '^\.$' | dmenu -p "$p" -l 25)"
ec=$?
[ "$ec" -ne 0 ] && exit $ec
c="$(echo "$sel" |cut -b1)"
if [ "$c" = "/" ]; then
newt="$sel"
else
newt="$(realpath "${target}/${sel}")"
fi
if [ -e "$newt" ]; then
target="$newt"
if [ ! -d "$target" ]; then
echo "$target"
exit 0
fi
fi
done

View File

@ -1,22 +0,0 @@
#!/bin/bash
# ____ _____
# | _ \_ _| Derek Taylor (DistroTube)
# | | | || | http://www.youtube.com/c/DistroTube
# | |_| || | http://www.gitlab.com/dwt1/
# |____/ |_|
#
# Use dmenu to open and edit a file from a given list.
# I use this to quickly open my dwm source files in vim.
source $HOME/.dmenurc
# Global variables:
FILES=${1:-"/home/dt/dwm"}
DMENU='dmenu -l -i'
EDITOR='st -e vim'
# Show list of options
choice=$(ls -a "${FILES}" | $DMENU -p "« dwm » source code:")
if [ $choice ]; then
$EDITOR ${FILES}/${choice}
fi

View File

@ -1,20 +0,0 @@
#!/bin/bash
# ____ _____
# | _ \_ _| Derek Taylor (DistroTube)
# | | | || | http://www.youtube.com/c/DistroTube
# | |_| || | http://www.gitlab.com/dwt1/
# |____/ |_|
#
# Use dmenu to open and edit a file from a given list.
# I use this to quickly open my st source files in vim.
# Global variables:
FILES=${1:-"/home/dt/st"}
DMENU='dmenu -nb #1D2330 -nf #AD69AF -sb #84598D -sf #d1d7e1 -l -i'
EDITOR='st -e vim'
# Show list of options
choice=$(ls -a "${FILES}" | $DMENU -p "« st » source code:")
if [ $choice ]; then
$EDITOR ${FILES}/${choice}
fi

View File

@ -1,31 +0,0 @@
#!/bin/bash
# ____ _____
# | _ \_ _| Derek Taylor (DistroTube)
# | | | || | http://www.youtube.com/c/DistroTube
# | |_| || | http://www.gitlab.com/dwt1/
# |____/ |_|
#
# Search through open programs and switch to their tag in dwm.
# The package xorg-xlsclients is required!
application=$(
# List all running programs
xlsclients |\
# Fix Virtualbox and LibreOffice
sed -e 's/.*VirtualBox/foobar virtualbox/g' -e 's/.*soffice/foobar libreoffice/g' |\
# Remove flash from results
grep -v "plugin-container" |\
# Show only app-names
cut -d" " -f3 |\
# Pipe to dmenu ($@ to include font settings from dwm/config.h)
dmenu -i -p "switch to:" $@
)
# Switch to chosen application
case $application in
gimp | truecrypt)
xdotool search --onlyvisible -classname "$application" windowactivate &> /dev/null
;;
*)
xdotool search ".*${application}.*" windowactivate &> /dev/null
;;

View File

@ -1,28 +0,0 @@
#!/bin/sh
#
# Write/remove a task to do later.
#
# Select an existing entry to remove it from the file, or type a new entry to
# add it.
#
file="$HOME/.todo"
touch "$file"
height=$(wc -l "$file" | awk '{print $1}')
prompt="Add/delete a task: "
cmd=$(dmenu -l "$height" -p "$prompt" "$@" < "$file")
while [ -n "$cmd" ]; do
if grep -q "^$cmd\$" "$file"; then
grep -v "^$cmd\$" "$file" > "$file.$$"
mv "$file.$$" "$file"
height=$(( height - 1 ))
else
echo "$cmd" >> "$file"
height=$(( height + 1 ))
fi
cmd=$(dmenu -l "$height" -p "$prompt" "$@" < "$file")
done
exit 0

View File

@ -196,7 +196,7 @@ myKeys =
, ("M-<KP_Insert>", spawn "dmenu_run -fn 'UbuntuMono Nerd Font:size=10' -nb '#292d3e' -nf '#bbc5ff' -sb '#82AAFF' -sf '#292d3e' -p 'dmenu:'")
-- Command Line Apps (MOD + KEYPAD 1-9)
, ("M-<KP_End>", spawn (myTerminal ++ " -e lynx -cfg=~/.lynx.cfg -lss=~/.lynx.lss http://www.distrowatch.com")) -- Keypad 1
, ("M-<KP_End>", spawn (myTerminal ++ " -e lynx -cfg=~/.lynx/lynx.cfg -lss=~/.lynx/lynx.lss gopher://distro.tube")) -- Keypad 1
, ("M-<KP_Down>", spawn (myTerminal ++ " -e sh ./scripts/googler-script.sh")) -- Keypad 2
, ("M-<KP_Page_Down>", spawn (myTerminal ++ " -e newsboat")) -- Keypad 3
, ("M-<KP_Left>", spawn (myTerminal ++ " -e rtv")) -- Keypad 4

8
.zshrc
View File

@ -1,3 +1,9 @@
# ____ _____
# | _ \_ _| Derek Taylor (DistroTube)
# | | | || | http://www.youtube.com/c/DistroTube
# | |_| || | http://www.gitlab.com/dwt1/
# |____/ |_|
export TERM="st-256color"
# If you come from bash you might have to change your $PATH.
@ -132,7 +138,7 @@ alias cp="cp -i" # confirm before overwriting something
alias df='df -h' # human-readable sizes
alias grep='grep --colour=auto'
alias lynx='lynx -cfg=~/.lynx/lynx.cfg -lss=~/.lynx/lynx.lss'
alias lynx='lynx -cfg=~/.lynx/lynx.cfg -lss=~/.lynx/lynx.lss -vikeys'
zstyle ':completion:*' completer _expand_alias _complete _ignored
alias tb="nc termbin.com 9999"