summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bashrc7
-rw-r--r--.config/i3/config9
-rw-r--r--.gitignore2
-rw-r--r--.profile6
-rw-r--r--.vimrc6
-rw-r--r--Makefile2
-rwxr-xr-xbin/lt72
7 files changed, 96 insertions, 8 deletions
diff --git a/.bashrc b/.bashrc
index 2233d5f..a028766 100644
--- a/.bashrc
+++ b/.bashrc
@@ -41,6 +41,7 @@ export TERMINAL=xt
alias cl='cf xft:Mono:size=12'
alias ls='ls --color=auto'
alias ll='ls -alF'
+alias op='xdg-open'
alias git='hub'
alias go11='go1.11.13'
alias go12='go1.12.9'
@@ -64,12 +65,16 @@ alias by='go build cmd/yaegi/yaegi.go'
alias cy='cd ~/go/src/github.com/containous/yaegi'
alias ty='go test -v -short ./interp'
alias ya='rlwrap -pblue ./yaegi'
-alias dya='YAEGI_AST_DOT=1 YAEGI_CFG_DOT=1 ya'
+alias dya='YAEGI_AST_DOT=1 YAEGI_CFG_DOT=1 ./yaegi'
ws() (cd ~/Wiki && git status --short)
export -f ws
#PS1='[\u@\h \W]\$ '
+# fzf
+. /usr/share/fzf/completion.bash
+. /usr/share/fzf/key-bindings.bash
+
# Display git status in prompt
. ~/.bash-powerline.sh
diff --git a/.config/i3/config b/.config/i3/config
index 609bd3e..58a48f3 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -26,13 +26,14 @@ font fixed
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
-exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
+#exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
#exec --no-startup-id nm-applet
#exec --no-startup-id sudo wpa_gui -t -i wlo1
+# pulse audio systray icon
exec --no-startup-id pasystray
# Use pactl to adjust volume in PulseAudio.
@@ -46,6 +47,7 @@ bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOU
for_window [class="Arandr"] floating enable
for_window [class="Brave-browser"] floating enable
for_window [class="Chromium"] floating enable
+for_window [instance="Task Manager - Chromium"] floating enable
for_window [instance="DOTTY"] floating enable
for_window [class="discord"] floating enable
for_window [class="display"] floating enable
@@ -53,6 +55,7 @@ for_window [class="feh"] floating enable
for_window [class="firefox"] floating enable
for_window [class="gnuplot_qt"] floating enable
for_window [class="Geeqie"] floating enable
+for_window [class="Gitk"] floating enable
for_window [class="Keybase"] floating enable
for_window [class="MuPDF"] floating enable
for_window [class="Pavucontrol"] floating enable
@@ -72,9 +75,9 @@ bindsym button3 floating toggle
floating_modifier $mod
# start a terminal
-bindsym $mod+Return exec i3-sensible-terminal
+bindsym $mod+Return exec xt
bindsym F9 exec chromium
-bindsym F10 exec i3-sensible-terminal
+bindsym F10 exec xt
# kill focused window
bindsym $mod+Shift+a kill
diff --git a/.gitignore b/.gitignore
index 72e8ffc..a01ee28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-*
+.*.swp
diff --git a/.profile b/.profile
index 7ed9008..0db42b4 100644
--- a/.profile
+++ b/.profile
@@ -1,10 +1,10 @@
# ~/.profile
-export PATH=~/bin:$PATH:~/go/bin
+PATH=~/bin:$PATH:~/go/bin
-[ "${SHELL##*/}" = bash ] && [ -f ~/.bashrc ] && . ~/.bashrc
+[ "${SHELL##*/}" = bash ] && . ~/.bashrc
-# Last action: auto start X11 when logged on first terminal
+# Last action: auto start X11 when logged on first console
case $HOSTNAME in
(swift) [ "$(tty)" != /dev/tty1 ] || exec startx ;;
esac
diff --git a/.vimrc b/.vimrc
index 8e1e7c7..b811da5 100644
--- a/.vimrc
+++ b/.vimrc
@@ -3,6 +3,7 @@ set nocp
filetype plugin on
call plug#begin()
+Plug 'bilalq/lite-dfm'
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
call plug#end()
@@ -54,6 +55,11 @@ noremap <buffer> @ :s,^#,,
" hi MatchParen cterm=reverse term=reverse ctermfg=white
"
+" Fix spell highlighting
+hi clear SpellBad
+hi SpellBad cterm=underline
+hi SpellBad gui=undercurl
+
noremap <leader>o :!xdg-open <cfile>&<cr><cr>
noremap <C-g> :tag <c-r><c-w><cr>
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4ad3eff
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,2 @@
+install:
+ ./bin/lt . ~
diff --git a/bin/lt b/bin/lt
new file mode 100755
index 0000000..21afaf0
--- /dev/null
+++ b/bin/lt
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+# link tree
+
+lt_version='lt-0.1'
+unset CDPATH
+export LC_ALL=C IFS='
+'
+
+# ca returns the common ancestor between 2 paths
+# ca /h/u/a/b /h/u/c/d => /h/u
+ca() {
+ ca_p1=${1#/} ca_p2=${2#/} ca_r1= ca_r2= R1=/
+ while true; do
+ [ "$ca_p1" ] || [ "$ca_p2" ] || break
+ ca_r1=$ca_r1/${ca_p1%%/*} ca_p1=${ca_p1#*/}
+ ca_r2=$ca_r2/${ca_p2%%/*} ca_p2=${ca_p2#*/}
+ [ "$ca_r1" != "$ca_r2" ] && break
+ R1=$ca_r1
+ done
+}
+
+#echo ca $1 $2 && ca $1 $2 && echo "$R1"
+
+# bp returns the relative path from source to base
+bp() {
+ bp_s=$1 bp_b=$2 R1=
+ while true; do
+ [ "$bp_b" = "$bp_s" ] && break
+ bp_s=${bp_s%/*}
+ [ "$R1" ] && R1=$R1/.. || R1=..
+ done
+}
+
+#echo bp /h/u/a /h/u && bp /h/u/a /h/u && echo "$R1"
+
+# rp returns the relative path between src and base
+# rp /h/u/a/b/f /h/u/b/f [/h/u] ../a/b/f
+rp() {
+ rp_s=$1 rp_d=$2 rp_c=$3
+ ! [ "$rp_c" ] && ca "$1" "$2" && rp_c=$R1
+ rp_bd=${rp_d#$rp_c/}
+ rp_bs=${rp_s#$rp_c/}
+ bp "$rp_d" "$rp_c" && R1=$R1/$rp_bs && R1=${R1#../}
+}
+
+#rp /h/u/a/b /h/u/b && echo $R1
+
+skip=".git .gitignore .*.swp Makefile"
+
+# link tree src dest
+lt() {
+ d=$(mkdir -p "$2" && cd "$2" && pwd)
+ cd "$1" && s=$PWD
+ find . ! -type d -print | {
+ cd "$d"
+ while read f; do
+ for k in $skip; do
+ case $f in (./$k|./$k/*) continue 2;; esac
+ done
+ f=${f#./}
+ fd=$d/$f; fd=${fd%/*}
+ test -d "$fd" || $trace mkdir -p "$fd"
+ rp "$s/$f" "$d/$f" && $trace ln -sf "$R1" "$d/$f"
+ done
+ }
+}
+
+#trace=echo
+lt "$1" "$2"
+
+#echo $1 $2 $3 && $1 $2 $3 && echo $R1