# i3 config file (v4)
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
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:monospace 13
font pango:DejaVu Sans Mono 12
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# 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
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --color 101030 --nofork
bindsym $mod+Shift+x exec i3lock --color 101030
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume 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@ -10% && $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
# sudo apt install brightnessctl
bindsym XF86MonBrightnessDown exec "brightnessctl --min-value=10 set 5%-"
bindsym XF86MonBrightnessUp exec "brightnessctl set 5%+"
## sound (from Alex Chen)
# sudo apt install playerctl
#bindsym XF86AudioRaiseVolume exec pamixer -i 5
#bindsym XF86AudioLowerVolume exec pamixer -d 5
#bindsym XF86AudioMute exec pamixer -t
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
bindsym $mod+g exec google-chrome --new-window
# Screenshot if using sway (Wayland) (from Alex Chen)
#bindsym Print exec grim -g "$(slurp)" ~/selection_$(date '+%Y%m%d-%H%M%S').png
#bindsym shift+Print exec grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') ~/fullscreen_$(date '+%Y%m%d-%H%M%S').png