diff --git a/README.md b/README.md index bcac8e6..cee114a 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ These are all the programs that i3 calls somewhere in its config, whether that b * alacritty or kitty (currently uses kitty, just comment out one line or the other in the i3 conf to switch) * cool retro term -* i3-lock +* betterlockscreen * brightnessctl * xdotool * maim (screenshot program) @@ -45,8 +45,10 @@ These are all the programs that i3 calls somewhere in its config, whether that b * geoclue (geolocation dameon) * feh (for setting desktop wallpaper) * dunst -* i3status +* i3status-rust * xclip +* playerctl +* upower * gnome-keyring (for login management in, for example, nextcloud. See https://gabevenberg.com/posts/autologinnextcloudclientonarch/ for details.) ### x11 and x11hidpi diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 9011d71..783b80f 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -178,36 +178,36 @@ smart_borders on bindsym $mod+ctrl+r mode "resize" # lock and turn off the screen with mod+x, and lock+suspend computer with mod+shift+x - set $lock_command i3lock - set $lock_command_nof i3lock -n #versuon of $lock_command that does not fork. + set $lock_command betterlockscreen --lock + set $lock_command_nof betterlockscreen --lock -- -n #version of $lock_command that does not fork. bindsym $mod+x exec --no-startup-id "~/dotfiles/scripts/screen_off $lock_command_nof" bindsym $mod+shift+x exec --no-startup-id "$lock_command"; exec --no-startup-id "systemctl suspend" # disable screen going to sleep with mod+b, enable screen going to sleep with mod+shift+b - bindsym $mod+b exec --no-startup-id "xset s off -dpms; notify-send --expire-time=500 'screen blanking off'" - bindsym $mod+shift+b exec --no-startup-id "xset +dpms; notify-send --expire-time=500 'screen blanking on'" + bindsym $mod+b exec --no-startup-id "xset s off -dpms; dunstify --timeout=500 'screen blanking off'" + bindsym $mod+shift+b exec --no-startup-id "xset +dpms; dunstify --timeout=500 'screen blanking on'" # change brightness - bindsym $mod+control+plus exec --no-startup-id "brightnessctl s +1%; notify-send -h string:x-dunst-stack-tag:brightness --expire-time=500 Brightness\ $(brightnessctl -m| cut --delimiter=, -f 4)" - bindsym $mod+control+minus exec --no-startup-id "brightnessctl s 1%-; notify-send -h string:x-dunst-stack-tag:brightness --expire-time=500 Brightness\ $(brightnessctl -m| cut --delimiter=, -f 4)" + bindsym $mod+control+plus exec --no-startup-id "brightnessctl s +1%; dunstify -h string:x-dunst-stack-tag:brightness --timeout=500 Brightness\ $(brightnessctl -m| cut --delimiter=, -f 4)" + bindsym $mod+control+minus exec --no-startup-id "brightnessctl s 1%-; dunstify -h string:x-dunst-stack-tag:brightness --timeout=500 Brightness\ $(brightnessctl -m| cut --delimiter=, -f 4)" #screenshot everything with mod+s, current window with mod+shift+s, selection with mod+ctrl+s - bindsym $mod+s exec --no-startup-id "maim ~/Pictures/$(date +%s).png; notify-send --expire-time=1000 'Whole-desktop screenshot taken'" - bindsym $mod+shift+s exec --no-startup-id "maim -i $(xdotool getactivewindow) ~/Pictures/$(date +%s).png; notify-send --expire-time=1000 'Window screenshot taken'" - bindsym $mod+ctrl+s exec --no-startup-id "maim -s ~/Pictures/$(date +%s).png; notify-send --expire-time=1000 'Selection screenshot taken'" + bindsym $mod+s exec --no-startup-id "maim ~/Pictures/$(date +%s).png; dunstify --timeout=1000 'Whole-desktop screenshot taken'" + bindsym $mod+shift+s exec --no-startup-id "maim -i $(xdotool getactivewindow) ~/Pictures/$(date +%s).png; dunstify --timeout=1000 'Window screenshot taken'" + bindsym $mod+ctrl+s exec --no-startup-id "maim -s ~/Pictures/$(date +%s).png; dunstify --timeout=1000 'Selection screenshot taken'" #screenshot everything with mod+c, current window with mod+shift+c, selection with mod+ctrl+c (to clipboard) - bindsym $mod+c exec --no-startup-id "maim | xclip -selection clipboard -t image/png; notify-send --expire-time=1000 'Whole-desktop screenshot taken to clipboard'" - bindsym $mod+shift+c exec --no-startup-id "maim -i $(xdotool getactivewindow) | xclip -selection clipboard -t image/png; notify-send --expire-time=1000 'Window screenshot taken to clipboard'" - bindsym $mod+ctrl+c exec --no-startup-id "maim -s | xclip -selection clipboard -t image/png; notify-send --expire-time=1000 'Selection screenshot taken to clipboard'" + bindsym $mod+c exec --no-startup-id "maim | xclip -selection clipboard -t image/png; dunstify --timeout=1000 'Whole-desktop screenshot taken to clipboard'" + bindsym $mod+shift+c exec --no-startup-id "maim -i $(xdotool getactivewindow) | xclip -selection clipboard -t image/png; dunstify --timeout=1000 'Window screenshot taken to clipboard'" + bindsym $mod+ctrl+c exec --no-startup-id "maim -s | xclip -selection clipboard -t image/png; dunstify --timeout=1000 'Selection screenshot taken to clipboard'" #colour picker with xcolor bindsym --release $mod+p exec --no-startup-id "xcolor -s" #mpd controls - bindsym $mod+mod1+p exec --no-startup-id "playerctl play-pause" - bindsym $mod+mod1+plus exec --no-startup-id "playerctl volume -- +0.1; notify-send -h string:x-dunst-stack-tag:playervol --expire-time=500 Player $(playerctl volume)" - bindsym $mod+mod1+minus exec --no-startup-id "playerctl volume -- -0.1; notify-send -h string:x-dunst-stack-tag:playervol --expire-time=500 Player $(playerctl volume)" + bindsym $mod+mod1+p exec --no-startup-id "playerctl play-pause; dunstify -h string:x-dunst-stack-tag:playerstatus --timeout=500 Player $(playerctl status)" + bindsym $mod+mod1+plus exec --no-startup-id "playerctl volume 0.01+; dunstify -h string:x-dunst-stack-tag:volume --timeout=500 -h int:value:$(playerctl volume | cut -d' ' -f2 | awk '{print $1*100}' ) Player" + bindsym $mod+mod1+minus exec --no-startup-id "playerctl volume 0.01-; dunstify -h string:x-dunst-stack-tag:volume --timeout=500 -h int:value:$(playerctl volume | cut -d' ' -f2 | awk '{print $1*100}' ) Player" #open volume control bindsym $mod+shift+p exec pavucontrol @@ -224,13 +224,6 @@ smart_borders on for_window [class="Pavucontrol"] floating enable for_window [title="Origin"] floating enable - -# Start i3bar to display a workspace bar (plus the system information i3status -# finds out, if available) -bar { - status_command i3status -} - #startup applications #resetting the wallpaper. We are not setting it here, so we can have different wallpapers on different machines. use feh --bg-fill FILE to set it. it will write a .fehbg file. @@ -245,3 +238,9 @@ bar { #geoclue exec --no-startup-id /usr/lib/geoclue-2.0/demos/agent + +#bar (i3status-rust) +bar { + position bottom + status_command i3status-rs ~/.config/i3status-rust/config-default.toml +} diff --git a/i3/.config/i3status-rust/config-default.toml b/i3/.config/i3status-rust/config-default.toml new file mode 100755 index 0000000..a8d9dfb --- /dev/null +++ b/i3/.config/i3status-rust/config-default.toml @@ -0,0 +1,51 @@ +[[block]] +block = "music" +format = "{$icon $combo.str(max_w:25,rot_interval:0.5) $play $prev $next $player.str(max_w:5,rot_interval:0.5) [$cur/$avail]|}" + +[[block]] +block = "memory" +format = "$icon $mem_used_percents" +format_alt = "$icon $swap_used_percents (swap)" + +[[block]] +block = "cpu" +interval = 1 + +[[block]] +block = "load" +format = "$icon $1m" +interval = 1 + +[[block]] +block = "net" +format = "$icon {$signal_strength $ssid.str(max_w:5,rot_interval:0.5)|}" +format_alt = "$icon {$signal_strength $ssid.str(max_w:5,rot_interval:0.5) $frequency|} ipv4-$ip ipv6-$ipv6 via $device" + +[[block]] +block = "backlight" + +[[block]] +block = "battery" +driver = "upower" +device = "DisplayDevice" +format = "$icon $percentage {$time|}" + +[[block]] +block = "sound" +format = "$icon {$volume.bar(v:true) $volume.eng(w:2)|}" +headphones_indicator = true + +[[block.click]] +button = "left" +cmd = "pwvucontrol" + +[[block]] +block = "time" +format = "$timestamp.datetime(f:'%F %R')" +interval = 60 + +[icons] +icons = "material-nf" + +[theme] +theme = "gruvbox-dark"