Add device-specific configurations
This commit is contained in:
parent
5db622d8ac
commit
d60ee02cb5
@ -12,8 +12,11 @@
|
||||
set $menu "rofi -show drun"
|
||||
set $term alacritty
|
||||
set $compositor "picom --daemon --inactive-opacity 1 --menu-opacity 1"
|
||||
|
||||
{% if device == "desktop" %}
|
||||
set $drawingTabletStylus "HUION Huion Tablet Pen stylus"
|
||||
set $drawingTabletPad "HUION Huion Tablet Pad pad"
|
||||
{% endif %}
|
||||
|
||||
set $alt Mod1
|
||||
set $mod Mod4
|
||||
@ -40,6 +43,7 @@ bindsym $alt+Shift+F12 exec --no-startup-id "pidof picom && pkill picom || picom
|
||||
# Wallpaper
|
||||
exec --no-startup-id nitrogen --restore
|
||||
|
||||
{% if device == "desktop" %}
|
||||
# Drawing tablet
|
||||
exec --no-startup-id xsetwacom -v --set "$drawingTabletStylus" MapToOutput HEAD-0
|
||||
exec --no-startup-id xsetwacom -v --set "$drawingTabletPad" Button 1 key "b"
|
||||
@ -54,9 +58,12 @@ exec --no-startup-id xsetwacom -v --set "$drawingTabletPad" Button 13 key "none"
|
||||
exec --no-startup-id xsetwacom -v --set "$drawingTabletPad" Button 14 key "none"
|
||||
exec --no-startup-id xsetwacom -v --set "$drawingTabletPad" Button 15 key "control z"
|
||||
exec --no-startup-id xsetwacom -v --set "$drawingTabletPad" Button 16 key "control shift z"
|
||||
{% endif %}
|
||||
|
||||
{% if device == "desktop" %}
|
||||
# Set middle mouse emulation on my mouse
|
||||
exec --no-startup-id xinput set-prop "USB OPTICAL MOUSE " "libinput Middle Emulation Enabled" 1
|
||||
{% endif %}
|
||||
|
||||
# Noisetorch
|
||||
exec --no-startup-id noisetorch -i -s alsa_input.pci-0000_00_1f.3.analog-stereo
|
||||
@ -72,9 +79,11 @@ bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT
|
||||
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
|
||||
|
||||
{% if device == "laptop" %}
|
||||
# Screen brightness controls
|
||||
#bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
|
||||
#bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
|
||||
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
|
||||
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
|
||||
{% endif %}
|
||||
|
||||
# Media player controls
|
||||
bindsym XF86AudioPlay exec playerctl play-pause
|
||||
@ -213,6 +222,27 @@ mode "resize" {
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
{% if device == "laptop" %}
|
||||
mode "monitor" {
|
||||
# These bindings trigger as soon as you enter the monitor mode
|
||||
# exec "i3-nagbar -p -m 'External displays:' -B 'Mirror' 'echo m' -B 'Extend' 'echo e' -B 'Reset' 'echo r'"
|
||||
|
||||
# Pressing m will mirror the external display
|
||||
# Pressing e will extend to the external display
|
||||
# Pressing r will reset the layout
|
||||
bindsym m exec --no-startup-id "xrandr | grep -v DP-3 | perl -ne '`xrandr --auto`; if (/^([\w\-\d]+) connected/) {`xrandr --output $1 --same-as DP-3`}'"; mode "default"
|
||||
bindsym e exec --no-startup-id "xrandr | grep -v DP-3 | perl -ne '`xrandr --auto`; if (/^([\w\-\d]+) connected/) {`xrandr --output $1 --right-of DP-3`}'"; mode "default"
|
||||
bindsym r exec --no-startup-id "xrandr --auto && xrandr --output DP-3 --panning 1920x1080+0+0"; mode "default"
|
||||
|
||||
# back to normal: Enter or Escape or $mod+p
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mod+p mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+p mode "monitor"
|
||||
{% endif %}
|
||||
|
||||
# class border bground text indicator child_border
|
||||
client.focused {{nord3}} {{nord10}} {{nord4}} {{nord1}} {{nord3}}
|
||||
client.focused_inactive {{nord3}} {{nord0}} {{nord6}} {{nord1}} {{nord3}}
|
||||
@ -237,3 +267,4 @@ bar {
|
||||
|
||||
status_command i3status
|
||||
}
|
||||
|
||||
|
||||
@ -15,8 +15,13 @@ general {
|
||||
}
|
||||
|
||||
# order += "ipv6"
|
||||
{% if device == "laptop" %}
|
||||
order += "wireless _first_"
|
||||
{% endif %}
|
||||
order += "ethernet _first_"
|
||||
# order += "battery all"
|
||||
{% if device == "laptop" %}
|
||||
order += "battery all"
|
||||
{% endif %}
|
||||
order += "disk /"
|
||||
order += "load"
|
||||
order += "memory"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user