i3 Configuration

# Below find an example i3 configuration with some helpful comments. This configuration would be put at the end of your existing ~/.config/i3/config file, which is executed on startup

# Create hotkey for moving workspaces between monitors, usefful for moving windows like an IDE to a monitor being screenshared on Zoom/Teams/Slack

bindsym $mod+p move workspace to output right

# Start background tray processes for clipboard/volume mgmt

exec --no-startup-id clipit
exec --no-startup-id volumeicon

# Set correct monitor orientation

exec --no-startup-id xrandr --output HDMI-1 --auto --right-of DP-2

# Set correct mouse sensitivity settings

exec xinput --set-prop "pointer:Razer Razer DeathAdder Essential" "libinput Accel Speed" -0.5
exec xinput --set-prop "pointer:Razer Razer DeathAdder Essential" "Coordinate Transformation Matrix" 0.6 0 0 0 0.6 0 0 0 2

# Some applications don't behave correctly when being assigned to workspaces unless assigned by class

assign [class="Slack"] workspace 1:Communication
assign [class="Google-chrome"] workspace 3:Web
assign [class="Code"] workspace 4:Code
assign [class="Virt-manager"] workspace 5:VirtManager

# Spawn applications into the correct workspaces

exec --no-startup-id i3-msg 'workspace 1:Communication; exec evolution'

exec --no-startup-id i3-msg 'workspace 1:Communication; exec slack'

exec --no-startup-id i3-msg 'workspace 2:Terminal; exec gnome-terminal'

exec --no-startup-id i3-msg 'workspace 2:Terminal; exec subl'

exec --no-startup-id i3-msg 'workspace 3:Web; exec google-chrome-stable'

exec --no-startup-id i3-msg 'workspace 4:Code; exec code'

exec --no-startup-id i3-msg 'workspace 5:VirtManager; exec virt-manager'

exec --no-startup-id i3-msg 'workspace 6:Media; exec flatpak run eu.tiliado.NuvolaAppAppleMusic'

# Assign workspaces to the correct monitor

workspace "1:Communication" output DP-2
workspace "2:Terminal" output DP-2
workspace "3:Web" output DP-2
workspace "6:Slippi" output DP-2
workspace "4:Code" output HDMI-1
workspace "5:VirtManager" output HDMI-1