From 5792877f255e553bfab2cb622d9b7adcf4f6d648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Thu, 15 Dec 2022 22:31:50 +0100 Subject: [PATCH] First test of i3status-rust --- dotfiles.yml | 2 ++ i3/config.j2 | 7 ++-- i3/i3status-rs.toml | 87 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 5 deletions(-) create mode 100644 i3/i3status-rs.toml diff --git a/dotfiles.yml b/dotfiles.yml index 2aa93bb..15bf13d 100644 --- a/dotfiles.yml +++ b/dotfiles.yml @@ -27,6 +27,8 @@ dotfiles: - from: i3/i3status.conf to: .i3/i3status.conf template: true + - from: i3/i3status-rs.toml + to: .i3/i3status-rs.toml - from: i3/scripts to: .i3/scripts - from: tmux/tmux.conf diff --git a/i3/config.j2 b/i3/config.j2 index 1d9b74a..76de3e4 100644 --- a/i3/config.j2 +++ b/i3/config.j2 @@ -337,13 +337,11 @@ bindsym $mod+space exec --no-startup-id $scriptdir/pa-volume mute-toggle-mic ############################################################################## ### BARS ####################################################################### ################################################################################ -# + bar { mode dock position bottom - -#tray_output HDMI3 tray_output primary tray_padding 2 @@ -373,6 +371,5 @@ bar { binding_mode #272822 #e5b567 #272822 } - i3bar_command i3bar - status_command py3status --standalone --dbus-notify -c ~/.i3/i3status.conf + status_command i3status-rs ~/.i3/i3status-rs.toml } diff --git a/i3/i3status-rs.toml b/i3/i3status-rs.toml new file mode 100644 index 0000000..af64c90 --- /dev/null +++ b/i3/i3status-rs.toml @@ -0,0 +1,87 @@ +icons_format = " {icon} " + +[icons] +name = "awesome6" + +[icons.overrides] + +[theme] +name = "native" + +[theme.overrides] +warning_fg = "#000000" +warning_bg = "#F4Bf75" +critical_fg = "#000000" +critical_bg = "#F92672" + +[[block]] +block = "music" +player = "spotify" +buttons = ["prev", "play", "next"] +on_click = "exec $HOME/.i3/scripts/spotify-control toggle" +separator = " — " +dynamic_width = true +max_width = 1024 + +[[block]] +block = "sound" +driver = "pulseaudio" +max_vol = 100 + +[[block]] +block = "sound" +driver = "pulseaudio" +device_kind = "source" + +[[block]] +block = "networkmanager" +primary_only = true +ap_format = "{strength} {ssid}" +device_format = "{icon}{ap}" + +[[block]] +block = "load" +format = "{1m}" +warning = 8 +critical = 1000 +interval = 1 + +[[block]] +block = "toggle" +text = "  " +command_on = "$HOME/.i3/scripts/presentation-mode toggle ; pkill -SIGRTMIN+0 i3status-rs" +command_off = "$HOME/.i3/scripts/presentation-mode toggle ; pkill -SIGRTMIN+0 i3status-rs" +command_state = "[[ $($HOME/.i3/scripts/presentation-mode status) == off ]] || echo active" + +[[block]] +block = "battery" +interval = 10 +format = "{percentage} {time}" +hide_missing = true +if_command = "test -e /sys/class/power_supply/BAT0" + +[[block]] +block = "toggle" +text = "  " +command_on = "systemctl --user start redshift" +command_off = "systemctl --user stop redshift" +command_state = "[[ $(systemctl --user is-active redshift) == active ]] && echo active" +signal = 0 + +[[block]] +block = "toggle" +text = "  " +command_on = "systemctl --user start spotify" +command_off = "systemctl --user stop spotify" +command_state = "[[ $(systemctl --user is-active spotify) == active ]] && echo active" +signal = 0 + +[[block]] +block = "custom" +command = "ping -c 1 8.8.8.8 >/dev/null 2>/dev/null && echo || echo " + +[[block]] +block = "time" +interval = 1 +locale = "de_DE" +format = "[CW %V] %a %d.%m.%Y %H:%M:%S"