chore(config): add volume i3status

main
Tran Hau 2021-04-04 16:39:21 +07:00
parent fec9b2f1d6
commit 399e639bac
2 changed files with 8 additions and 31 deletions

View File

@ -2,21 +2,16 @@
set $mod Mod4 set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:Cascadia Code 12 font pango:Cascadia Code 12
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the # xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen. # screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# Use pactl to adjust volume in PulseAudio. # Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
@ -33,24 +28,12 @@ bindsym $mod+Shift+q kill
bindsym $mod+d exec "rofi -combi-modi window,drun -show combi" bindsym $mod+d exec "rofi -combi-modi window,drun -show combi"
# change focus # change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left bindsym $mod+Left focus left
bindsym $mod+Down focus down bindsym $mod+Down focus down
bindsym $mod+Up focus up bindsym $mod+Up focus up
bindsym $mod+Right focus right bindsym $mod+Right focus right
# move focused window # move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up bindsym $mod+Shift+Up move up
@ -134,12 +117,6 @@ mode "resize" {
# Pressing right will grow the windows width. # Pressing right will grow the windows width.
# Pressing up will shrink the windows height. # Pressing up will shrink the windows height.
# Pressing down will grow the windows height. # Pressing down will grow the windows height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt bindsym Up resize shrink height 10 px or 10 ppt

View File

@ -6,11 +6,11 @@ general {
order += "wireless _first_" order += "wireless _first_"
order += "ethernet _first_" order += "ethernet _first_"
order += "battery all" order += "battery all"
order += "memory" order += "volume master"
order += "tztime local" order += "tztime local"
wireless _first_ { wireless _first_ {
format_up = "Wifi: %quality at %essid" format_up = "Wifi: %essid"
format_down = "Wifi: down" format_down = "Wifi: down"
} }
@ -23,10 +23,10 @@ battery all {
format = "%status %percentage %remaining" format = "%status %percentage %remaining"
} }
memory { volume master {
format = "Used %used Avail %available" format = "Sound: %volume"
threshold_degraded = "1G" format_muted = "Sound: muted (%volume)"
format_degraded = "MEMORY < %available" device = "pulse"
} }
tztime local { tztime local {