From 9db9e2b5c4bdd5dafbb1a742cfd7b732317a6fbf Mon Sep 17 00:00:00 2001 From: Aleksander Cynarski Date: Sun, 13 Jan 2019 16:48:17 +0100 Subject: [PATCH] dynamic color by wal support in tmux/powerline theme --- .thymerc | 11 ++++++++--- .tmux.conf | 8 +++++--- README.md | 29 +++++++++++++++++++++++------ tmux/powerline/segments/xkb_layout | Bin 0 -> 16752 bytes tmux/powerline/themes/default.sh | 2 +- tmux/powerline/themes/paramah.sh | 25 +++++++++++++------------ 6 files changed, 50 insertions(+), 25 deletions(-) create mode 100755 tmux/powerline/segments/xkb_layout diff --git a/.thymerc b/.thymerc index 045817a..9ae01f7 100644 --- a/.thymerc +++ b/.thymerc @@ -2,7 +2,7 @@ set :timer, 25*60 # 25 minute pomodoros set :timer_break, 5*60 # 5 minute breaks set :warning, 5*60 # show warning color in tmux at <5 minutes, 0 to disable set :warning_color, 'red,bold' # warning color for tmux is red/bold -set :break_color, 'magenta' # break color is blue +set :break_color, 'magenta' # break color is blue set :interval, 1 # refresh timer every 1 second set :tmux, true # turn on tmux integration set :tmux_theme, "#[fg=mycolor,bg=mycolor]#[fg=%s]%s#[fg=mycolor,bg=mycolor]" @@ -31,12 +31,17 @@ end # execute hook after each pomodoro after do |seconds_left| - `notify-send 'Pomidor skończony' 'Zrób sobie chwilę przerwy, pooddychaj, zapal, napij sie kawy, kogoś wkurz - nie wiem, zajmij się sobią :)'` if seconds_left == 0 + `notify-send 'Pomidor skończony' 'Zrób sobie chwilę przerwy, pooddychaj, zapal, napij sie kawy, kogoś wkurz - nie wiem, zajmij się sobą :)'` if seconds_left == 0 `tmux new-window -n _screensaver_ "~/bin/pipes.sh -r 0 -p 50 -t 3 -s 10; tmux set -g status on"` if seconds_left == 0 end # execute hook after thyme program quits after(:all) do - `notify-send 'Zrobiłeś pomidory' 'Jesteś z siebie dumny? \nTo dobrze, a teraz walcz dalej.'` + `notify-send 'Zrobiłeś pomidory' 'Pomidorek zakończony......'` end + + +option :t, :today, 'open today sheet' do + `vim ~/.thyme_today.md < \`tty\` > \`tty\`` +end diff --git a/.tmux.conf b/.tmux.conf index 2aa70ef..d7ab5fe 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -49,7 +49,8 @@ set -g default-terminal "screen-256color" # Define my custom menu bar # status bar colors set -g status-bg colour0 -set -g status-fg white +set -g status-fg colour13 + # alignment settings set-option -g status-justify centre @@ -59,8 +60,8 @@ set -g status-interval 1 # window list options # setw -g automatic-rename on -set-window-option -g window-status-format "#[fg=colour0,bg=colour234,nobold,noitalics,nounderscore] #[fg=colour208,bg=colour234,nobold,noitalics,nounderscore]#I#F  #[fg=colour233,bg=colour234,nobold,noitalics,nounderscore]#[fg=colour208,bg=colour234,nobold,noitalics,nounderscore]#W #[fg=colour234,bg=colour0,nobold,noitalics,nounderscore] " -set-window-option -g window-status-current-format "#[fg=colour0,bg=colour208,nobold,noitalics,nounderscore] #[fg=colour0,bg=colour208,nobold,noitalics,nounderscore]#I#F  #[fg=colour232,bg=colour208,bold,noitalics,nounderscore]#W #[fg=colour208,bg=colour0,nobold,noitalics,nounderscore]" +set-window-option -g window-status-format "#[fg=colour0,bg=colour1,nobold,noitalics,nounderscore] #[fg=colour0,bg=colour1,nobold,noitalics,nounderscore]#I#F  #[fg=colour15,bg=colour1,nobold,noitalics,nounderscore]#[fg=colour0,bg=colour1,nobold,noitalics,nounderscore]#W #[fg=colour1,bg=colour0,nobold,noitalics,nounderscore]" +set-window-option -g window-status-current-format "#[fg=colour0,bg=colour6,nobold,noitalics,nounderscore]#[fg=colour0,bg=colour6,nobold,noitalics,nounderscore]#I#F  #[fg=colour232,bg=colour6,bold,noitalics,nounderscore]#W #[fg=colour6,bg=colour0,nobold,noitalics,nounderscore]" set-option -ga terminal-overrides ',*:enacs@:smacs@:rmacs@:acsc@' # Reload tmux conf @@ -73,6 +74,7 @@ set -g @plugin 'tmux-plugins/tmux-sidebar' set -g @plugin 'tmux-plugins/tmux-copycat' set -g @plugin 'tmux-plugins/tmux-resurrect' #set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @plugin 'tmux-plugins/tmux-sessionist' set -g default-terminal "screen-256color" diff --git a/README.md b/README.md index bf35a79..f88ae71 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,28 @@ ## Konfiguracja dla: -- neovim -- tmux -- tmuxp -- zsh -- taskwarrior -- eg +- [neovim][neovim] +- [tmux][tmux] +- [tmuxp][tmuxp] +- [zsh][zsh] +- [taskwarrior][taskwarrior] +- [eg][eq] + +## Dodatkowe oprogramowanie + +- [powerlevel9k][powerlevel9k] +- [powerline][powerline] +- [thyme][thyme] +- [taskwarrior][taskwarrior] + +[neovim]: https://github.com/neovim/neovim "NeoVim" +[tmux]: https://github.com/tmux/tmux/wiki "tmux" +[tmuxp]: https://github.com/tmux-python/tmuxp "tmuxp" +[zsh]: http://www.zsh.org/ "zsh" +[eg]: https://github.com/srsudar/eg "eg" +[powerlevel9k]: https://github.com/bhilburn/powerlevel9k "Powerlevel9k" +[powerline]: https://github.com/b-ryan/powerline-shell "Powerline" +[thyme]: https://github.com/sourcegraph/thyme "Thyme" +[taskwarrior]: https://taskwarrior.org/ "TaskWarrior" diff --git a/tmux/powerline/segments/xkb_layout b/tmux/powerline/segments/xkb_layout new file mode 100755 index 0000000000000000000000000000000000000000..6a22d987c38a93f0c5a3a373160d83e8e5698636 GIT binary patch literal 16752 zcmeHOeQZ z<443=u>kl69W&&zK|pGhQMZ+P3HJa+yVE4M)3v0>lzWI2?dB_&u|rUp3OWz8YeWI@ zcKR&!gDK0a?MY}1MbeK|Dxm@tre-_r%EdNaEG~9g=_IvxoG9BNi*}dD?h@HC6|7H` z0D{NZ9LrB*1086%m+I3^G5%u+rRsO-Vq#M94Z8mUkbm4@WYrb zf*+T~P+?v4f#-<&OW=1O{IKBI!Sh8N^-&M`aqI2@PP!Jn81KRyrs+&uWcdGJkuOYpOoFaVMr1pXQLZK#8v0n9H}2}QOF z&+B-z*lWXoM7UjF!1X>D3gHFr6zag>E;X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cmV?d00001 diff --git a/tmux/powerline/themes/default.sh b/tmux/powerline/themes/default.sh index dbb06d7..44689d3 100644 --- a/tmux/powerline/themes/default.sh +++ b/tmux/powerline/themes/default.sh @@ -39,7 +39,7 @@ fi if [ -z $TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS ]; then TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS=( - #"earthquake 3 0" \ + "earthquake 3 0" \ "pwd 89 211" \ "mailcount 9 255" \ "now_playing 234 37" \ diff --git a/tmux/powerline/themes/paramah.sh b/tmux/powerline/themes/paramah.sh index daa91f2..bb94dfd 100644 --- a/tmux/powerline/themes/paramah.sh +++ b/tmux/powerline/themes/paramah.sh @@ -13,7 +13,7 @@ else fi TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR:-'0'} -TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR:-'255'} +TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR:-'0'} TMUX_POWERLINE_DEFAULT_LEFTSIDE_SEPARATOR=${TMUX_POWERLINE_DEFAULT_LEFTSIDE_SEPARATOR:-$TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD} TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SEPARATOR=${TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SEPARATOR:-$TMUX_POWERLINE_SEPARATOR_LEFT_BOLD} @@ -23,13 +23,13 @@ TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SEPARATOR=${TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SE if [ -z $TMUX_POWERLINE_LEFT_STATUS_SEGMENTS ]; then TMUX_POWERLINE_LEFT_STATUS_SEGMENTS=( - "hostname 228 234" \ - "tmux_session_info 208 232" \ + "hostname 4 0" \ + "tmux_session_info 3 0" \ #"ifstat 30 255" \ #"ifstat_sys 30 255" \ - "lan_ip 124 234" \ + "lan_ip 8 0" \ #"wan_ip 234 255" \ - #"vcs_branch 29 88" \ + "vcs_branch 29 88" \ #"vcs_compare 60 255" \ #"vcs_staged 64 255" \ #"vcs_modified 9 255" \ @@ -43,17 +43,18 @@ if [ -z $TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS ]; then #"pwd 89 211" \ #"mailcount 9 255" \ #"now_playing 234 37" \ - #"cpu 240 136" \ + #"cpu 4 0" \ #"tmux_mem_cpu_load 234 136" \ - "battery 124 234" \ + "wan_ip 3 0" \ + "battery 14 0" \ #"weather 37 255" \ #"rainbarf 0 ${TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR}" \ #"xkb_layout 125 117" \ - "date_day 235 136" \ - "date 235 136 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \ - "time 235 136 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \ - "thyme 124 167" \ - "powerline_taskwarrior.context" \ + #"date_day 7 0" \ + "date 7 0 ${TMUX_POWERLINE_SEPARATOR_LEFT_BOLD}" \ + #"time 235 136 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \ + "thyme 0 6" \ + #"powerline_taskwarrior.context 0 14" \ #"utc_time 235 136 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \ ) fi