Basic vim settings, plugins
This commit is contained in:
parent
d57c7b822e
commit
55adf58a00
|
@ -1,5 +1,9 @@
|
|||
# Overrides for default .bashrc aliases and exports
|
||||
alias gitkapp='git config --global user.name "Shaun Reed" && git config --global user.email "shaunrd0@gmail.com"'
|
||||
|
||||
# Default .bashrc aliases stored here
|
||||
|
||||
# Alias / export customizations
|
||||
|
||||
# colored GCC warnings and errors
|
||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||
|
||||
|
@ -12,24 +16,5 @@ alias l='ls -CF'
|
|||
# sleep 10; alert
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
|
||||
# Custom aliases / exports - Appended
|
||||
# echo "alias ls='ls -la'" >> ~/.bash_aliases
|
||||
alias gitkapp='git config --global user.name "Shaun Reed" && git config --global user.email "shaunrd0@gmail.com"'
|
||||
|
||||
alias config='/usr/bin/git --git-dir=/home/kapper/.cfg/ --work-tree=/home/kapper'
|
||||
|
||||
#export FONT='xft:InconsolataNerdFont'
|
||||
#export TERMINAL='urxvt -fn '$FONT' -e tmux -u'
|
||||
export TERMINAL='urxvt -e tmux -u'
|
||||
|
||||
export EDITOR='/usr/bin/vim'
|
||||
export VISUAL='/usr/bin/vim'
|
||||
export PATH=$PATH":$HOME/.local/bin/i3scripts"
|
||||
|
||||
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
|
||||
exec tmux
|
||||
fi
|
||||
eval "$(dircolors ~/.dir_colors)"
|
||||
export LS_COLORS="di=1;34:ln=31;47:so=32:pi=33:ex=1;32:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43"
|
||||
|
||||
|
||||
|
|
19
.bashrc
19
.bashrc
|
@ -1,14 +1,13 @@
|
|||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
unset PROMPT_COMMAND
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
@ -57,18 +56,10 @@ if [ -n "$force_color_prompt" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
function _update_ps1() {
|
||||
PS1=$(powerline-shell $?)
|
||||
}
|
||||
|
||||
if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then
|
||||
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\][\u@\h\[\033[00m\] \W\[\033[01;32m\]]\$\[\033[00m\]'
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\][\u@\h\[\033[00m\] \W\[\033[01;32m\]]\$\[\033[00m\]'
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}[\u@\h \W]\$ '
|
||||
PS1='${debian_chroot:+($debian_chroot)}[\u@\h \W]\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
|
@ -105,7 +96,8 @@ alias l='ls -CF'
|
|||
|
||||
# Add an "alert" alias for long running commands. Use like so:
|
||||
# sleep 10; alert
|
||||
#alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
|
||||
|
||||
# Edit ~/.bash_aliases, instead of adding them here directly.
|
||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||
|
@ -124,3 +116,4 @@ if ! shopt -oq posix; then
|
|||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
245
.dir_colors
245
.dir_colors
|
@ -1,245 +0,0 @@
|
|||
COLOR tty
|
||||
|
||||
TERM ansi
|
||||
TERM *color*
|
||||
TERM con[0-9]*x[0-9]*
|
||||
TERM cons25
|
||||
TERM console
|
||||
TERM cygwin
|
||||
TERM dtterm
|
||||
TERM dvtm
|
||||
TERM dvtm-256color
|
||||
TERM Eterm
|
||||
TERM eterm-color
|
||||
TERM fbterm
|
||||
TERM gnome
|
||||
TERM gnome-256color
|
||||
TERM hurd
|
||||
TERM jfbterm
|
||||
TERM konsole
|
||||
TERM konsole-256color
|
||||
TERM kterm
|
||||
TERM linux
|
||||
TERM linux-c
|
||||
TERM mlterm
|
||||
TERM putty
|
||||
TERM putty-256color
|
||||
TERM rxvt*
|
||||
TERM rxvt-unicode
|
||||
TERM rxvt-256color
|
||||
TERM rxvt-unicode256
|
||||
TERM screen*
|
||||
TERM screen-256color
|
||||
TERM st
|
||||
TERM st-256color
|
||||
TERM terminator
|
||||
TERM tmux*
|
||||
TERM tmux-256color
|
||||
TERM vt100
|
||||
TERM xterm*
|
||||
TERM xterm-color
|
||||
TERM xterm-88color
|
||||
TERM xterm-256color
|
||||
|
||||
#+-----------------+
|
||||
#+ Global Defaults +
|
||||
#+-----------------+
|
||||
NORMAL 00
|
||||
RESET 0
|
||||
|
||||
FILE 01;36
|
||||
DIR 01;34
|
||||
LINK 01;04;31
|
||||
MULTIHARDLINK 04;03;33
|
||||
|
||||
FIFO 04;01;36
|
||||
SOCK 04;33
|
||||
DOOR 04;01;36
|
||||
BLK 01;33
|
||||
CHR 33
|
||||
|
||||
ORPHAN 31
|
||||
MISSING 01;31;41
|
||||
|
||||
EXEC 01;36
|
||||
|
||||
SETUID 01;04;37
|
||||
SETGID 01;04;37
|
||||
CAPABILITY 01;37
|
||||
|
||||
STICKY_OTHER_WRITABLE 01;37;44
|
||||
OTHER_WRITABLE 01;04;34
|
||||
STICKY 04;37;44
|
||||
|
||||
#+-------------------+
|
||||
#+ Extension Pattern +
|
||||
#+-------------------+
|
||||
#+--- Archives ---+
|
||||
.7z 01;31
|
||||
.ace 01;31
|
||||
.alz 01;31
|
||||
.arc 01;31
|
||||
.arj 01;31
|
||||
.bz 01;31
|
||||
.bz2 01;31
|
||||
.cab 01;31
|
||||
.cpio 01;31
|
||||
.deb 01;31
|
||||
.dz 01;31
|
||||
.ear 01;31
|
||||
.gz 01;31
|
||||
.jar 01;31
|
||||
.lha 01;31
|
||||
.lrz 01;31
|
||||
.lz 01;31
|
||||
.lz4 01;31
|
||||
.lzh 01;31
|
||||
.lzma 01;31
|
||||
.lzo 01;31
|
||||
.rar 01;31
|
||||
.rpm 01;31
|
||||
.rz 01;31
|
||||
.sar 01;31
|
||||
.t7z 01;31
|
||||
.tar 01;31
|
||||
.taz 01;31
|
||||
.tbz 01;31
|
||||
.tbz2 01;31
|
||||
.tgz 01;31
|
||||
.tlz 01;31
|
||||
.txz 01;31
|
||||
.tz 01;31
|
||||
.tzo 01;31
|
||||
.tzst 01;31
|
||||
.war 01;31
|
||||
.xz 01;31
|
||||
.z 01;31
|
||||
.Z 01;31
|
||||
.zip 01;31
|
||||
.zoo 01;31
|
||||
.zst 01;31
|
||||
|
||||
#+--- Audio ---+
|
||||
.aac 32
|
||||
.au 32
|
||||
.flac 32
|
||||
.m4a 32
|
||||
.mid 32
|
||||
.midi 32
|
||||
.mka 32
|
||||
.mp3 32
|
||||
.mpa 32
|
||||
.mpeg 32
|
||||
.mpg 32
|
||||
.ogg 32
|
||||
.opus 32
|
||||
.ra 32
|
||||
.wav 32
|
||||
|
||||
#+--- Customs ---+
|
||||
.3des 01;35
|
||||
.aes 01;35
|
||||
.gpg 01;35
|
||||
.pgp 01;35
|
||||
|
||||
#+--- Documents ---+
|
||||
.doc 32
|
||||
.docx 32
|
||||
.dot 32
|
||||
.odg 32
|
||||
.odp 32
|
||||
.ods 32
|
||||
.odt 32
|
||||
.otg 32
|
||||
.otp 32
|
||||
.ots 32
|
||||
.ott 32
|
||||
.pdf 32
|
||||
.ppt 32
|
||||
.pptx 32
|
||||
.xls 32
|
||||
.xlsx 32
|
||||
|
||||
#+--- Executables ---+
|
||||
.app 01;36
|
||||
.bat 01;36
|
||||
.btm 01;36
|
||||
.cmd 01;36
|
||||
.com 01;36
|
||||
.exe 01;36
|
||||
.reg 01;36
|
||||
|
||||
#+--- Ignores ---+
|
||||
*~ 02;37
|
||||
.bak 02;37
|
||||
.BAK 02;37
|
||||
.log 02;37
|
||||
.log 02;37
|
||||
.old 02;37
|
||||
.OLD 02;37
|
||||
.orig 02;37
|
||||
.ORIG 02;37
|
||||
.swo 02;37
|
||||
.swp 02;37
|
||||
|
||||
#+--- Images ---+
|
||||
.bmp 32
|
||||
.cgm 32
|
||||
.dl 32
|
||||
.dvi 32
|
||||
.emf 32
|
||||
.eps 32
|
||||
.gif 32
|
||||
.jpeg 32
|
||||
.jpg 32
|
||||
.JPG 32
|
||||
.mng 32
|
||||
.pbm 32
|
||||
.pcx 32
|
||||
.pgm 32
|
||||
.png 32
|
||||
.PNG 32
|
||||
.ppm 32
|
||||
.pps 32
|
||||
.ppsx 32
|
||||
.ps 32
|
||||
.svg 32
|
||||
.svgz 32
|
||||
.tga 32
|
||||
.tif 32
|
||||
.tiff 32
|
||||
.xbm 32
|
||||
.xcf 32
|
||||
.xpm 32
|
||||
.xwd 32
|
||||
.xwd 32
|
||||
.yuv 32
|
||||
|
||||
#+--- Video ---+
|
||||
.anx 32
|
||||
.asf 32
|
||||
.avi 32
|
||||
.axv 32
|
||||
.flc 32
|
||||
.fli 32
|
||||
.flv 32
|
||||
.gl 32
|
||||
.m2v 32
|
||||
.m4v 32
|
||||
.mkv 32
|
||||
.mov 32
|
||||
.MOV 32
|
||||
.mp4 32
|
||||
.mpeg 32
|
||||
.mpg 32
|
||||
.nuv 32
|
||||
.ogm 32
|
||||
.ogv 32
|
||||
.ogx 32
|
||||
.qt 32
|
||||
.rm 32
|
||||
.rmvb 32
|
||||
.swf 32
|
||||
.vob 32
|
||||
.webm 32
|
||||
.wmv 32
|
|
@ -1,21 +0,0 @@
|
|||
#!/bin/bash
|
||||
## Author: Shaun Reed | Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ##
|
||||
## ##
|
||||
## A script to find and return the CPU package temp sensor ##
|
||||
###############################################################################
|
||||
# bash.sh
|
||||
|
||||
for i in /sys/class/hwmon/hwmon*/temp*_input; do
|
||||
sensors+=("$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)");
|
||||
done
|
||||
|
||||
for i in "${sensors[@]}"
|
||||
do
|
||||
if [[ $i =~ ^coretemp:.Package.* ]]
|
||||
then
|
||||
export CPU_SENSOR=${i#*0}
|
||||
fi
|
||||
done
|
||||
|
||||
echo "scale=2;((9/5) * $(cat $CPU_SENSOR)/1000) + 32"|bc
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
#!/bin/env python3
|
||||
import sys
|
||||
import re
|
||||
import json
|
||||
from subprocess import run, PIPE
|
||||
import argparse
|
||||
|
||||
|
||||
def get_ws():
|
||||
return json.loads(run('i3-msg -t get_workspaces'.split(), stdout=PIPE).stdout)
|
||||
|
||||
|
||||
def to_empty(current=None, strict=False, right=True, move=False, wrap=True, min_num=1):
|
||||
"""Move to nearest empty numbered workspace"""
|
||||
if current is None:
|
||||
current = [w for w in get_ws() if w['focused']][0]
|
||||
|
||||
numbered = re.compile('^\d+$' if strict else '^\d+|(\d+:.*)$')
|
||||
|
||||
ns = {w['num'] for w in get_ws() if numbered.match(w['name']) != None and
|
||||
(not strict or w['name'] == str(w['num']))}
|
||||
|
||||
if numbered.match(current['name']) is None:
|
||||
# If current workspace is unnumbered, pick rightmost or leftmost
|
||||
if len(ns) == 0:
|
||||
new_ix = min_num
|
||||
else:
|
||||
new_ix = min(ns) - 1 if right else max(ns) + 1
|
||||
else:
|
||||
# Find numbered workspace nearest to current
|
||||
new_ix = current['num']
|
||||
|
||||
while new_ix in ns:
|
||||
new_ix += 1 if right else -1
|
||||
|
||||
# Wrap around
|
||||
if new_ix < min_num:
|
||||
if wrap:
|
||||
new_ix = max(ns) + 1
|
||||
else:
|
||||
return
|
||||
|
||||
if move:
|
||||
s = 'i3-msg move container to workspace {0}; workspace {0}'.format(new_ix)
|
||||
else:
|
||||
s = 'i3-msg workspace ' + str(new_ix)
|
||||
print(s)
|
||||
run(s.split())
|
||||
|
||||
|
||||
def to_empty_near(num, relative=False, **kwargs):
|
||||
"""Move to empty numbered workspace nearest to workspace 'num'"""
|
||||
if relative:
|
||||
if 0 <= num < len(get_ws()):
|
||||
current = get_ws()[num]
|
||||
else:
|
||||
return
|
||||
else:
|
||||
ns = [w for w in get_ws() if w['num'] == num]
|
||||
current = ns[0] if len(ns) > 0 else {'num': num, 'name': str(num)}
|
||||
to_empty(current, **kwargs)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(description='Switch to an empty numbered workspace.')
|
||||
parser.add_argument('direction', type=str, nargs='?', default='next',
|
||||
help='either next (default) or prev')
|
||||
parser.add_argument('number', type=int, nargs='?',
|
||||
help='workspace to start searching from (default: current)')
|
||||
parser.add_argument('-r', '--relative', dest='rel', action='store_true',
|
||||
help='use workspace indices, not numbers (default: no)')
|
||||
parser.add_argument('-w', '--nowrap', dest='wrap', action='store_false',
|
||||
help='if at edge, wrap around to other edge (default: yes)')
|
||||
parser.add_argument('-s', '--nostrict', dest='strict', action='store_false',
|
||||
help='numbered workspaces have a numeric name (default: yes)')
|
||||
parser.add_argument('-m', '--move', dest='move', action='store_true',
|
||||
help='move container to new workspace (default: no)')
|
||||
|
||||
args = parser.parse_args()
|
||||
kwargs = {'right': args.direction.lower().strip() == 'next',
|
||||
'wrap': args.wrap, 'strict': args.strict, 'move': args.move}
|
||||
|
||||
if type(args.number) is int:
|
||||
to_empty_near(args.number, relative=args.rel, **kwargs)
|
||||
else:
|
||||
to_empty(**kwargs)
|
|
@ -1,63 +0,0 @@
|
|||
#!/bin/sh
|
||||
# shellcheck disable=SC2016,SC2059
|
||||
|
||||
KEYBOARD_ID="Corsair Corsair STRAFE Gaming Keyboard"
|
||||
|
||||
# cpm: characters per minute
|
||||
# wpm: words per minute (1 word = 5 characters)
|
||||
METRIC=wpm
|
||||
FORMAT=" %d $METRIC"
|
||||
|
||||
INTERVAL=2
|
||||
|
||||
# If you have a keyboard layout that is not listed here yet, create a condition
|
||||
# yourself. $3 is the key index. Use `xinput test "AT Translated Set 2 keyboard"`
|
||||
# to see key codes in real time. Be sure to open a pull request for your
|
||||
# layout's condition!
|
||||
LAYOUT=qwerty
|
||||
|
||||
case "$LAYOUT" in
|
||||
qwerty) CONDITION='($3 >= 10 && $3 <= 19) || ($3 >= 24 && $3 <= 33) || ($3 >= 37 && $3 <= 53) || ($3 >= 52 && $3 <= 58)'; ;;
|
||||
azerty) CONDITION='($3 >= 10 && $3 <= 19) || ($3 >= 24 && $3 <= 33) || ($3 >= 37 && $3 <= 54) || ($3 >= 52 && $3 <= 57)'; ;;
|
||||
qwertz) CONDITION='($3 >= 10 && $3 <= 20) || ($3 >= 24 && $3 <= 34) || ($3 == 36) || ($3 >= 38 && $3 <= 48) || ($3 >= 52 && $3 <= 58)'; ;;
|
||||
dontcare) CONDITION='1'; ;; # Just register all key presses, not only letters and numbers
|
||||
*) echo "Unsupported layout \"$LAYOUT\""; exit 1; ;;
|
||||
esac
|
||||
|
||||
# We have to account for the fact we're not listening a whole minute
|
||||
multiply_by=60
|
||||
divide_by=$INTERVAL
|
||||
|
||||
case "$METRIC" in
|
||||
wpm) divide_by=$((divide_by * 5)); ;;
|
||||
cpm) ;;
|
||||
*) echo "Unsupported metric \"$METRIC\""; exit 1; ;;
|
||||
esac
|
||||
|
||||
hackspeed_cache="$(mktemp -p '' hackspeed_cache.XXXXX)"
|
||||
trap 'rm "$hackspeed_cache"' EXIT
|
||||
|
||||
# Write a dot to our cache for each key press
|
||||
printf '' > "$hackspeed_cache"
|
||||
xinput test "$KEYBOARD_ID" | \
|
||||
stdbuf -o0 awk '$1 == "key" && $2 == "press" && ('"$CONDITION"') {printf "."}' >> "$hackspeed_cache" &
|
||||
|
||||
while true; do
|
||||
# Ask the kernel how big the file is with the command `stat`. The number we
|
||||
# get is the file size in bytes, which equals the amount of dots the file
|
||||
# contains, and hence how much keys were pressed since the file was last
|
||||
# cleared.
|
||||
lines=$(stat --format %s "$hackspeed_cache")
|
||||
|
||||
# Truncate the cache file so that in the next iteration, we count only new
|
||||
# keypresses
|
||||
printf '' > "$hackspeed_cache"
|
||||
|
||||
# The shell only does integer operations, so make sure to first multiply and
|
||||
# then divide
|
||||
value=$((lines * multiply_by / divide_by))
|
||||
|
||||
printf "$FORMAT\\n" "$value"
|
||||
|
||||
sleep $INTERVAL
|
||||
done
|
|
@ -1,25 +0,0 @@
|
|||
#!/bin/bash
|
||||
## Author: Shaun Reed | Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ##
|
||||
## ##
|
||||
## A script to track system idle time within a polybar menu ##
|
||||
###############################################################################
|
||||
# info-idle.sh
|
||||
|
||||
|
||||
METRIC=sec
|
||||
FORMAT=" %d $METRIC"
|
||||
INTERVAL=2
|
||||
|
||||
case "$METRIC" in
|
||||
min) DIVIDE_BY=$((1000 * 60)); ;;
|
||||
sec) DIVIDE_BY=1000; ;;
|
||||
msec) DIVIDE_BY=1 ;;
|
||||
*) echo "Unsupported metric \"$METRIC\""; exit 1; ;;
|
||||
esac
|
||||
|
||||
while true; do
|
||||
VALUE=$(($(xprintidle)/ DIVIDE_BY))
|
||||
printf "$FORMAT\\n" "$VALUE"
|
||||
sleep $INTERVAL
|
||||
done
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
BAR_HEIGHT=22 # polybar height
|
||||
BORDER_SIZE=1 # border size from your wm settings
|
||||
YAD_WIDTH=222 # 222 is minimum possible value
|
||||
YAD_HEIGHT=193 # 193 is minimum possible value
|
||||
DATE="$(TZ=UTC date +"%a %d %H:%M")"
|
||||
|
||||
case "$1" in
|
||||
--popup)
|
||||
if [ "$(xdotool getwindowfocus getwindowname)" = "yad-calendar" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
eval "$(xdotool getmouselocation --shell)"
|
||||
eval "$(xdotool getdisplaygeometry --shell)"
|
||||
|
||||
# X
|
||||
if [ "$((X + YAD_WIDTH / 2 + BORDER_SIZE))" -gt "$WIDTH" ]; then #Right side
|
||||
: $((pos_x = WIDTH - YAD_WIDTH - BORDER_SIZE))
|
||||
elif [ "$((X - YAD_WIDTH / 2 - BORDER_SIZE))" -lt 0 ]; then #Left side
|
||||
: $((pos_x = BORDER_SIZE))
|
||||
else #Center
|
||||
: $((pos_x = X - YAD_WIDTH / 2))
|
||||
fi
|
||||
|
||||
# Y
|
||||
if [ "$Y" -gt "$((HEIGHT / 2))" ]; then #Bottom
|
||||
: $((pos_y = HEIGHT - YAD_HEIGHT - BAR_HEIGHT - BORDER_SIZE))
|
||||
else #Top
|
||||
: $((pos_y = BAR_HEIGHT + BORDER_SIZE))
|
||||
fi
|
||||
|
||||
yad --calendar --undecorated --fixed --close-on-unfocus --no-buttons \
|
||||
--width=$YAD_WIDTH --height=$YAD_HEIGHT --posx=$pos_x --posy=$pos_y \
|
||||
--title="yad-calendar" --borders=0 >/dev/null &
|
||||
;;
|
||||
*)
|
||||
echo "$DATE"
|
||||
;;
|
||||
esac
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash
|
||||
#start-htop.sh
|
||||
#
|
||||
|
||||
|
||||
#i3 move to workspace number $ws95;i3 floating enable;i3 resize set height 700;i3 resize set width 1000;i3 move position center && i3-sensible-terminal -e htop;
|
||||
|
||||
|
||||
(urxvt -hold -e htop && i3 move to workspace number $ws95 && i3 floating enable && i3 resize set height 700 && i3 resize set width 1000 && i3 move position center)
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
conky -c $HOME/.config/conky/shortcuts_green &&
|
||||
conky -c $HOME/.config/conky/sysinfo_green &&
|
||||
|
||||
exit 0
|
|
@ -1,96 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
get_icon() {
|
||||
case $1 in
|
||||
01d) icon="滛";; # Sun clear
|
||||
01n) icon="";; # Moon clear
|
||||
02d) icon="";; # Sun cloudy
|
||||
02n) icon="";; # Moon cloudy
|
||||
03*) icon="";; # Cloud
|
||||
04*) icon="";; # Clouds
|
||||
09d) icon="";; # Day, cloud, rain, wind
|
||||
09n) icon="";; # Night, cloud, rain, wind
|
||||
10d) icon="";; # Day rain
|
||||
10n) icon="";; # Night rain
|
||||
11d) icon="";; # Day, rain, lightning
|
||||
11n) icon="";; # Night, rain, lightning
|
||||
13d) icon="";; # Day, snow
|
||||
13n) icon="";; # Night, snow
|
||||
50d) icon="";; # Day, fog
|
||||
50n) icon="";; # Night, fog
|
||||
*) icon=""; # Sun clear, default icon
|
||||
esac
|
||||
|
||||
echo $icon
|
||||
}
|
||||
|
||||
get_duration() {
|
||||
|
||||
osname=$(uname -s)
|
||||
|
||||
case $osname in
|
||||
*BSD) date -r "$1" -u +%H:%M;;
|
||||
*) date --date="@$1" -u +%H:%M;;
|
||||
esac
|
||||
|
||||
}
|
||||
|
||||
KEY="3fbb0282dfd1ba8295bcb93b329fd152"
|
||||
CITY="5149222"
|
||||
UNITS="imperial"
|
||||
SYMBOL="°"
|
||||
|
||||
API="https://api.openweathermap.org/data/2.5"
|
||||
|
||||
if [ -n "$CITY" ]; then
|
||||
if [ "$CITY" -eq "$CITY" ] 2>/dev/null; then
|
||||
CITY_PARAM="id=$CITY"
|
||||
else
|
||||
CITY_PARAM="q=$CITY"
|
||||
fi
|
||||
|
||||
current=$(curl -sf "$API/weather?appid=$KEY&$CITY_PARAM&units=$UNITS")
|
||||
forecast=$(curl -sf "$API/forecast?appid=$KEY&$CITY_PARAM&units=$UNITS&cnt=1")
|
||||
else
|
||||
location=$(curl -sf https://location.services.mozilla.com/v1/geolocate?key=geoclue)
|
||||
|
||||
if [ -n "$location" ]; then
|
||||
location_lat="$(echo "$location" | jq '.location.lat')"
|
||||
location_lon="$(echo "$location" | jq '.location.lng')"
|
||||
|
||||
current=$(curl -sf "$API/weather?appid=$KEY&lat=$location_lat&lon=$location_lon&units=$UNITS")
|
||||
forecast=$(curl -sf "$API/forecast?appid=$KEY&lat=$location_lat&lon=$location_lon&units=$UNITS&cnt=1")
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$current" ] && [ -n "$forecast" ]; then
|
||||
current_temp=$(echo "$current" | jq ".main.temp" | cut -d "." -f 1)
|
||||
current_icon=$(echo "$current" | jq -r ".weather[0].icon")
|
||||
|
||||
forecast_temp=$(echo "$forecast" | jq ".list[].main.temp" | cut -d "." -f 1)
|
||||
forecast_icon=$(echo "$forecast" | jq -r ".list[].weather[0].icon")
|
||||
|
||||
|
||||
if [ "$current_temp" -gt "$forecast_temp" ]; then
|
||||
trend="" # Arrow, down-right slant
|
||||
elif [ "$forecast_temp" -gt "$current_temp" ]; then
|
||||
trend="" # Arrow, up-right slant
|
||||
else
|
||||
trend="" # Arrow, left-to-right
|
||||
fi
|
||||
|
||||
|
||||
sun_rise=$(echo "$current" | jq ".sys.sunrise")
|
||||
sun_set=$(echo "$current" | jq ".sys.sunset")
|
||||
now=$(date +%s)
|
||||
|
||||
if [ "$sun_rise" -gt "$now" ]; then
|
||||
daytime=" $(get_duration "$((sun_rise-now))")" # Sun rise
|
||||
elif [ "$sun_set" -gt "$now" ]; then
|
||||
daytime=" $(get_duration "$((sun_set-now))")" # Sun set
|
||||
else
|
||||
daytime=" $(get_duration "$((sun_rise-now))")" # Unknown
|
||||
fi
|
||||
|
||||
echo "$(get_icon "$current_icon") $current_temp$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp$SYMBOL $daytime"
|
||||
fi
|
|
@ -1,23 +0,0 @@
|
|||
#!/bin/bash
|
||||
## Author: Shaun Reed | Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ##
|
||||
## ##
|
||||
## A script to toggle and notify xautolock via polybar menus ##
|
||||
###############################################################################
|
||||
# xoffee.sh
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Incorrect number of arguments provided"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "enable" ]; then
|
||||
xautolock -disable
|
||||
notify-send "Caffeine enabled"
|
||||
elif [ "$1" = "disable" ]; then
|
||||
xautolock -enable
|
||||
notify-send "Caffeine disabled"
|
||||
else
|
||||
notify-send "Error: Incorrect arg for xoffee script"
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Generated by JetBrains Toolbox 1.16.6207 at Sun Jan 19 03:37:29 2020
|
||||
|
||||
"/home/kapper/.local/share/JetBrains/Toolbox/apps/PyCharm-C/ch-0/193.5662.61/bin/pycharm.sh" "$@"
|
||||
|
|
@ -1 +0,0 @@
|
|||
4afb8389-b9cd-44af-bf06-2c0b267584b6
|
|
@ -1 +0,0 @@
|
|||
e7d96d16-43f1-4386-a004-45530dcd9334
|
|
@ -1 +0,0 @@
|
|||
21aeff4f-e794-4f9b-b9f0-efcc9a956f72
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,46 +0,0 @@
|
|||
# Inconsolata
|
||||
|
||||
|
||||
## Which font?
|
||||
|
||||
### TL;DR
|
||||
|
||||
* Pick your font family and then select from the `'complete'` directory.
|
||||
* If you are on Windows pick a font with the `'Windows Compatible'` suffix.
|
||||
* This includes specific tweaks to ensure the font works on Windows, in particular monospace identification and font name length limitations
|
||||
* If you are limited to monospaced fonts (because of your terminal, etc) then pick a font with the `'Mono'` suffix.
|
||||
* This denotes that the Nerd Font glyphs will be monospaced not necessarily that the entire font will be monospaced
|
||||
|
||||
### Ligatures
|
||||
|
||||
By the *Nerd Font* policy, the variant with the `'Mono'` suffix is not supposed to have any ligatures.
|
||||
Use the non-*Mono* variants to have ligatures.
|
||||
|
||||
### Explanation
|
||||
|
||||
Once you narrow down your font choice of family (`Droid Sans`, `Inconsolata`, etc) and style (`bold`, `italic`, etc) you have 2 main choices:
|
||||
|
||||
#### `Option 1: Download already patched font`
|
||||
|
||||
* download an already patched font from the `complete` folder
|
||||
* This is most likely the one you want. It includes **all** of the glyphs from all of the glyph sets. Only caution here is that some fonts have glyphs in the _same_ code point so to include everything some had to be moved to alternate code points.
|
||||
|
||||
#### `Option 2: Patch your own font`
|
||||
|
||||
* patch your own variations with the various options provided by the font patcher (see each font's readme for full list of combinations available)
|
||||
* This is the option you want if the font you use is _not_ already included or you want maximum control of what's included
|
||||
* This contains a list of _all permutations_ of the various glyphs. E.g. You want the font with only [Octicons][octicons] or you want the font with just [Font Awesome][font-awesome] and [Devicons][vorillaz-devicons]. The goal is to provide every combination possible in this folder.
|
||||
|
||||
|
||||
For more information see: [The FAQ](https://github.com/ryanoasis/nerd-fonts/wiki/FAQ-and-Troubleshooting#which-font)
|
||||
|
||||
|
||||
[vim-devicons]:https://github.com/ryanoasis/vim-devicons
|
||||
[vorillaz-devicons]:https://vorillaz.github.io/devicons/
|
||||
[font-awesome]:https://github.com/FortAwesome/Font-Awesome
|
||||
[octicons]:https://github.com/primer/octicons
|
||||
[gabrielelana-pomicons]:https://github.com/gabrielelana/pomicons
|
||||
[Seti-UI]:https://atom.io/themes/seti-ui
|
||||
[ryanoasis-powerline-extra-symbols]:https://github.com/ryanoasis/powerline-extra-symbols
|
||||
[SIL-RFN]:http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web_fonts_and_RFNs#14cbfd4a
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +0,0 @@
|
|||
[Appearance]
|
||||
ColorScheme=GreenOnBlack
|
||||
Font=Inconsolata Nerd Font Mono [PfEd],9,-1,5,57,0,0,0,0,0,Medium
|
||||
|
||||
[General]
|
||||
Icon=yakuake
|
||||
Name=Default Powerline
|
||||
Parent=FALLBACK/
|
Loading…
Reference in New Issue