initial merge

This commit is contained in:
Barak Michener 2020-03-03 13:05:08 -08:00
commit 958c97f582
21 changed files with 927 additions and 39 deletions

View file

@ -142,8 +142,8 @@ if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
if [ -f ~/.bash_google ]; then
. ~/.bash_google
if [ -f ~/.bash_work ]; then
. ~/.bash_work
fi
if [ -n "`which fortune`" ]; then

View file

@ -1,8 +1,8 @@
{
"dependencies": {
"coc-go": ">=0.6.2",
"coc-json": ">=1.2.5",
"coc-python": ">=1.2.9",
"coc-snippets": ">=2.1.19",
"coc-ultisnips": "^1.2.3"
"coc-snippets": ">=2.1.19"
}
}
}

435
.config/polybar/config Normal file
View file

@ -0,0 +1,435 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
;background = ${xrdb:color0:#222}
background = #222
background-alt = #444
;background = #404552
;background-alt = #383c4a
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #555
;foreground = #4b5162
;foreground-alt = #5294e2
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[bar/example]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 27
;offset-x = 1%
;offset-y = 1%
radius = 6.0
fixed-center = false
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 4
border-color = #00000000
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = fixed:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = siji:pixelsize=10;1
modules-left = i3
modules-center =
modules-right = xbacklight pulseaudio xkeyboard memory cpu wlan eth battery temperature date powermenu
tray-position = right
tray-padding = 2
;tray-background = #0063ff
;wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary}
label-layout = %layout%
label-layout-underline = ${colors.secondary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}
[module/bspwm]
type = internal/bspwm
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
label-occupied = %index%
label-occupied-padding = 2
label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2
; Separator in between workspaces
; label-separator = |
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
; focused = Active workspace on focused monitor
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = 2
; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
; Separator in between workspaces
; label-separator = |
[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
label-song-maxlen = 25
label-song-ellipsis = true
[module/xbacklight]
type = internal/xbacklight
format = <label> <bar>
label = BL
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #fff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu]
type = internal/cpu
interval = 2
;format-prefix = " "
format-prefix = "C "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 2
;format-prefix = " "
format-prefix = "M "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #4bffdc
label = %percentage_used%%
[module/wlan]
type = internal/network
interface = wlp4s0
interval = 3.0
format-connected = <ramp-signal> <label-connected>
format-connected-underline = #9f78e1
label-connected = %essid% %local_ip%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 = ▁
ramp-signal-1 = ▃
ramp-signal-2 = ▅
ramp-signal-3 = ▇
ramp-signal-4 = ▀
;ramp-signal-0 = 1
;ramp-signal-1 = 2
;ramp-signal-2 = 3
;ramp-signal-3 = 4
;ramp-signal-4 = 5
ramp-signal-foreground = ${colors.foreground-alt}
[module/eth]
type = internal/network
interface = wwp0s20f0u6i12
interval = 3.0
format-connected-underline = #55aa55
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
[module/date]
type = internal/date
interval = 5
date =
date-alt = " %Y-%m-%d"
time = %H:%M
time-alt = %H:%M:%S
format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
label = %date% %time%
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <label-volume> <bar-volume>
label-volume = VOL %percentage%%
label-volume-foreground = ${root.foreground}
label-muted = 🔇 muted
label-muted-foreground = #666
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/alsa]
type = internal/alsa
format-volume = <label-volume> <bar-volume>
label-volume = VOL
label-volume-foreground = ${root.foreground}
format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 98
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-discharging = <animation-discharging> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 1
label-open = 
label-open-foreground = ${colors.secondary}
label-close =  cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = sudo poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
pseudo-transparency = true
[global/wm]
margin-top = 5
margin-bottom = 5
; vim:ft=dosini

View file

@ -7,8 +7,8 @@
title_transmit_bg_color = "#535d6c"
[keybindings]
close_term = <Primary><Shift>w
cycle_next = <Primary>j
cycle_prev = <Primary>k
cycle_next = None
cycle_prev = None
paste = <Shift>Insert
split_vert = <Primary><Shift>v
[layouts]

