~sircmpwn/dotfiles

ref: 2834e06d5c1131351f0dd093c628aa5a957cdc40 dotfiles/.config/sway/config -rw-r--r-- 6.2 KiB View raw
                                                                                
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
172
173
174
175
# i3 config file (v4)
# Windows key on most keyboards
set $mod Mod4
set $term urxvt

font pango:IPAGothic 10, DejaVu Sans Mono 9

set $ws10 10
set $ws1 1
set $ws2 2
set $ws3 3
set $ws4 4
set $ws5 5
set $ws6 6
set $ws7 7
set $ws8 8
set $ws9 9

# Meta key bindings
# Move window with mod+mouse drag
    floating_modifier $mod
# Kill focused window with mod+shift+q
    bindsym $mod+Shift+q kill
# Toggle fullscreen with mod+f
    bindsym $mod+f fullscreen
# change focus with mod+hjkl or mod+arrow
    bindsym $mod+h focus left
    bindsym $mod+j focus down
    bindsym $mod+k focus up
    bindsym $mod+l focus right
    bindsym $mod+Left focus left
    bindsym $mod+Down focus down
    bindsym $mod+Up focus up
    bindsym $mod+Right focus right
    bindsym $mod+g focus next
    bindsym $mod+Shift+g focus prev

    bindsym $mod+Mod1+h workspace prev_on_output
    bindsym $mod+Mod1+l workspace next_on_output
    bindsym $mod+Mod1+Left workspace prev_on_output
    bindsym $mod+Mod1+Right workspace next_on_output
# move focused window with mod+shift+hjkl
    bindsym $mod+Shift+h move left
    bindsym $mod+Shift+j move down
    bindsym $mod+Shift+k move up
    bindsym $mod+Shift+l move 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
# switch to workspace with mod+1234567890
    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+7 workspace $ws7
    bindsym $mod+8 workspace $ws8
    bindsym $mod+9 workspace $ws9
    bindsym $mod+0 workspace $ws10

    bindsym $mod+Tab exec aworkspace switch
# move container to workspace with meta+shift+1234567890
    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+Shift+7 move container to workspace $ws7
    bindsym $mod+Shift+8 move container to workspace $ws8
    bindsym $mod+Shift+9 move container to workspace $ws9
    bindsym $mod+Shift+0 move container to workspace $ws10

    bindsym $mod+Control+Mod1+h move container to workspace prev_on_output
    bindsym $mod+Control+Mod1+l move container to workspace next_on_output
    bindsym $mod+Control+Mod1+Left move container to workspace prev_on_output
    bindsym $mod+Control+Mod1+Right move container to workspace next_on_output

    bindsym $mod+Shift+Tab exec aworkspace move
# vim-style window splits and resizing after hitting mod+w
    mode "window" {
        bindsym s split v; mode "default"
        bindsym v split h; mode "default"
        bindsym Shift+comma resize shrink width 10 ppt or 10 px
        bindsym Shift+period resize grow width 10 ppt or 10 px
        bindsym Shift+equal resize grow height 10 ppt or 10 px
        bindsym minus resize shrink height 10 ppt or 10 px
    # Leave window mode with return/escape
        bindsym Return mode "default"
        bindsym Escape mode "default"
    }
    bindsym $mod+w mode "window"
# Change layouts with mod+,./
    bindsym $mod+comma layout stacking
    bindsym $mod+period layout tabbed
    bindsym $mod+slash layout toggle split
# Toggle floating with mod+shift+space
    bindsym $mod+Shift+space floating toggle
# Swap focus between tiling windows and floating windows
    bindsym $mod+space focus mode_toggle
# Move focus to parent container with mod+a
    bindsym $mod+a focus parent
# Move windows in and out of the scratchpad with mod+(shift)+t
    bindsym $mod+Shift+t move scratchpad
    bindsym $mod+t scratchpad show
# Cycle through border styles with mod+b
    bindsym $mod+b border toggle
# reload the configuration file
    bindsym $mod+Shift+c reload
# restart i3 inplace with mod+shift+r
    bindsym $mod+Shift+r restart
# exit i3 with mod+shift+e
    bindsym $mod+Shift+e exit
# Run terminal with mod+enter
    bindsym $mod+Return exec $term
    bindsym $mod+Shift+Return exec urxvt
# File manager with mod+e
    bindsym $mod+e exec nautilus
# Clipboard -> sr.ht with mod+shift+p
    bindsym $mod+Shift+p exec paste
# Screenshots
    bindsym Print exec swaygrab ~/Pictures/screenshots/$(date +"%Y-%m-%d_%H:%M:%S.png")
    bindsym $mod+Print exec sleep 0.1 && srht
    bindsym $mod+Shift+Print exec sleep 0.1 && srht -s
# dmenu with mod+d for arbituary programs
    bindsym $mod+d exec dmenu_path | dmenu -p "Run:" -l 10 | xargs swaymsg exec
# passwords
    bindsym $mod+p exec pass-dmenu
# mako
    bindsym $mod+n exec makoctl dismiss
    bindsym $mod+Shift+n exec makoctl dismiss -a
# music controls (special keys on keyboard)
    bindsym XF86AudioNext exec stewdio skip
    bindsym XF86AudioPlay exec stewdio play
    bindsym XF86AudioPrev exec stewdio dmenu-search
    bindsym $mod+XF86AudioPlay exec stewdio qfav
    bindsym $mod+XF86AudioNext exec stewdio dmenu-queue
# i3-lock on mod+pause
    bindsym XF86Sleep exec swaylock -i `wallpaper` --scaling fill
    bindsym $mod+XF86Sleep exec swaylock -c 00000000
    bindsym XF86ScreenSaver exec swaylock -i `wallpaper` --scaling fill
    bindsym $mod+Pause exec swaylock -i `wallpaper` --scaling fill

    bindsym $mod+i mode "j: japanese; k: korean; v: vietnamese; esc: english"

    mode "j: japanese; k: korean; v: vietnamese; esc: english" {
        bindsym j exec ibus engine anthy; mode "default"
        bindsym k exec ibus engine hangul; mode "default"
        bindsym v exec ibus engine Unikey; mode "default"
        bindsym Return exec ibus engine xkb:us::eng; mode "default"
        bindsym Escape exec ibus engine xkb:us::eng; mode "default"
    }

	bindsym $mod+Escape seat default pointer_constraint escape

set $blue #285577
set $gray #282828
set $red #900000

client.focused $blue $blue #ffffff $blue $blue
client.unfocused $gray $gray #ffffff $gray $gray
client.focused_inactive $gray $gray #ffffff $gray $gray

seat seat0 hide_cursor 5000

default_border pixel 4

focus_on_window_activation urgent

include /etc/sway/config.d/*
include ~/.config/sway/config.d/*
include ~/.config/sway/`hostname`
exec startup sway