aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Son Struschka <me@peter-struschka.com>2018-10-10 17:19:29 +0700
committerPeter Son Struschka <me@peter-struschka.com>2018-10-10 17:19:29 +0700
commit1297a2e0ec774a13c9900b63c2b4afbb6582a5d3 (patch)
tree1f633f33a5569f1924183ff801897d6e6fea4d37
parentc0cb935f9aaa33638344415aaede751ca3d29bb1 (diff)
downloaddotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.gz
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.bz2
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.lz
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.xz
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.zst
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.zip
multiple changes mostly to zsh and polybar
-rw-r--r--.gitmodules3
-rw-r--r--Makefile12
-rwxr-xr-xemacs/.emacs.d/init.el2
-rwxr-xr-xemacs/.emacs.d/myinit.org7
-rw-r--r--i3wm/.config/polybar/config101
-rwxr-xr-xi3wm/.config/polybar/launch.sh3
-rwxr-xr-xi3wm/.config/polybar/task_polybar.sh7
m---------spacemacs/.emacs.d0
-rwxr-xr-xspacemacs/.spacemacs.old (renamed from spacemacs/.spacemacs)0
-rw-r--r--zsh/.zfunc/_kitty14
-rwxr-xr-xzsh/.zprofile4
-rw-r--r--zsh/.zshrc39
12 files changed, 168 insertions, 24 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..9857a8e
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "spacemacs/.emacs.d"]
+ path = spacemacs/.emacs.d
+ url = https://github.com/syl20bnr/spacemacs
diff --git a/Makefile b/Makefile
index 20c68b0..ab64726 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,15 @@
all: emacs git i3wm vim x zsh
-clean: uninstall_emacs uninstall_git \
- uninstall_i3wm uninstall_vim \
- uninstall_x uninstall_zsh
+clean: uninstall_emacs uninstall_spacemacs \
+ uninstall_git uninstall_i3wm \
+ uninstall_vim uninstall_x uninstall_zsh
-.PHONY: emacs git i3wm vim x zsh
+.PHONY: emacs spacemacs git i3wm vim x zsh
emacs:
stow -t ~ emacs
+spacemacs:
+ stow -t ~ spacemacs
git:
stow -t ~ git
i3wm:
@@ -21,6 +23,8 @@ zsh:
uninstall_emacs:
stow -Dt ~ emacs
+uninstall_spacemacs:
+ stow -Dt ~ spacemacs
uninstall_git:
stow -Dt ~ git
uninstall_i3wm:
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index d6941d5..fa6c5e8 100755
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -36,7 +36,7 @@
("44961a9303c92926740fc4121829c32abca38ba3a91897a4eab2aa3b7634bed4" "fede08d0f23fc0612a8354e0cf800c9ecae47ec8f32c5f29da841fe090dfc450" "8e51e44e5b079b2862335fcc5ff0f1e761dc595c7ccdb8398094fb8e088b2d50" "7559ac0083d1f08a46f65920303f970898a3d80f05905d01e81d49bb4c7f9e39" default)))
'(package-selected-packages
(quote
- (racer yaml-mode pkgbuild-mode zenburn-theme color-theme-modern base16-theme spacemacs-theme dumb-jump which-key use-package undo-tree try treemacs-projectile spaceline smartparens rainbow-delimiters org-plus-contrib nlinum magit ivy-hydra iedit fzf flycheck expand-region exec-path-from-shell doom-modeline diminish counsel-projectile company color-theme-sanityinc-solarized aggressive-indent))))
+ (docker dockerfile-mode racer yaml-mode pkgbuild-mode zenburn-theme color-theme-modern base16-theme spacemacs-theme dumb-jump which-key use-package undo-tree try treemacs-projectile spaceline smartparens rainbow-delimiters org-plus-contrib nlinum magit ivy-hydra iedit fzf flycheck expand-region exec-path-from-shell doom-modeline diminish counsel-projectile company color-theme-sanityinc-solarized aggressive-indent))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
diff --git a/emacs/.emacs.d/myinit.org b/emacs/.emacs.d/myinit.org
index 6f1bc42..f53fa4d 100755
--- a/emacs/.emacs.d/myinit.org
+++ b/emacs/.emacs.d/myinit.org
@@ -409,3 +409,10 @@
:ensure t
:hook (rust-mode . cargo-minor-mode))
#+END_SRC
+** Docker
+ #+BEGIN_SRC emacs-lisp
+ (use-package docker
+ :ensure t)
+ (use-package docker-compose-mode
+ :ensure t)
+ #+END_SRC
diff --git a/i3wm/.config/polybar/config b/i3wm/.config/polybar/config
index e84be51..21b5a30 100644
--- a/i3wm/.config/polybar/config
+++ b/i3wm/.config/polybar/config
@@ -17,7 +17,7 @@
;==========================================================
[colors]
-n;background = ${xrdb:color0:#222}
+;background = ${xrdb:color0:#222}
background = #222
background-alt = #444
;foreground = ${xrdb:color7:#222}
@@ -28,13 +28,13 @@ secondary = #e60053
alert = #bd2c40
[bar/topbar]
-;monitor = ${env:MONITOR:HDMI-1}
+monitor = ${env:MONITOR:eDP-1}
width = 100%
height = 30
;offset-x = 1%
;offset-y = 1%
radius = 6.0
-fixed-center = false
+fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
@@ -59,9 +59,9 @@ font-3 = "Font Awesome 5 Brands:style=Regular:pixelsize=8;1"
font-4 = "Font Awesome 5 Free:style=Regular:pixelsize=8;1"
font-5 = "Font Awesome 5 Free:style=Solid:pixelsize=8;1"
-modules-left = i3 xwindow
+modules-left = hostname xwindow
modules-center = spotify
-modules-right = filesystem backlight pulseaudio xkeyboard memory cpu wlan eth battery temperature date powermenu
+modules-right = taskwarrior
tray-position = right
tray-padding = 2
@@ -70,24 +70,82 @@ tray-padding = 2
tray-scale = 1
;wm-restack = bspwm
-;wm-restack = i3
+wm-restack = i3
-;override-redirect = true
+override-redirect = false
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
-;scroll-up = i3wm-wsnext
-;scroll-down = i3wm-wsprev
+scroll-up = i3wm-wsnext
+scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
+[bar/topbar-second]
+monitor = ${env:MONITOR:eDP-1}
+width = 100%
+height = 30
+;offset-x = 1%
+;offset-y = 0
+;radius = 1.0
+fixed-center = true
+
+background = ${colors.background}
+foreground = ${colors.foreground}
+
+line-size = 3
+line-color = #f00
+
+border-size = 10
+border-top-size = 0
+border-bottom-size = 0
+border-color = #00000000
+
+padding-left = 2
+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
+font-3 = "Font Awesome 5 Brands:style=Regular:pixelsize=8;1"
+font-4 = "Font Awesome 5 Free:style=Regular:pixelsize=8;1"
+font-5 = "Font Awesome 5 Free:style=Solid:pixelsize=8;1"
+
+modules-left = i3
+modules-center =
+modules-right = filesystem backlight pulseaudio xkeyboard memory cpu wlan eth battery temperature date
+
+wm-restack = i3
+
+override-redirect = false
+
+scroll-up = i3wm-wsnext
+scroll-down = i3wm-wsprev
+
+cursor-click = pointer
+cursor-scroll = ns-resize
+
+[module/hostname]
+type = custom/script
+interval = 256
+format = "<label> "
+"format-prefix = "  "
+format-prefix = " ƸӜƷ "
+format-prefix-foreground = ${colors.secondary}
+format-padding = 0
+exec = echo "$(uname -n)"
+
[module/spotify]
type = custom/script
exec = spotifycl status
tail = true
+format = <label>
format-foreground = ${colors.foreground-alt}
format-underline = ${colors.primary}
click-right = xte 'key XF86AudioPlay'
@@ -95,11 +153,12 @@ click-left = xte 'key XF86AudioPlay'
click-middle = xte 'key XF86AudioNext'
scroll-up = xte 'key XF86AudioNext'
scroll-down = xte 'key XF86AudioPrev'
-
+label-maxlen = 30
+label-ellipsis = true
[module/xwindow]
type = internal/xwindow
-label = %title:0:30:...%
+label = %title:0:40:...%
[module/xkeyboard]
type = internal/xkeyboard
@@ -159,6 +218,7 @@ wrapping-scroll = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true
+label-mode = %mode%
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
@@ -188,6 +248,25 @@ label-urgent-padding = ${module/bspwm.label-urgent-padding}
; label-separator = |
+[module/taskwarrior]
+interval = 30
+type = custom/script
+exec = $HOME/.config/polybar/task_polybar.sh
+format = <label>
+format-foreground = #FFF
+format-prefix = "§ "
+click-left = task "$((`cat /tmp/tw_polybar_id`))" done
+
+[module/line-l]
+type = custom/text
+content = "____[ "
+content-foreground = ${colors.primary}
+
+[module/line-r]
+type = custom/text
+content = " ]____"
+content-foreground = ${colors.primary}
+
[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
diff --git a/i3wm/.config/polybar/launch.sh b/i3wm/.config/polybar/launch.sh
index 0b2f2d9..a0f26cd 100755
--- a/i3wm/.config/polybar/launch.sh
+++ b/i3wm/.config/polybar/launch.sh
@@ -7,6 +7,7 @@ killall -q polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch bar1 and bar2
-polybar topbar &
+MONITOR=$(polybar -m|tail -1|sed -e 's/:.*$//g') polybar topbar &
+MONITOR=$(polybar -m|tail -1|sed -e 's/:.*$//g') polybar topbar-second &
echo "Bars launched..."
diff --git a/i3wm/.config/polybar/task_polybar.sh b/i3wm/.config/polybar/task_polybar.sh
new file mode 100755
index 0000000..555ff1b
--- /dev/null
+++ b/i3wm/.config/polybar/task_polybar.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+most_urgent_desc=`task rc.verbose: rc.report.next.columns:description rc.report.next.labels:1 limit:1 next`
+most_urgent_id=`task rc.verbose: rc.report.next.columns:id rc.report.next.labels:1 limit:1 next`
+most_urgent_due=`task rc.verbose: rc.report.next.columns:due.relative rc.report.next.labels:1 limit:1 next`
+echo "$most_urgent_id" > /tmp/tw_polybar_id
+echo "$most_urgent_desc ·  $most_urgent_due"
diff --git a/spacemacs/.emacs.d b/spacemacs/.emacs.d
new file mode 160000
+Subproject c7a103a772d808101d7635ec10f292ab9202d9e
diff --git a/spacemacs/.spacemacs b/spacemacs/.spacemacs.old
index 0c0f627..0c0f627 100755
--- a/spacemacs/.spacemacs
+++ b/spacemacs/.spacemacs.old
diff --git a/zsh/.zfunc/_kitty b/zsh/.zfunc/_kitty
new file mode 100644
index 0000000..15918b5
--- /dev/null
+++ b/zsh/.zfunc/_kitty
@@ -0,0 +1,14 @@
+autoload -Uz compinit
+compinit
+
+_kitty() {
+ local src
+ # Send all words up to the word the cursor is currently on
+ src=$(printf "%s
+" "${(@)words[1,$CURRENT]}" | kitty +complete zsh)
+ if [[ $? == 0 ]]; then
+ eval ${src}
+ fi
+}
+compdef _kitty kitty
+
diff --git a/zsh/.zprofile b/zsh/.zprofile
index 8589282..400fa76 100755
--- a/zsh/.zprofile
+++ b/zsh/.zprofile
@@ -19,5 +19,9 @@ export PATH="$HOME/.bin:$PATH"
export PATH="$HOME/.cargo/bin:$HOME/.local/bin:$PATH"
export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"
+export PATH="$HOME/.node_modules/bin:$PATH"
+export npm_config_prefix=~/.node_modules
+
+
alias open=xdg-open
diff --git a/zsh/.zshrc b/zsh/.zshrc
index 7c3e4c5..404a8b7 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -3,10 +3,17 @@ source /usr/share/zsh/share/antigen.zsh
antigen use oh-my-zsh
antigen bundle git
+antigen bundle git-extras
antigen bundle pip
antigen bundle lein
antigen bundle command-not-found
antigen bundle docker
+antigen bundle archlinux
+antigen bundle sublime
+antigen bundle zsh-navigation-tools
+antigen bundle systemd
+antigen bundle taskwarrior
+antigen bundle virtualenvwrapper
fpath+=~/.zfunc
antigen bundle zsh-users/zsh-syntax-highlighting
@@ -22,10 +29,10 @@ POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=""
#POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="↳ "
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
POWERLEVEL9K_MODE='awesome-fontconfig'
-POWERLEVEL9K_SHORTEN_DIR_LENGTH=4
+POWERLEVEL9K_SHORTEN_DIR_LENGTH=3
-POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon context dir dir_writable vcs)
-POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs history time)
+POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon context virtualenv dir dir_writable vcs)
+POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status command_execution_time root_indicator background_jobs history time)
# antigen theme https://gist.github.com/pstruschka/c05686e6cf10e12471a3104e42e6366b.git agnoster_custom
antigen theme bhilburn/powerlevel9k powerlevel9k
@@ -33,16 +40,34 @@ antigen theme bhilburn/powerlevel9k powerlevel9k
antigen apply
-if ! type "exa" > /dev/null; then
- echo exa Missing, using ls
-else
+if type "kitty" > /dev/null; then
+ autoload -Uz compinit
+ compinit
+ # Completion for kitty
+ kitty + complete setup zsh | source /dev/stdin
+
+ alias kdiff="kitty +kitten diff"
+ alias kicat="kitty +kitten icat"
+ alias kunicode="kitty +kitten unicode_input"
+ alias kpanel="kitty +kitten panel"
+ alias khints="kitty +kitten hints"
+ alias kclip="kitty +kitten clipboard"
+fi
+
+
+if type "exa" > /dev/null; then
alias ls=exa
fi
-eval $(thefuck --alias)
+
+if type "thefuck" > /dev/null; then
+ eval $(thefuck --alias)
+fi
# python virtualenvwrapper
export WORKON_HOME=~/.virtualenvs
source /usr/bin/virtualenvwrapper_lazy.sh
+alias ec="emacsclient -c"
+
eval "$(fasd --init auto)"