1
0
Fork 0
dotfiles/sway/yuki
coderkun decd1e6916 sway: Simplify input configuration
Simplify the input configuration in sway by setting the keyboard layout
based on the type and move the declaration from the device-specific
files to the main configuration file
2020-07-04 15:21:29 +02:00

30 lines
1.3 KiB
Text

# Output configuration
output * bg "~/.config/sway/bg.png" fill
output HDMI-A-1 position 0,0
output DP-1 resolution 1920x1080 position 1920,0
# Monitor setup
set $mode_monitor Monitor (l) single left, (r) single right, (h) dual horizontal, ((v) dual vertical
mode "$mode_monitor" {
bindsym l output HDMI-A-1 enable, output DP-1 disable, mode "default"
bindsym r output DP-1 enable position 0 0 transform normal, output HDMI-A-1 disable, mode "default"
bindsym h output HDMI-A-1 enable, output DP-1 enable position 1920 0 transform normal, mode "default"
bindsym v output HDMI-A-1 enable, output DP-1 enable position 1920 -500 transform 270, mode "default"
bindsym Return mode "default"
bindsym mod3+Return mode "default"
bindsym Escape mode "default"
bindsym mod3+Escape mode "default"
}
bindcode $mod+Shift+58 mode "$mode_monitor"
# Audio setup
set $mode_audio Audio Output (h) HDMI, (s) S/PDIF
mode "$mode_audio" {
bindsym h exec pactl set-card-profile alsa_card.pci-0000_00_1f.3 output:hdmi-stereo, mode "default"
bindsym s exec pactl set-card-profile alsa_card.pci-0000_00_1f.3 output:iec958-stereo, mode "default"
bindsym Return mode "default"
bindsym mod3+Return mode "default"
bindsym Escape mode "default"
bindsym mod3+Escape mode "default"
}
bindcode $mod+Shift+40 mode "$mode_audio"