added script to output current number of docker containers and images
This commit is contained in:
parent
de0a44844a
commit
df07675097
BIN
bin/.docker.sh.swp
Normal file
BIN
bin/.docker.sh.swp
Normal file
Binary file not shown.
8
bin/docker.sh
Executable file
8
bin/docker.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Outputs information about the current docker status
|
||||
DOCKER_STATUS=$(docker info)
|
||||
CONTAINERS=$(echo "$DOCKER_STATUS" | awk '/Containers/ {print $2}')
|
||||
RUNNING=$(echo "$DOCKER_STATUS" | awk '/Running/ {print $2}')
|
||||
STOPPED=$(echo "$DOCKER_STATUS" | awk '/Stopped/ {print $2}')
|
||||
IMAGES=$(echo "$DOCKER_STATUS" | awk '/Images/ {print $2}')
|
||||
echo -e "\ue7b0 $RUNNING \ufb99 $STOPPED \uf1c5 $IMAGES"
|
@ -23,7 +23,7 @@ set -g clock-mode-colour white
|
||||
# status config
|
||||
set -g status-interval 5
|
||||
set -g status-style "bg=black, fg=white"
|
||||
set -g status-right "| #(~/.tmux/plugins/tmux-mem-cpu-load/tmux-mem-cpu-load -p -i 1 -a 1)|#[default] %a %l:%M "
|
||||
set -g status-right "#(~/.dotfiles/bin/docker.sh) | #(~/.tmux/plugins/tmux-mem-cpu-load/tmux-mem-cpu-load -p -i 1 -a 1)|#[default] %a %l:%M "
|
||||
set -g status-right-length 100
|
||||
set -g status-left "#(~/.dotfiles/bin/weather/weather) | #(~/.dotfiles/bin/water/water.sh) |"
|
||||
set -g status-left-length 40
|
||||
|
2
vimrc
2
vimrc
@ -23,6 +23,7 @@ let g:go_highlight_extra_types=1
|
||||
|
||||
" nerdtree settings
|
||||
let NERDTreeHighlightCursorLine=1
|
||||
let NERDTreeQuitOnOpen=1
|
||||
autocmd StdinReadPre * let s:std_in=1
|
||||
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
|
||||
|
||||
@ -40,4 +41,3 @@ inoremap <up> <NOP>
|
||||
inoremap <down> <NOP>
|
||||
inoremap <left> <NOP>
|
||||
inoremap <right> <NOP>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user