blackbeard420

blackbeard420 / sway

Last active 1 month ago

Like 0

Revision 96c973c0881dacfedf3179ef31e83f6d71c5a35f

config Raw
1set $mod Mod4
2
3# Font for window titles.
4font pango:hermit 8
5
6default_border none
7default_floating_border none
8smart_gaps on
9gaps inner 10
10
11# Use Mouse+$mod to drag floating windows to their wanted position
12floating_modifier $mod
13
14# start a terminal
15bindsym $mod+Return exec kitty
16
17# kill focused window
18bindsym $mod+Shift+q kill
19
20# start rofi (runs via XWayland)
21bindsym $mod+d exec rofi -show run
22
23# change focus
24bindsym $mod+j focus left
25bindsym $mod+k focus down
26bindsym $mod+l focus up
27bindsym $mod+semicolon focus right
28
29# alternatively, you can use the cursor keys:
30bindsym $mod+Left focus left
31bindsym $mod+Down focus down
32bindsym $mod+Up focus up
33bindsym $mod+Right focus right
34
35# move focused window
36bindsym $mod+Shift+j move left
37bindsym $mod+Shift+k move down
38bindsym $mod+Shift+l move up
39bindsym $mod+Shift+semicolon move right
40
41# alternatively, you can use the cursor keys:
42bindsym $mod+Shift+Left move left
43bindsym $mod+Shift+Down move down
44bindsym $mod+Shift+Up move up
45bindsym $mod+Shift+Right move right
46
47# split in horizontal orientation
48bindsym $mod+h split h
49
50# split in vertical orientation
51bindsym $mod+v split v
52
53# enter fullscreen mode for the focused container
54bindsym $mod+f fullscreen toggle
55
56# change container layout (stacked, tabbed, toggle split)
57bindsym $mod+s layout stacking
58bindsym $mod+w layout tabbed
59bindsym $mod+e layout toggle split
60
61# toggle tiling / floating
62bindsym $mod+Shift+space floating toggle
63
64# change focus between tiling / floating windows
65bindsym $mod+space focus mode_toggle
66
67# focus the parent container
68bindsym $mod+a focus parent
69
70# switch to workspace
71bindsym $mod+1 workspace 1:editor
72bindsym $mod+2 workspace 2
73bindsym $mod+3 workspace 3
74bindsym $mod+4 workspace 4
75bindsym $mod+5 workspace 5
76bindsym $mod+6 workspace 6
77bindsym $mod+7 workspace 7
78bindsym $mod+8 workspace 8
79bindsym $mod+9 workspace 9
80bindsym $mod+0 workspace 10
81
82# move focused container to workspace
83bindsym $mod+Shift+1 move container to workspace 1:editor
84bindsym $mod+Shift+2 move container to workspace 2
85bindsym $mod+Shift+3 move container to workspace 3
86bindsym $mod+Shift+4 move container to workspace 4
87bindsym $mod+Shift+5 move container to workspace 5
88bindsym $mod+Shift+6 move container to workspace 6
89bindsym $mod+Shift+7 move container to workspace 7
90bindsym $mod+Shift+8 move container to workspace 8
91bindsym $mod+Shift+9 move container to workspace 9
92bindsym $mod+Shift+0 move container to workspace 10
93
94# reload the configuration file
95bindsym $mod+Shift+c reload
96# restart sway inplace (preserves your layout/session, can be used to upgrade sway)
97bindsym $mod+Shift+r restart
98# exit sway (logs you out of your Wayland session)
99bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your session.' -B 'Yes, exit sway' 'swaymsg exit'
100
101# resize window (you can also use the mouse for that)
102mode "resize" {
103 bindsym j resize shrink width 10 px or 10 ppt
104 bindsym k resize grow height 10 px or 10 ppt
105 bindsym l resize shrink height 10 px or 10 ppt
106 bindsym semicolon resize grow width 10 px or 10 ppt
107
108 bindsym Left resize shrink width 10 px or 10 ppt
109 bindsym Down resize grow height 10 px or 10 ppt
110 bindsym Up resize shrink height 10 px or 10 ppt
111 bindsym Right resize grow width 10 px or 10 ppt
112
113 bindsym Return mode "default"
114 bindsym Escape mode "default"
115}
116
117bindsym $mod+r mode "resize"
118
119# Native sway bar left disabled — waybar is used instead (like polybar was for i3)
120#bar {
121# status_command i3status
122#
123# colors {
124# separator #AA0000
125# inactive_workspace #990000 #000000 #CCCCCC
126# focused_workspace #990000 #550000 #CCCCCC
127# active_workspace #990000 #220000 #CCCCCC
128# }
129#}
130
131#for_window [app_id="steam"] floating enable
132#for_window [shell="xwayland"] floating enable
133
134# --- Outputs: DP on the LEFT, HDMI on the RIGHT ---
135# Based on the current xrandr layout (DisplayPort-0 3840x2160 @ 0,0,
136# HDMI-A-0 1920x1080 @ 3840,0). Wayland/wlroots connector names can differ
137# from X11's xrandr names (e.g. DP-1 / HDMI-A-1 instead of DisplayPort-0 /
138# HDMI-A-0). If sway doesn't pick these up correctly on first launch, run:
139# swaymsg -t get_outputs
140# and swap in whatever names/resolutions it reports below.
141output DP-1 position 0 0 resolution 3840x2160
142output HDMI-A-1 position 3840 0 resolution 1920x1080
143
144# Wallpaper (same image as i3's feh --bg-scale)
145exec swaybg -i /home/blackbeard/wallpaper -m fill
146
147exec_always waybar
148
149exec "swaymsg workspace 1:editor"