summaryrefslogtreecommitdiffstats
path: root/.config/sway/config
blob: 1dd249e659f0a7a1c45ec057cf473ba6c14fe9d4 (plain) (blame)
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

# ~/.config/sway/config

# variables
set $mod Mod1
set $left h
set $down j
set $up k
set $right l
set $term alacritty --config-file ~/.config/alacritty/hidpi.yml
set $i3status ~/.config/common.d/i3status_ext.sh
set $status ~/.bin/dwmstatus -l
set $launcher ~/.config/common.d/bemenu.sh

# input
input * {
	xkb_layout us
	#xkb_variant altgr-intl
	xkb_variant ,nodeadkeys
	xkb_options compose:ralt
	repeat_delay 300
	repeat_rate 50
}
input "1739:30383:DELL07E6:00_06CB:76AF_Touchpad" {
	tap enabled
}

# output
output eDP-1 scale 2
output * bg #000000 solid_color
#output * bg ~/pictures/wallpaper/wallpaper_sway fill

# workspaces
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"

# keybindings
floating_modifier $mod normal
bindsym $mod+Return exec $term
bindsym $mod+Shift+q kill
bindsym $mod+d exec "$launcher run"
bindsym $mod+Shift+d exec "$launcher pass"
bindsym $mod+Shift+s exec "$launcher colorscheme"
bindsym $mod+Shift+r reload
bindsym $mod+Shift+e exec swaynag -t warning -m "" -b "EXIT SWAY" "swaymsg exit"
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Tab workspace back_and_forth
bindsym $mod+b splith
bindsym $mod+v splitv
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+f fullscreen
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
bindsym $mod+a focus parent
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
bindsym $mod+r mode "resize"
# keybidings mutlimeda keys
bindsym XF86AudioMute exec "pamixer --toggle-mute"
bindsym XF86AudioRaiseVolume exec "pamixer -i 5 -u"
bindsym XF86AudioLowerVolume exec "pamixer -d 5 -u"
bindsym XF86MonBrightnessUp exec "light -A 10"
bindsym XF86MonBrightnessDown exec "light -U 10"
bindsym XF86AudioPlay exec "~/bin/audio toggle"
bindsym XF86AudioNext exec "~/.bin/audio next"
bindsym XF86AudioPrev exec "~/.bin/audio prev"
mode "resize" {
	bindsym $left resize shrink width 10px
	bindsym $down resize grow height 10px
	bindsym $up resize shrink height 10px
	bindsym $right resize grow width 10px
	bindsym Return mode "default"
	bindsym Escape mode "default"
}

# default workspaces
assign [class="qutebrowser"] $ws2

# default floating
for_window [class="jetbrains-(.*)" title="Go to Line/Column"] floating enable
for_window [class="jetbrains-(.*)" title="Rename"] floating enable
for_window [class="jetbrains-(.*)" title="Open Project"] floating enable
for_window [class="jetbrains-(.*)" title="win0"] floating enable
for_window [title="win0"] floating enable
for_window [app_id="waybar" floating] {
	move position cursor
	move down 50px # adjust if some menus still don't fit
}

# style
gaps inner 0
gaps outer 0
font TerminessTTF Nerd Font 10
default_border pixel 1
titlebar_padding 1
for_window [title="win0"] floating enable

# colorscheme
set $fg #22ff22
set $bg #000000
set $gr #222222
set $wh #ffffff
# class                 border  backgr.      text             indicator   child_border
client.focused          $wh     $wh          $bg              $wh         $wh
client.focused_inactive $gr     $gr          $wh              $gr         $gr
client.unfocused        $gr     $gr          $wh              $gr         $gr
client.urgent           $bg     $bg          $fg              $bg         $bg
client.placeholder      $bg     $bg          $fg              $bg         $bg

# i3bar
bar {
	status_command $status
	position top
	strip_workspace_numbers yes
	font Terminus 10
	colors {
		statusline $wh
		separator $wh
		background $bg
		# colorclass       border   background     text
		focused_workspace  $wh      $wh            $bg
		active_workspace   $bg      $bg            $wh
		inactive_workspace $bg      $bg            $wh
	}
}

# auto-exec
exec_always xrdb ~/.Xdefaults
exec redshift
exec libinput-gestures-setup start
exec light -S 10
exec swayidle -w before-sleep "$HOME/.bin/lock -s"

# gtk-settings for wayland
set $gnome-schema org.gnome.desktop.interface
exec_always {
	gsettings set $gnome-schema gtk-theme "Raleigh"
	gsettings set $gnome-schema icon-theme "Adwaita"
	gsettings set $gnome-schema cursor-theme "Adwaita"
}

remember that computers suck.