View file

@ -1,6 +0,0 @@
Command=hostname -s
UseLabel=0
Text=hostname
UpdatePeriod=60000
Font=Sans Bold 16

View file

@ -23,11 +23,76 @@
<property name="image-style" type="int" value="5"/>
<property name="last-image" type="string" value="/usr/share/xfce4/backdrops/xubuntu-wallpaper.png"/>
</property>
<property name="workspace1" type="empty">
<property name="color-style" type="int" value="0"/>
<property name="image-style" type="int" value="5"/>
<property name="last-image" type="string" value="/usr/share/backgrounds/xfce/xfce-teal.jpg"/>
</property>
<property name="workspace2" type="empty">
<property name="color-style" type="int" value="0"/>
<property name="image-style" type="int" value="5"/>
<property name="last-image" type="string" value="/usr/share/backgrounds/xfce/xfce-teal.jpg"/>
</property>
<property name="workspace3" type="empty">
<property name="color-style" type="int" value="0"/>
<property name="image-style" type="int" value="5"/>
<property name="last-image" type="string" value="/usr/share/backgrounds/xfce/xfce-teal.jpg"/>
</property>
<property name="workspace4" type="empty">
<property name="color-style" type="int" value="0"/>
<property name="image-style" type="int" value="5"/>
<property name="last-image" type="string" value="/usr/share/backgrounds/xfce/xfce-teal.jpg"/>
</property>
<property name="workspace5" type="empty">
<property name="color-style" type="int" value="0"/>
<property name="image-style" type="int" value="5"/>
<property name="last-image" type="string" value="/usr/share/backgrounds/xfce/xfce-teal.jpg"/>
</property>
<property name="workspace6" type="empty">
<property name="color-style" type="int" value="0"/>
<property name="image-style" type="int" value="5"/>
<property name="last-image" type="string" value="/usr/share/backgrounds/xfce/xfce-teal.jpg"/>
</property>
</property>
<property name="monitor1" type="empty">
<property name="image-path" type="empty"/>
<property name="image-style" type="empty"/>
<property name="image-show" type="empty"/>
<property name="workspace0" type="empty">
<property name="color-style" type="int" value="0"/>
<property name="image-style" type="int" value="5"/>
<property name="last-image" type="string" value="/usr/share/backgrounds/xfce/xfce-teal.jpg"/>
</property>
<property name="workspace1" type="empty">
<property name="color-style" type="int" value="0"/>
<property name="image-style" type="int" value="5"/>
<property name="last-image" type="string" value="/usr/share/backgrounds/xfce/xfce-teal.jpg"/>
</property>
<property name="workspace2" type="empty">
<property name="color-style" type="int" value="0"/>
<property name="image-style" type="int" value="5"/>
<property name="last-image" type="string" value="/usr/share/backgrounds/xfce/xfce-teal.jpg"/>
</property>
<property name="workspace3" type="empty">
<property name="color-style" type="int" value="0"/>
<property name="image-style" type="int" value="5"/>
<property name="last-image" type="string" value="/usr/share/backgrounds/xfce/xfce-teal.jpg"/>
</property>
<property name="workspace4" type="empty">
<property name="color-style" type="int" value="0"/>
<property name="image-style" type="int" value="5"/>
<property name="last-image" type="string" value="/usr/share/backgrounds/xfce/xfce-teal.jpg"/>
</property>
<property name="workspace5" type="empty">
<property name="color-style" type="int" value="0"/>
<property name="image-style" type="int" value="5"/>
<property name="last-image" type="string" value="/usr/share/backgrounds/xfce/xfce-teal.jpg"/>
</property>
<property name="workspace6" type="empty">
<property name="color-style" type="int" value="0"/>
<property name="image-style" type="int" value="5"/>
<property name="last-image" type="string" value="/usr/share/backgrounds/xfce/xfce-teal.jpg"/>
</property>
</property>
</property>
</property>

View file

