1
0
Fork 0
dotfiles/files/.config/sway/config

334 lines
9.2 KiB
Plaintext
Raw Normal View History

2019-03-01 04:01:01 +00:00
### Vars
set $terminal termite
### Color configuration
set $bg #383838
set $fg #b7bbb7
set $border #383838
set $active #f0544c
# class border backgr. text indicator child_border
client.focused $active $bg $fg $border $active
client.focused_inactive $bg $bg $fg $border $border
client.unfocused $bg $bg $fg $border $border
client.urgent $bg $bg $active $border $border
client.placeholder $bg $bg $fg $border $border
client.background $bg
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
2019-06-13 22:25:47 +00:00
font pango:sans 8
2019-03-01 04:01:01 +00:00
2019-09-17 23:31:13 +00:00
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
set $ws10 10
2019-03-29 00:40:26 +00:00
# default workspace
2019-09-17 23:31:13 +00:00
workspace $ws2
2019-03-01 04:01:01 +00:00
# window title
#for_window [class="^.*"] border pixel 2 title_format " %title"
default_border pixel 2
for_window [floating] default_border pixel 1
smart_borders on
# Gaps
gaps inner 16
gaps outer -8
smart_gaps on
# Floating mod
2019-04-03 02:14:14 +00:00
for_window [app_id="pavucontrol"] floating enable
2019-04-04 21:44:39 +00:00
for_window [app_id="org.remmina.Remmina" title="Remmina Remote Desktop Client"] floating enable
2019-04-15 12:34:43 +00:00
for_window [app_id="desktopclient.nextcloud.com.nextcloud"] floating enable
2019-03-01 04:01:01 +00:00
for_window [class="TeamViewer"] floating enable
2019-04-04 21:44:39 +00:00
for_window [class="feh" title="Pinned screenshot"] {
floating enable
sticky enable
}
2019-04-03 02:14:14 +00:00
for_window [window_type="dialog"] floating enable
for_window [window_type="utility"] floating enable
for_window [window_type="toolbar"] floating enable
for_window [window_type="splash"] floating enable
2019-03-01 04:01:01 +00:00
# https://github.com/ValveSoftware/steam-for-linux/issues/1040
for_window [class="^Steam$" title="^Friends$"] floating enable
for_window [class="^Steam$" title="Steam - News"] floating enable
for_window [class="^Steam$" title=".* - Chat"] floating enable
for_window [class="^Steam$" title="^Settings$"] floating enable
for_window [class="^Steam$" title=".* - event started"] floating enable
for_window [class="^Steam$" title=".* CD key"] floating enable
for_window [class="^Steam$" title="^Steam - Self Updater$"] floating enable
for_window [class="^Steam$" title="^Screenshot Uploader$"] floating enable
for_window [class="^Steam$" title="^Steam Guard - Computer Authorization Required$"] floating enable
for_window [title="^Steam Keyboard$"] floating enable
2019-09-17 23:31:13 +00:00
# https://github.com/Alexays/Waybar/issues/63
for_window [app_id="waybar" floating] {
move position cursor
move down 120px # adjust if some menus still don't fit
}
2019-03-01 04:01:01 +00:00
### Output configuration
output "*" {
background ~/.local/share/wallpaper fill
2019-03-01 04:01:01 +00:00
}
set $output1 "Goldstar Company Ltd LG QHD 0x00001F95"
workspace $ws3 output $output1
workspace $ws4 output $output1
workspace $ws5 output $output1
workspace $ws6 output $output1
workspace $ws7 output $output1
workspace $ws8 output $output1
workspace $ws9 output $output1
workspace $ws10 output $output1
output $output1 {
position 1080 220
}
set $output2 "Ancor Communications Inc ASUS VH238 BALMIB547836"
workspace $ws1 output $output2
workspace $ws2 output $output2
output $output2 {
position 0 0
transform 90
}
2019-03-01 04:01:01 +00:00
### Input configuration
# mod key
set $mod Mod4
# caps lock is rebinded to mod key
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# disable focus follow mouse
#focus_follows_mouse no
2019-04-15 12:34:43 +00:00
# Touchpad
2019-06-13 22:25:47 +00:00
input "1739:0:Synaptics_TM3053-003" {
2019-03-01 04:01:01 +00:00
tap enabled
tap_button_map lrm
middle_emulation enabled
2019-04-15 12:34:43 +00:00
scroll_method two_finger
dwt enable
drag enable
}
2019-03-01 04:01:01 +00:00
input "*" {
2019-04-15 12:34:43 +00:00
# Keyboard
2019-03-01 04:01:01 +00:00
xkb_layout us
xkb_variant altgr-intl
xkb_options caps:super
2019-04-15 12:34:43 +00:00
# Mouse
accel_profile flat
pointer_accel 0
2019-03-01 04:01:01 +00:00
}
### Key bindings
# start a terminal
bindsym $mod+Return exec $terminal
# thunar
bindsym $mod+Mod1+Return exec thunar
# kill focused window
bindsym $mod+Shift+q kill
# start rofi (a program launcher)
2019-04-05 00:21:15 +00:00
bindsym $mod+Control+Return exec rofi -combi drun -show drun -modi drun,window
2019-03-01 04:01:01 +00:00
# start rofi-pass for password autotype
bindsym $mod+Shift+Return exec rofi-pass
# start rofi-radio
2019-04-05 00:27:50 +00:00
bindsym $mod+p exec ~/bin/rofi-radio
2019-03-01 04:01:01 +00:00
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
#bindsym $mod+Left focus left
#bindsym $mod+Down focus down
#bindsym $mod+Up focus up
#bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+Shift+backslash split h # |
bindsym $mod+backslash split h
# split in vertical orientation
bindsym $mod+minus split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
2019-04-04 23:53:18 +00:00
bindsym $mod+Shift+space floating toggle
2019-03-01 04:01:01 +00:00
# toggle sticky
bindsym $mod+Ctrl+space sticky toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
bindsym $mod+d focus child
# switch to workspace
bindsym $mod+q workspace back_and_forth
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+Ctrl+Up workspace next
#bindsym $mod+Ctrl+Down workspace prev
# move focused container to workspace
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
# Assignation
2019-09-17 23:31:13 +00:00
assign [class="^[Ss]lack$"] $ws1
assign [class="^[Dd]iscord$"] $ws1
2019-03-01 04:01:01 +00:00
assign [class="^looking-glass-client$"] $ws3
# screen
workspace $ws1 output HDMI-2
workspace $ws2 output HDMI-2
workspace $ws3 output HDMI-1
workspace $ws4 output HDMI-1
workspace $ws5 output HDMI-1
workspace $ws6 output HDMI-1
workspace $ws7 output HDMI-1
workspace $ws8 output HDMI-1
workspace $ws9 output HDMI-1
workspace $ws10 output HDMI-1
# reload the configuration file
bindsym $mod+Shift+r reload
# exit
bindsym $mod+Shift+e exec "swaynag -t warning -m 'Do you really want to exit sway?' -b 'Yes, exit sway' 'swaymsg exit'"
# lock the screen
bindsym $mod+Pause exec lock
# suspend
bindsym $mod+Shift+Pause exec systemctl suspend
2019-03-29 00:40:26 +00:00
# function keys
bindsym XF86MonBrightnessUp exec brightness-control up
bindsym XF86MonBrightnessDown exec brightness-control down
bindsym XF86AudioMute exec volume-control mute
bindsym XF86AudioRaiseVolume exec volume-control up
bindsym XF86AudioLowerVolume exec volume-control down
2019-04-03 02:14:14 +00:00
bindsym Shift+print exec sshot --pin
bindsym Control+print exec sshot --partial
bindsym Alt+print exec sshot --window
bindsym print exec sshot
2019-03-29 00:40:26 +00:00
2019-03-01 04:01:01 +00:00
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
#bindsym Left resize shrink width 10 px or 10 ppt
#bindsym Down resize grow height 10 px or 10 ppt
#bindsym Up resize shrink height 10 px or 10 ppt
#bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
### Startup
# reach systemd target
exec /bin/systemctl --user import-environment
2019-03-29 03:12:46 +00:00
exec /bin/systemctl --user start sway-session.target
2019-03-01 04:01:01 +00:00
# autorun .desktop
exec /bin/dex -a
# run a terminal
exec $terminal
bar {
2019-05-09 21:37:18 +00:00
swaybar_command waybar
# status_command i3status
#
# font pango:$font 10
# height 30
# tray_padding 7
# position top
# separator_symbol " ▏"
# strip_workspace_numbers yes
#
# colors {
# background #000000
# statusline $fg
#
# focused_workspace #2c2f33 #2c2f33 $fg
# active_workspace #000000 #000000 $fg
# inactive_workspace #000000 #000000 #4b5056
# urgent_workspace #000000 #000000 #e27c77
# }
2019-03-01 04:01:01 +00:00
}