summaryrefslogtreecommitdiff
path: root/sway/config
blob: 40b44416c7b82abcdd11f89e6818e4d0662c0d57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# --- Variables ---
set $mod Mod4
floating_modifier $mod

set $left h
set $right i
set $up e
set $down a
set $term foot
set $menu fuzzel

# --- Environment & Autostart ---

# Wayland environment variables
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE
exec hash dbus-update-activation-environment 2>/dev/null && \
     dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE

# Cursor
seat seat0 xcursor_theme Adwaita 64
exec "gsettings set org.gnome.desktop.interface cursor-theme Adwaita"
exec "gsettings set org.gnome.desktop.interface cursor-size 64"

# Start background services
exec kanshi
exec waybar
exec "gammastep -l 51.8:-1.3 -t 5000:4000"
exec "handy --start-hidden"

# --- Input Configuration ---
input type:touchpad {
    tap enabled
    drag enabled
    drag_lock disabled
}

input 1:1:AT_Translated_Set_2_keyboard {
    xkb_layout gallium
    xkb_options ctrl:swap_lalt_lctl,ctrl:swap_rwin_rctl,ctrl:nocaps
}

input type:keyboard {
    repeat_delay 300
    repeat_rate 50
}

# --- Appearance ---
set $bg_colour #002B36
set $ac_colour #FF8C00
set $in_colour #586E75

# Window colours (border, background, text, indicator, child_border)
client.focused           $ac_colour $bg_colour $ac_colour $ac_colour $ac_colour
client.unfocused         $in_colour $bg_colour $in_colour $in_colour $in_colour
client.focused_inactive  $in_colour $bg_colour $in_colour $in_colour $in_colour
client.urgent            $ac_colour $bg_colour $ac_colour $ac_colour $ac_colour

# Border settings
default_border pixel 2
default_floating_border normal 2

# Background colour
output '*' bg $bg_colour solid_color

mouse_warping container

hide_edge_borders --i3 smart
smart_borders on

font pango:BQN386 Unicode DZ 12

# --- Key Bindings ---
# Basic execution
bindsym $mod+t exec $term
bindsym $mod+space exec $menu
bindsym $mod+p exec grim_slurp
bindsym $mod+Shift+x exec lock
bindsym $mod+Shift+space exec albumbler.py
bindsym $mod+slash exec "foot qalc"
bindsym $mod+return exec "handy --toggle-transcription"

# Window Management
bindsym $mod+Shift+k kill
bindsym $mod+Shift+Control+r reload
bindsym $mod+Shift+Control+q exit

# Layout
workspace_layout tabbed
bindsym $mod+n layout splith
bindsym $mod+r layout splitv
bindsym $mod+s layout tabbed

# Movement and Focus
bindsym $mod+$right focus right
bindsym $mod+$left focus left
bindsym $mod+$up focus up
bindsym $mod+$down focus down

bindsym $mod+Shift+$right move right
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$down move down

bindsym $mod+period focus output left
bindsym $mod+comma focus output right

# bindsym $mod+Return focus child

# Toggle Floating and Fullscreen
bindsym $mod+g floating toggle
bindsym $mod+w fullscreen toggle

# Outputs
#bindsym $mod+Shift+e move container to workspace next
#bindsym $mod+Shift+a move container to workspace prev

# Ratio Changes
bindsym $mod+Control+$up resize shrink width 10 ppt
bindsym $mod+Control+$down resize grow width 10 ppt

# Floating Window Movement
bindsym $mod+Mod1+$left floating toggle; move left
bindsym $mod+Mod1+$down floating toggle; move down
bindsym $mod+Mod1+$up floating toggle; move up
bindsym $mod+Mod1+$right floating toggle; move right

# Workspaces
bindsym $mod+f workspace "F"
bindsym $mod+Shift+f move container to workspace "F"

bindsym $mod+o workspace "O"
bindsym $mod+Shift+o move container to workspace "O"

bindsym $mod+u workspace "U"
bindsym $mod+Shift+u move container to workspace "U"

bindsym $mod+b workspace "B"
bindsym $mod+Shift+b move container to workspace "B"

bindsym $mod+l workspace "L"
bindsym $mod+Shift+l move container to workspace "L"

bindsym $mod+d workspace "D"
bindsym $mod+Shift+d move container to workspace "D"

bindsym $mod+c workspace "C"
bindsym $mod+Shift+c move container to workspace "C"

bindsym $mod+Tab workspace back_and_forth

# Passthrough Mode
mode "passthrough" {
    bindsym $mod+Escape mode default
    bindsym $mod+F11 mode default
}
bindsym $mod+F11 mode "passthrough"

# Media Keys
bindsym XF86AudioRaiseVolume exec "pactl set-sink-volume 0 +2%"
bindsym XF86AudioLowerVolume exec "pactl set-sink-volume 0 -2%"
bindsym XF86AudioMute exec "pactl set-sink-mute 0 toggle"
bindsym XF86AudioPlay exec "mpc toggle"
bindsym XF86AudioPrev exec "mpc previous"
bindsym XF86AudioNext exec "mpc next"
bindsym XF86MonBrightnessUp exec "light -A 2"
bindsym XF86MonBrightnessDown exec "light -U 2"

# --- Keyboard Layout Switching ---
bindsym $mod+Control+Escape exec "swaymsg 'input type:keyboard xkb_layout -options ctrl:swap_lalt_lctl,ctrl:swap_rwin_rctl,ctrl:nocaps pinev4wide'"
bindsym $mod+Escape exec "swaymsg 'input type:keyboard xkb_layout -options ctrl:swap_lalt_lctl,ctrl:swap_rwin_rctl,ctrl:nocaps gallium'"
bindsym $mod+Shift+Escape exec "swaymsg 'input type:keyboard xkb_options \"\"'"