@ -13,7 +13,7 @@
<property name="dpms-on-battery-sleep" type="empty"/>
<property name="dpms-on-battery-off" type="empty"/>
<property name="show-panel-label" type="empty"/>
<property name="brightness-switch-restore-on-exit" type="int" value="-1"/>
<property name="brightness-switch-restore-on-exit" type="int" value="0"/>
<property name="brightness-switch" type="int" value="0"/>
</property>
</channel>

View file

@ -3,7 +3,7 @@
<channel name="xsettings" version="1.0">
<property name="Net" type="empty">
<property name="ThemeName" type="string" value="Arc"/>
<property name="IconThemeName" type="string" value="elementary-xfce"/>
<property name="IconThemeName" type="string" value="elementary-xfce-dark"/>
<property name="DoubleClickTime" type="empty"/>
<property name="DoubleClickDistance" type="empty"/>
<property name="DndDragThreshold" type="empty"/>

View file

@ -0,0 +1,199 @@
# ____ ____
# / __/___ / __/
# / /_/_ / / /_
# / __/ / /_/ __/
# /_/ /___/_/-completion.zsh
#
# - $FZF_TMUX (default: 0)
# - $FZF_TMUX_HEIGHT (default: '40%')
# - $FZF_COMPLETION_TRIGGER (default: '**')
# - $FZF_COMPLETION_OPTS (default: empty)
if [[ $- =~ i ]]; then
# To use custom commands instead of find, override _fzf_compgen_{path,dir}
if ! declare -f _fzf_compgen_path > /dev/null; then
_fzf_compgen_path() {
echo "$1"
command find -L "$1" \
-name .git -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
}
fi
if ! declare -f _fzf_compgen_dir > /dev/null; then
_fzf_compgen_dir() {
command find -L "$1" \
-name .git -prune -o -name .svn -prune -o -type d \
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
}
fi
###########################################################
__fzfcmd_complete() {
[ -n "$TMUX_PANE" ] && [ "${FZF_TMUX:-0}" != 0 ] && [ ${LINES:-40} -gt 15 ] &&
echo "fzf-tmux -d${FZF_TMUX_HEIGHT:-40%}" || echo "fzf"
}
__fzf_generic_path_completion() {
local base lbuf compgen fzf_opts suffix tail fzf dir leftover matches
base=$1
lbuf=$2
compgen=$3
fzf_opts=$4
suffix=$5
tail=$6
fzf="$(__fzfcmd_complete)"
setopt localoptions nonomatch
eval "base=$base"
[[ $base = *"/"* ]] && dir="$base"
while [ 1 ]; do
if [[ -z "$dir" || -d ${dir} ]]; then
leftover=${base/#"$dir"}
leftover=${leftover/#\/}
[ -z "$dir" ] && dir='.'
[ "$dir" != "/" ] && dir="${dir/%\//}"
matches=$(eval "$compgen $(printf %q "$dir")" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS" ${=fzf} ${=fzf_opts} -q "$leftover" | while read item; do
echo -n "${(q)item}$suffix "
done)
matches=${matches% }
if [ -n "$matches" ]; then
LBUFFER="$lbuf$matches$tail"
fi
zle reset-prompt
break
fi
dir=$(dirname "$dir")
dir=${dir%/}/
done
}
_fzf_path_completion() {
__fzf_generic_path_completion "$1" "$2" _fzf_compgen_path \
"-m" "" " "
}
_fzf_dir_completion() {
__fzf_generic_path_completion "$1" "$2" _fzf_compgen_dir \
"" "/" ""
}
_fzf_feed_fifo() (
command rm -f "$1"
mkfifo "$1"
cat <&0 > "$1" &
)
_fzf_complete() {
local fifo fzf_opts lbuf fzf matches post
fifo="${TMPDIR:-/tmp}/fzf-complete-fifo-$$"
fzf_opts=$1
lbuf=$2
post="${funcstack[2]}_post"
type $post > /dev/null 2>&1 || post=cat
fzf="$(__fzfcmd_complete)"
_fzf_feed_fifo "$fifo"
matches=$(cat "$fifo" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS" ${=fzf} ${=fzf_opts} -q "${(Q)prefix}" | $post | tr '\n' ' ')
if [ -n "$matches" ]; then
LBUFFER="$lbuf$matches"
fi
zle reset-prompt
command rm -f "$fifo"
}
_fzf_complete_telnet() {
_fzf_complete '+m' "$@" < <(
command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0' |
awk '{if (length($2) > 0) {print $2}}' | sort -u
)
}
_fzf_complete_ssh() {
_fzf_complete '+m' "$@" < <(
setopt localoptions nonomatch
command cat <(cat ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2> /dev/null | command grep -i '^host ' | command grep -v '[*?]' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}') \
<(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\n' | tr -d '[' | awk '{ print $1 " " $1 }') \
<(command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0') |
awk '{if (length($2) > 0) {print $2}}' | sort -u
)
}
_fzf_complete_export() {
_fzf_complete '-m' "$@" < <(
declare -xp | sed 's/=.*//' | sed 's/.* //'
)
}
_fzf_complete_unset() {
_fzf_complete '-m' "$@" < <(
declare -xp | sed 's/=.*//' | sed 's/.* //'
)
}
_fzf_complete_unalias() {
_fzf_complete '+m' "$@" < <(
alias | sed 's/=.*//'
)
}
fzf-completion() {
local tokens cmd prefix trigger tail fzf matches lbuf d_cmds
setopt localoptions noshwordsplit noksh_arrays noposixbuiltins
# http://zsh.sourceforge.net/FAQ/zshfaq03.html
# http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion-Flags
tokens=(${(z)LBUFFER})
if [ ${#tokens} -lt 1 ]; then
zle ${fzf_default_completion:-expand-or-complete}
return
fi
cmd=${tokens[1]}
# Explicitly allow for empty trigger.
trigger=${FZF_COMPLETION_TRIGGER-'**'}
[ -z "$trigger" -a ${LBUFFER[-1]} = ' ' ] && tokens+=("")
tail=${LBUFFER:$(( ${#LBUFFER} - ${#trigger} ))}
# Kill completion (do not require trigger sequence)
if [ $cmd = kill -a ${LBUFFER[-1]} = ' ' ]; then
fzf="$(__fzfcmd_complete)"
matches=$(command ps -ef | sed 1d | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-50%} --min-height 15 --reverse $FZF_DEFAULT_OPTS --preview 'echo {}' --preview-window down:3:wrap $FZF_COMPLETION_OPTS" ${=fzf} -m | awk '{print $2}' | tr '\n' ' ')
if [ -n "$matches" ]; then
LBUFFER="$LBUFFER$matches"
fi
zle reset-prompt
# Trigger sequence given
elif [ ${#tokens} -gt 1 -a "$tail" = "$trigger" ]; then
d_cmds=(${=FZF_COMPLETION_DIR_COMMANDS:-cd pushd rmdir})
[ -z "$trigger" ] && prefix=${tokens[-1]} || prefix=${tokens[-1]:0:-${#trigger}}
[ -z "${tokens[-1]}" ] && lbuf=$LBUFFER || lbuf=${LBUFFER:0:-${#tokens[-1]}}
if eval "type _fzf_complete_${cmd} > /dev/null"; then
eval "prefix=\"$prefix\" _fzf_complete_${cmd} \"$lbuf\""
elif [ ${d_cmds[(i)$cmd]} -le ${#d_cmds} ]; then
_fzf_dir_completion "$prefix" "$lbuf"
else
_fzf_path_completion "$prefix" "$lbuf"
fi
# Fall back to default completion
else
zle ${fzf_default_completion:-expand-or-complete}
fi
}
[ -z "$fzf_default_completion" ] && {
binding=$(bindkey '^I')
[[ $binding =~ 'undefined-key' ]] || fzf_default_completion=$binding[(s: :w)2]
unset binding
}
zle -N fzf-completion
bindkey '^I' fzf-completion
fi

View file

@ -0,0 +1,85 @@
# Key bindings
# ------------
if [[ $- == *i* ]]; then
# CTRL-T - Paste the selected file path(s) into the command line
__fsel() {
local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
-o -type f -print \
-o -type d -print \
-o -type l -print 2> /dev/null | cut -b3-"}"
setopt localoptions pipefail 2> /dev/null
eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_CTRL_T_OPTS" $(__fzfcmd) -m "$@" | while read item; do
echo -n "${(q)item} "
done
local ret=$?
echo
return $ret
}
__fzf_use_tmux__() {
[ -n "$TMUX_PANE" ] && [ "${FZF_TMUX:-0}" != 0 ] && [ ${LINES:-40} -gt 15 ]
}
__fzfcmd() {
__fzf_use_tmux__ &&
echo "fzf-tmux -d${FZF_TMUX_HEIGHT:-40%}" || echo "fzf"
}
fzf-file-widget() {
LBUFFER="${LBUFFER}$(__fsel)"
local ret=$?
zle reset-prompt
return $ret
}
zle -N fzf-file-widget
bindkey '^T' fzf-file-widget
# Ensure precmds are run after cd
fzf-redraw-prompt() {
local precmd
for precmd in $precmd_functions; do
$precmd
done
zle reset-prompt
}
zle -N fzf-redraw-prompt
# ALT-C - cd into the selected directory
fzf-cd-widget() {
local cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
-o -type d -print 2> /dev/null | cut -b3-"}"
setopt localoptions pipefail 2> /dev/null
local dir="$(eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS" $(__fzfcmd) +m)"
if [[ -z "$dir" ]]; then
zle redisplay
return 0
fi
cd "$dir"
local ret=$?
zle fzf-redraw-prompt
return $ret
}
zle -N fzf-cd-widget
bindkey '\ec' fzf-cd-widget
# CTRL-R - Paste the selected command from history into the command line
fzf-history-widget() {
local selected num
setopt localoptions noglobsubst noposixbuiltins pipefail 2> /dev/null
selected=( $(fc -rl 1 |
FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m" $(__fzfcmd)) )
local ret=$?
if [ -n "$selected" ]; then
num=$selected[1]
if [ -n "$num" ]; then
zle vi-fetch-history -n $num
fi
fi
zle reset-prompt
return $ret
}
zle -N fzf-history-widget
bindkey '^R' fzf-history-widget
fi

View file

@ -16,6 +16,12 @@
ours = "!f() { git checkout --ours $@ && git add $@; }; f"
theirs = "!f() { git checkout --theirs $@ && git add $@; }; f"
praise = blame
; blame = "gblame"
reabsorb = rebase -i --autosquash
flog = "!f() { git ls-tree -r --full-name HEAD | awk '{print $4}' | xargs -i sh -c 'echo $(git log --oneline {} | wc -l) {}'; }; f"
fileprimary = "!f() { git blame --line-porcelain $@ | grep \"author \" | cut -d \" \" -f 2- | sort | uniq -c | sort -n | tail -n 1 | sed -e 's/\\s\\+[0-9]\\+ //g'; }; f"
newbranch = "!f() { git fetch origin && git checkout origin/master && git checkout -b $@; }; f"
nb = newbranch
[diff]
renamelimit = 0

View file

@ -15,7 +15,7 @@ set $mod Mod1
# is used in the bar {} block below.
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
font pango:DejaVu Sans Mono 13
font pango:Droid Sans Mono 11
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
@ -55,6 +55,7 @@ bindsym $mod+d exec i3-dmenu-desktop --dmenu='rofi -dmenu'
bindsym $mod+F12 exec xscreensaver-command -lock
bindsym $mod+Shift+y exec xinput-toggle -r yubikey -n -e -t 10
bindsym $mod+Control+Shift+f exec fixkeyboard
bindsym $mod+Shift+s exec xfce4-screenshooter
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
@ -94,6 +95,8 @@ bindsym $mod+v split h
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
bindsym $mod+b fullscreen toggle global
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
@ -196,6 +199,18 @@ mode "moveworkspace" {
}
bindsym $mod+t mode "moveworkspace"
bindsym $mod+y move workspace to output left
mode "goremote" {
# bindsym g exec "remmina -c ~/.local/share/remmina/1523485448993.remmina"; mode "default"
bindsym g exec "run_terminal -x ssh barak@10.42.1.8 -J barak@barakmich.com:2222"; mode "default"
bindsym t exec "run_terminal -x ssh -p 2222 barak@rack.0b100.net"; mode "default"
bindsym p exec "run_terminal -x ssh -p 2222 barak@barakmich.com"; mode "default"
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Shift+Control+r mode "goremote"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
@ -206,3 +221,4 @@ bindsym $mod+t mode "moveworkspace"
#tray_output primary
#}
exec --no-startup-id xfce4-panel --disable-wm-check
#exec --no-startup-id polybar example

View file

@ -1 +1 @@
/home/barak/.fonts
/home/bmichener/.fonts

View file

@ -0,0 +1,47 @@
[remmina]
sound=off
sharefolder=
name=ganymede
cert_ignore=0
console=0
ssh_enabled=1
exec=
clientname=
loadbalanceinfo=
server=10.42.1.8
colordepth=64
ssh_auth=3
postcommand=
group=
sharesmartcard=0
quality=1
username=barak
ssh_charset=
ssh_loopback=0
ssh_username=barak
gateway_password=
gateway_server=
gateway_username=
microphone=0
execpath=
resolution_width=
gateway_usage=0
disableautoreconnect=0
password=.
resolution_height=
security=
domain=
disablepasswordstoring=0
precommand=
ssh_server=barakmich.com:2222
protocol=RDP
shareprinter=0
gateway_domain=
disableclipboard=0
ssh_privatekey=
last_success=20190426
window_maximize=0
window_height=1411
window_width=1276
viewmode=4
keyboard_grab=1

View file

@ -1,3 +1,2 @@
text/html; w3m -I %{charset} -T text/html -cols 150; copiousoutput;
text/html; w3m -I %{charset} -T text/html -cols 150 -o display_link_number=1; copiousoutput;
#text/html; pandoc -f html -t markdown; copiousoutput;

View file

@ -1,10 +1,10 @@
set imap_user = "barak@barakmich.com"
set imap_user = "bmichener@lyft.com"
#set imap_pass = "secret"
source ~/.mutt/secret
set smtp_url = "smtp://barak@barakmich.com@smtp.gmail.com:587/"
set smtp_url = "smtp://bmichener@lyft.com@smtp.gmail.com:587/"
#set smtp_pass = "secret"
set from = "me@barakmich.com"
set from = "barakmich@lyft.com"
set realname = "Barak Michener"
set folder = "imaps://imap.gmail.com:993"

View file

@ -1,12 +1,15 @@
{
"suggest.timeout": 5000,
"suggest.enablePreview": true,
"suggest.maxPreviewWidth": 70,
"suggest.enablePreselect": false,
"suggest.noselect": true,
"diagnostic.displayByAle": false,
"diagnostic.checkCurrentLine": true,
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.mypyEnabled": true,
"python.linting.mypyArgs": ["--ignore-missing-imports"],
"python.venvFolders": [".virtualenvs"],
"python.jediEnabled": true,
"python.autoComplete.addBrackets": false,
"suggest.detailField": "abbr",
@ -22,14 +25,14 @@
}
}
},
"golang": {
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
"filetypes": ["go"]
}
},
"python.autoComplete.extraPaths": [
},
"python.autoComplete.extraPaths": [
"${env:SPARK_HOME}/python",
"${env:SPARK_HOME}/python/pyspark"
]
]
}

View file

@ -432,3 +432,5 @@ hi SignifySignChange guifg=#4a343a guibg=#181818 gui=none
hi SignifySignChange ctermfg=100 ctermbg=233 cterm=none
hi SignifySignDelete guifg=#6c6661 guibg=#181818 gui=none
hi SignifySignDelete ctermfg=124 ctermbg=233 cterm=none
hi CocErrorSign ctermfg=166 guifg=#d03000

53
.vimrc
View file

@ -81,11 +81,17 @@ if exists('veonim')
" set linespace=10
endif
if exists('gnvim')
set guifont=Droid\ Sans\ Mono\ Dotted:h15
endif
" Required:
set runtimepath+=/home/barak/.vim/bundle/repos/github.com/Shougo/dein.vim
" Required:
call plug#begin('/home/barak/.vim/bundle')
" Aw, fuck, I can't believe you've done this.
" Plugins that must be first
Plug '/home/barak/.vim/bundle/repos/github.com/Shougo/dein.vim'
@ -116,10 +122,9 @@ Plug 'bps/vim-textobj-python'
" Plugins I NEED
Plug 'scrooloose/nerdcommenter'
Plug 'sjbach/lusty'
"Plug 'sjbach/lusty'
"Plug 'w0rp/ale'
"Plug 'airblade/vim-gitgutter'
Plug 'mhinz/vim-signify'
Plug 'airblade/vim-gitgutter'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'junegunn/fzf'
@ -175,7 +180,11 @@ Plug 'hwayne/tla.vim'
"\ 'do': 'bash install.sh',
"\ }
"Plug 'ensime/ensime-vim', { 'do': ':UpdateRemotePlugins' }
Plug 'neoclide/coc.nvim', {'tag': '*', 'do': './install.sh'}
Plug 'neoclide/coc.nvim', {'branch': 'release'}
"Plug 'prabirshrestha/async.vim'
"Plug 'prabirshrestha/vim-lsp'
"Plug 'prabirshrestha/asyncomplete.vim'
"Plug 'prabirshrestha/asyncomplete-lsp.vim'
" Plugins that do specific things
Plug 'Shougo/vimproc.vim'
@ -225,6 +234,7 @@ autocmd InsertLeave * if pumvisible() == 0|pclose|endif
"source ~/.vim/supertab.vim
"source ~/.vim/charm.vim
"source ~/.vim/plugin/AppleT.vim
source ~/.vim/vim-lsp-conf.vim
runtime macros/matchit.vim
" Completion features (TODO: Add to filetype.vim)
@ -463,6 +473,7 @@ let g:go_updatetime = 300
let g:go_bin_path = $HOME . "/.go/bin"
"let g:go_def_mode = 'gopls'
"let g:go_info_mode = 'gopls'
let g:go_def_mode = 'guru'
" ** STATUSLINE **
set laststatus=2
@ -678,7 +689,8 @@ nnoremap gK :bdelete!<CR>
" I use gn/gp to cycle through open tabs/buffers
nnoremap gn :bn<CR>
nnoremap gp :bp<CR>
nnoremap gz :pclose<CR>
"nnoremap gz :pclose<CR>
nnoremap gz :!zeal "<cword>"&<CR><CR>
" The single most handy way to get around a file. Cursor over a word, and then
" type g* -- you'll go to the next instance of that word in the file. Make it
" easier to reach by calling it gw (go-word) instead of hidden away.
@ -751,8 +763,8 @@ nnoremap <Leader>fn :lnext<CR>
" Prev quickfix.
nnoremap <Leader>fp :lprev<CR>
"nnoremap <silent> <Leader>aa :<C-u>Denite -mode=normal -buffer-name=search-buffer grep<CR>
nnoremap <silent> <Leader>ac :<C-u>Denite -resume -mode=normal -buffer-name=search-buffer<CR>
nnoremap <silent> <Leader>aw :<C-u>DeniteCursorWord -mode=normal -buffer-name=search-buffer grep<CR>
nnoremap <silent> <Leader>ac :<C-u>Denite -resume -buffer-name=search-buffer<CR>
nnoremap <silent> <Leader>aw :<C-u>DeniteCursorWord -buffer-name=search-buffer grep<CR>
call denite#custom#map('insert', '<Enter>', '<C-o>')
call denite#custom#var('grep', 'command', ['pt'])
call denite#custom#var('grep', 'default_opts',
@ -762,10 +774,26 @@ call denite#custom#var('grep', 'pattern_opt', [])
call denite#custom#var('grep', 'separator', ['--'])
call denite#custom#var('grep', 'final_opts', [])
call denite#custom#option('search-buffer', 'highlight_matched_char', 'deniteMatchedChar')
nnoremap <silent> <Leader>g :<C-u>Denite -buffer-name=search-buffer grep<CR>
nnoremap <silent> <Leader>aa :<C-u>RipGrep!<CR>
nnoremap <C-l> :<C-u>Files! `git rev-parse --show-toplevel`<CR>
nnoremap <C-k> :<C-u>Buffers<CR>
"nnoremap <silent> <Leader>aa :<C-u>RipGrep!<CR>
autocmd FileType denite call s:denite_my_settings()
function! s:denite_my_settings() abort
nnoremap <silent><buffer><expr> <CR>
\ denite#do_map('do_action')
nnoremap <silent><buffer><expr> d
\ denite#do_map('do_action', 'delete')
nnoremap <silent><buffer><expr> p
\ denite#do_map('do_action', 'preview')
nnoremap <silent><buffer><expr> q
\ denite#do_map('quit')
nnoremap <silent><buffer><expr> i
\ denite#do_map('open_filter_buffer')
nnoremap <silent><buffer><expr> <Space>
\ denite#do_map('toggle_select').'j'
endfunction
nnoremap <silent> <Leader>aa :<C-u>Denite -buffer-name=search-buffer grep<CR>
"nnoremap <silent> <Leader>aa :<C-u>RipGrep!<CR>
nnoremap <C-k> :<C-u>Files! `git rev-parse --show-toplevel`<CR>
" nnoremap <C-k> :<C-u>Buffers<CR>
" For C++ -- A is a great plugin which allows you to jump from the c file to the
" header and vice-versa. Mneumonic here is headerheader.
nnoremap <Leader>hh :A<CR>
@ -776,6 +804,7 @@ nnoremap <silent> <Leader>o :CtrlPBuffer<CR>
"nnoremap <Leader>p :PTW
nnoremap <Leader>p :LustyJugglePrevious<CR>
nnoremap <Leader>jd :YcmCompleter GoToDefinitionElseDeclaration<CR>
nnoremap <Leader>mm :w<CR>:make!<CR>
" ** EXTRA INCLUDES **
"
@ -787,7 +816,7 @@ endif
" ** SEE ALSO **
" filetype.vim
command Comments lexpr system('/home/barak/src/gogh/src/github.com/barakmich/gogh/gogh')
command Comments lexpr system('/home/bmichener/src/gogh/src/github.com/barakmich/gogh/gogh')
"call remote#host#RegisterPlugin('python3', '/home/barak/.vim/bundle/deoplete.nvim/rplugin/python3/deoplete', [

View file

@ -24,6 +24,8 @@ rofi -key-run control-space -fuzzy -terminal run_terminal &
remmina -i &
setxkbmap -option ctrl:nocaps &
xmodmap ~/.Xmodmap &
xset +fp $HOME/.local/share/fonts
xset fp rehash
#synclient PalmDetect=1
# Running a really minimal arch system? This helps:

6
.zshrc
View file

@ -132,6 +132,12 @@ if [ -f '/home/barak/local/google-cloud-sdk/path.zsh.inc' ]; then source '/home/
# The next line enables shell command completion for gcloud.
if [ -f '/home/barak/local/google-cloud-sdk/completion.zsh.inc' ]; then source '/home/barak/local/google-cloud-sdk/completion.zsh.inc'; fi
if [ -f "$HOME/.zshrc_work" ]; then source "$HOME/.zshrc_work"; fi
if [ -f "$HOME/.config/zsh/fzf-completion.zsh" ]; then source "$HOME/.config/zsh/fzf-completion.zsh"; fi
if [ -f "$HOME/.config/zsh/fzf-key-bindings.zsh" ]; then source "$HOME/.config/zsh/fzf-key-bindings.zsh"; fi
# This enables autocomplete for kubectl
if [ $commands[kubectl] ]; then
source <(kubectl completion zsh)