diff --git a/.config/i3/status-double-bat.toml b/.config/i3/status-double-bat.toml index e7cb0e98..274e6bba 100644 --- a/.config/i3/status-double-bat.toml +++ b/.config/i3/status-double-bat.toml @@ -12,8 +12,19 @@ interval = 60 format = "%R %a %d.%m" [[block]] -block = "networkmanager" -primary_only = true +block = "custom" +command = ''' /home/cyryl/dev/dotfiles/nixos/i3/openweathermap-fullfeatured.sh ''' +interval = 600 + +[[block]] +block = "net" +device = "wlp3s0" +ssid = true +signal_strength = true +speed_up = false +speed_down = false +hide_missing = true +hide_inactive = true [[block]] block = "cpu" @@ -44,6 +55,14 @@ alert = 10.0 [[block]] block = "sound" +[[block]] +block = "backlight" + +[[block]] +block = "kdeconnect" +format = "{name}" +format_disconnected = "" + [[block]] block = "bluetooth" mac = "28:11:A5:E1:3C:57" diff --git a/nixos/i3/i3.nix b/nixos/i3/i3.nix index 12bb52a7..62756408 100644 --- a/nixos/i3/i3.nix +++ b/nixos/i3/i3.nix @@ -30,7 +30,7 @@ in bars = [ { position = "top"; - colors.background= "#002b36"; + colors.background = "#002b36"; fonts = [ "Fira Code Nerd Font 10" ]; statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${config.xdg.configHome}/i3/status.toml"; trayOutput = "primary"; diff --git a/nixos/i3/polybar/openweathermap-fullfeatured.sh b/nixos/i3/openweathermap-fullfeatured.sh similarity index 66% rename from nixos/i3/polybar/openweathermap-fullfeatured.sh rename to nixos/i3/openweathermap-fullfeatured.sh index c94137d1..8fae90e8 100755 --- a/nixos/i3/polybar/openweathermap-fullfeatured.sh +++ b/nixos/i3/openweathermap-fullfeatured.sh @@ -18,23 +18,25 @@ UNAME=`which uname` get_icon() { case $1 in - 01d) icon="";; - 01n) icon="";; - 02d) icon="";; - 02n) icon="";; - 03*) icon="";; - 04*) icon="";; - 09d) icon="";; - 09n) icon="";; - 10d) icon="";; - 10n) icon="";; - 11d) icon="";; - 11n) icon="";; - 13d) icon="";; - 13n) icon="";; - 50d) icon="";; - 50n) icon="";; - *) icon=""; + 01d) icon="";; + 01n) icon="";; + 02d) icon="";; + 02n) icon="";; + 03d) icon="";; + 03n) icon="";; + 04d) icon="";; + 04n) icon="";; + 09d) icon="";; + 09n) icon="";; + 10d) icon="";; + 10n) icon="";; + 11d) icon="";; + 11n) icon="";; + 13d) icon="";; + 13n) icon="";; + 50d) icon="";; + 50n) icon="";; + *) icon=""; esac echo $icon @@ -74,19 +76,21 @@ fi if [ -n "$current" ] && [ -n "$forecast" ]; then current_temp=$(echo "$current" | $JQ ".main.temp" | $CUT -d "." -f 1) + current_feels=$(echo "$current" | $JQ ".main.feels_like" | $CUT -d "." -f 1) current_icon=$(echo "$current" | $JQ -r ".weather[0].icon") forecast_temp=$(echo "$forecast" | $JQ ".list[].main.temp" | $CUT -d "." -f 1) + forecast_feels=$(echo "$forecast" | $JQ ".list[].main.feels_like" | $CUT -d "." -f 1) forecast_icon=$(echo "$forecast" | $JQ -r ".list[].weather[0].icon") if [ "$current_temp" -gt "$forecast_temp" ]; then - trend="" + trend="" elif [ "$forecast_temp" -gt "$current_temp" ]; then - trend="" + trend="" else - trend="" + trend="" fi - echo "$(get_icon "$current_icon") $current_temp$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp$SYMBOL" + echo "$(get_icon "$current_icon") $current_temp($current_feels)$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp($forecast_feels)$SYMBOL" fi