diff --git a/.gitmodules b/.gitmodules index 37f6d8f..232c84e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -50,3 +50,6 @@ [submodule "vim/pack/man/start/vimtex"] path = vim/pack/man/start/vimtex url = https://github.com/lervag/vimtex.git +[submodule "bin/tmux-mem-cpu-load"] + path = bin/tmux-mem-cpu-load + url = https://github.com/thewtex/tmux-mem-cpu-load diff --git a/bin/agent/checker.sh b/bin/agent/checker.sh index d3992aa..0161257 100755 --- a/bin/agent/checker.sh +++ b/bin/agent/checker.sh @@ -1,9 +1,7 @@ #!/usr/bin/env bash # checks for agent status and echos to status bar -SOCK=$(readlink -f ~/.ssh/ssh_auth_sock) - -if [ -e $SOCK ] ; then +if [ -S ~/.ssh/ssh_auth_sock ] ; then # agent active clr='#[fg=color34]' # green symb=$(echo -e '\uf00c') diff --git a/bin/tmux_mem_cpu_load.sh b/bin/mclinstall.sh similarity index 50% rename from bin/tmux_mem_cpu_load.sh rename to bin/mclinstall.sh index 34a1ed6..238d00b 100755 --- a/bin/tmux_mem_cpu_load.sh +++ b/bin/mclinstall.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -cd $HOME/.dotfiles/tmux/plugins/tmux-mem-cpu-load +cd $HOME/.dotfiles/bin/tmux-mem-cpu-load cmake . make sudo make install diff --git a/bin/tmux-mem-cpu-load b/bin/tmux-mem-cpu-load new file mode 160000 index 0000000..5dccd18 --- /dev/null +++ b/bin/tmux-mem-cpu-load @@ -0,0 +1 @@ +Subproject commit 5dccd1801f36efb14e6b43ad90cb9569fe220d1c diff --git a/bin/weather/.weather b/bin/weather/.weather index bb2ab8c..0969f8e 100644 --- a/bin/weather/.weather +++ b/bin/weather/.weather @@ -1,9 +1,9 @@ -TEMP=35.06000000000000000000 -HUMIDITY=63.929305394195 -ICON=skc +TEMP=42.08000000000000000000 +HUMIDITY=88.816089115542 +ICON=ovc LOCATION= ZONE=https://api.weather.gov/zones/forecast/MAZ014 -CITY="Cambridge" -STATE="MA" +CITY=Cambridge +STATE=MA TOD=night -EXPIRATION=1673315272 +EXPIRATION=1673570805 diff --git a/bin/weather/consts b/bin/weather/archived/consts similarity index 100% rename from bin/weather/consts rename to bin/weather/archived/consts diff --git a/bin/weather/go.mod b/bin/weather/archived/go.mod similarity index 100% rename from bin/weather/go.mod rename to bin/weather/archived/go.mod diff --git a/bin/weather/go.sum b/bin/weather/archived/go.sum similarity index 100% rename from bin/weather/go.sum rename to bin/weather/archived/go.sum diff --git a/bin/weather/location.sh b/bin/weather/archived/location.sh similarity index 100% rename from bin/weather/location.sh rename to bin/weather/archived/location.sh diff --git a/bin/weather/main.go b/bin/weather/archived/main.go similarity index 100% rename from bin/weather/main.go rename to bin/weather/archived/main.go diff --git a/bin/weather/wttr b/bin/weather/archived/new_weather.sh similarity index 85% rename from bin/weather/wttr rename to bin/weather/archived/new_weather.sh index 9b533ef..083631c 100755 --- a/bin/weather/wttr +++ b/bin/weather/archived/new_weather.sh @@ -1,3 +1,24 @@ +#!/bin/bash +#source "$HOME/.dotfiles/.priv/key" +#source "$HOME/.dotfiles/bin/weather/.env.location" +#source "$HOME/.dotfiles/bin/weather/.env.weather" +# API_KEY=$(cat "$HOME/.dotfiles/bin/weather/.priv/key") +# getting weather +CUR_TIMESTAMP=$(date +%s) +# only update weather every 30 seconds + +if [[ $CUR_TIMESTAMP -gt $EXPIRATION || -z $EXPIRATION ]] ; then + WEATHER=$(curl --silent "http://wttr.in/${LOCATION}?format=j2" | gojq -r '.current_condition[0]') + + echo $WEATHER + TEMP=$(echo $WEATHER | gojq -r '.temp_F') + HUMIDITY=$(echo $WEATHER | gojq -r '.humidity') + ICON=$(echo $WEATHER | gojq -r '.weatherCode') + EXPIRATION=$(($CUR_TIMESTAMP+30)) + echo "TEMP: $TEMP HUMIDITY: $HUMIDITY ICON: $ICON" + #printf 'TEMP=%s\nHUMIDITY=%s\nICON=%s\nEXPIRATION=%s\n' "$TEMP" "$HUMIDITY" "$ICON" "$EXPIRATION" >"$HOME/.dotfiles/bin/weather/.env.weather" +fi + #!/usr/bin/env bash WEATHER_DIR="${HOME}/.dotfiles/bin/weather" diff --git a/bin/weather/symbol_test.sh b/bin/weather/archived/symbol_test.sh similarity index 100% rename from bin/weather/symbol_test.sh rename to bin/weather/archived/symbol_test.sh diff --git a/bin/weather/symbols.go b/bin/weather/archived/symbols.go similarity index 100% rename from bin/weather/symbols.go rename to bin/weather/archived/symbols.go diff --git a/bin/weather/archived/weather b/bin/weather/archived/weather new file mode 100755 index 0000000..bdf73a6 Binary files /dev/null and b/bin/weather/archived/weather differ diff --git a/bin/weather/weather.sh b/bin/weather/archived/weather.sh similarity index 100% rename from bin/weather/weather.sh rename to bin/weather/archived/weather.sh diff --git a/bin/weather/new_weather.sh b/bin/weather/new_weather.sh deleted file mode 100755 index f5b8d32..0000000 --- a/bin/weather/new_weather.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -#source "$HOME/.dotfiles/.priv/key" -#source "$HOME/.dotfiles/bin/weather/.env.location" -#source "$HOME/.dotfiles/bin/weather/.env.weather" -# API_KEY=$(cat "$HOME/.dotfiles/bin/weather/.priv/key") -# getting weather -CUR_TIMESTAMP=$(date +%s) -# only update weather every 30 seconds - -if [[ $CUR_TIMESTAMP -gt $EXPIRATION || -z $EXPIRATION ]] ; then - WEATHER=$(curl --silent "http://wttr.in/${LOCATION}?format=j2" | gojq -r '.current_condition[0]') - - echo $WEATHER - TEMP=$(echo $WEATHER | gojq -r '.temp_F') - HUMIDITY=$(echo $WEATHER | gojq -r '.humidity') - ICON=$(echo $WEATHER | gojq -r '.weatherCode') - EXPIRATION=$(($CUR_TIMESTAMP+30)) - echo "TEMP: $TEMP HUMIDITY: $HUMIDITY ICON: $ICON" - #printf 'TEMP=%s\nHUMIDITY=%s\nICON=%s\nEXPIRATION=%s\n' "$TEMP" "$HUMIDITY" "$ICON" "$EXPIRATION" >"$HOME/.dotfiles/bin/weather/.env.weather" -fi diff --git a/bin/weather/symbols.sh b/bin/weather/symbols.sh deleted file mode 100644 index 8c30506..0000000 --- a/bin/weather/symbols.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -# source symbol based on $WEATHER_CODE and $TOD -# WeatherCodesDay := map[string]rune{ -# "Unkown": '\ue374', -# "Cloudy": '\ue302', -# "Fog": '\ue303', -# "HeavyRain": '\ue318', -# "HeavyShowers": '\ue318', -# "HeavySnow": '\ue31a', -# "HeavySnowShowers": '\ue31a', -# "LightRain": '\ue308', -# "LightShowers": '\ue308', -# "LightSleet": '\ue3aa', -# "LightSleetShowers": '\ue3aa', -# "LightSnow": '\ue30a', -# "LightSnowShowers": '\ue30a', -# "PartlyCloudy": '\ue37b', -# "Sunny": '\ue30d', -# "ThunderyHeavyRain": '\ue31d', -# "ThunderyShowers": '\ue31d', -# "ThunderySnowShowers": '\ue365', -# "VeryCloudy": '\ue312', -# } - -# WeatherCodesNight := map[string]rune{ -# "Unkown": '\ue374', -# "Cloudy": '\ue37e', -# "Fog": '\ue346', -# "HeavyRain": '\ue318', -# "HeavyShowers": '\ue318', -# "HeavySnow": '\ue31a', -# "HeavySnowShowers": '\ue31a', -# "LightRain": '\ue325', -# "LightShowers": '\ue325', -# "LightSleet": '\ue3ac', -# "LightSleetShowers": '\ue3ac', -# "LightSnow": '\ue361', -# "LightSnowShowers": '\ue361', -# "PartlyCloudy": '\ue379', -# "Sunny": '\ue32b', -# "ThunderyHeavyRain": '\ue31d', -# "ThunderyShowers": '\ue31d', -# "ThunderySnowShowers": '\ue366', -# "VeryCloudy": '\ue312', -# } diff --git a/bin/weather/tmp.json b/bin/weather/tmp.json deleted file mode 100644 index a11ff0e..0000000 --- a/bin/weather/tmp.json +++ /dev/null @@ -1 +0,0 @@ -{ "FeelsLikeC": "28", "FeelsLikeF": "82", "cloudcover": "75", "humidity": "48", "localObsDateTime": "2022-08-17 01:09 PM", "observation_time": "05:09 PM", "precipInches": "0.0", "precipMM": "0.3", "pressure": "1015", "pressureInches": "30", "temp_C": "25", "temp_F": "77", "uvIndex": "4", "visibility": "16", "visibilityMiles": "9", "weatherCode": "116", "weatherDesc": [ { "value": "Partly cloudy" } ], "weatherIconUrl": [ { "value": "" } ], "winddir16Point": "E", "winddirDegree": "80", "windspeedKmph": "22", "windspeedMiles": "14" } diff --git a/bin/weather/weather b/bin/weather/weather index bdf73a6..9b533ef 100755 Binary files a/bin/weather/weather and b/bin/weather/weather differ diff --git a/install.conf.yaml b/install.conf.yaml index c688c57..767b37d 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -28,6 +28,12 @@ - [cp ./vim/hybrid/colors/hybrid.vim ./vim/colors/hybrid.vim, Setting up theme] - [tmux/plugins/tpm/bin/install_plugins, Installing Tmux Plugins] - [tmux/plugins/tpm/bin/update_plugins all, Updating Tmux Plugins] + - + command: bin/mclinstall.sh + stdin: true + stdout: true + stderr: true + description: Installing tmux_mem_cpu_load - command: pip install ranger-fm stdin: true @@ -46,11 +52,6 @@ stdout: true stderr: true description: Installing Fzf - - - command: bin/tmux_mem_cpu_load.sh - stdin: true - stdout: true - description: Building the mem-cpu-load tracker for tmux - command: bin/weather/symbol_test.sh stdout: true diff --git a/tmux.conf b/tmux.conf index 935b911..636796c 100644 --- a/tmux.conf +++ b/tmux.conf @@ -17,7 +17,7 @@ set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' # status bar -set -g @plugin 'thewtex/tmux-mem-cpu-load' +#set -g @plugin 'thewtex/tmux-mem-cpu-load' # clock settings set -g clock-mode-colour white @@ -25,9 +25,10 @@ set -g clock-mode-colour white # status config set -g status-interval 10 set -g status-style "bg=black, fg=brightWhite" -set -g status-right "#(~/.dotfiles/bin/docker.sh)| #(~/.dotfiles/bin/agent/checker.sh) | #(~/.tmux/plugins/tmux-mem-cpu-load/tmux-mem-cpu-load -p -i 1 -a 1) | #(~/.dotfiles/bin/up.sh) | %A, %b %d %l:%M %P " +#set -g status-right "#(~/.dotfiles/bin/docker.sh)| #(~/.dotfiles/bin/agent/checker.sh) | #($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load -p -i 1 -a 1) | #(~/.dotfiles/bin/up.sh) | %A, %b %d %l:%M %P " +set -g status-right "#(~/.dotfiles/bin/docker.sh)| #(~/.dotfiles/bin/agent/checker.sh) | #(tmux-mem-cpu-load -p -i 1 -a 1) | #(~/.dotfiles/bin/up.sh) | %A, %b %d %l:%M %P " set -g status-right-length 100 -set -g status-left "#(~/.dotfiles/bin/weather/weather) | #(~/.dotfiles/bin/bluebikes/bb -c) | #(~/.dotfiles/bin/water/water.sh -Scr) |" +set -g status-left "#(~/.dotfiles/bin/weather/weather -p) | #(~/.dotfiles/bin/bluebikes/bb -c) | #(~/.dotfiles/bin/water/water.sh -Scr) |" set -g status-left-length 100 # tmux auto start @@ -39,11 +40,11 @@ set -g @continuum-save-interval 10 set -g @resurrect-capture-pane-contents 'on' set -g @resurrect-strategy-vim 'session' set -g @continuum-boot 'on' -set -g @continuum-systemd-start-cmd 'new-session -d -s doormat' +#set -g @continuum-systemd-start-cmd 'new-session -d -s doormat' # run tpm run '~/.tmux/plugins/tpm/tpm' #-#-# start_of_ranger_tmux_config #-#-# -bind-key Bspace run-shell -b '/sbin/python -m ranger_tmux.drop' +bind-key Bspace run-shell -b '/usr/bin/python -m ranger_tmux.drop' #-#-# end_of_ranger_tmux_config #-#-#