1
0
Fork 0
dotfiles/home/dot_config/sway/config

340 lines
9.5 KiB
Plaintext
Raw Normal View History

2019-03-01 04:01:01 +00:00
### Vars
2021-12-30 02:11:44 +00:00
set $terminal alacritty
2019-03-01 04:01:01 +00:00
### Color configuration
2021-05-30 02:13:46 +00:00
set $color1 #383838
set $color2 #ebdbb2
2019-03-01 04:01:01 +00:00
# class border backgr. text indicator child_border
2021-05-30 02:13:46 +00:00
client.focused $color2 $color2 $color1 $color1 $color2
client.focused_inactive $color1 $color1 $color2 $color1 $color1
client.unfocused $color1 $color1 $color2 $color1 $color1
client.urgent $color1 $color1 $color2 $color1 $color1
client.placeholder $color1 $color1 $color2 $color1 $color1
client.background $color1
2019-03-01 04:01:01 +00:00
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
2021-05-30 02:13:46 +00:00
font pango:monospace 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
2024-06-18 16:09:41 +00:00
set $ws10 "TV"
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
2020-07-17 00:09:41 +00:00
for_window [app_id="firefox" title="Firefox - Sharing Indicator"] floating enable
for_window [app_id="firefox" title="Picture-in-Picture"] {
floating enable
sticky enable
}
2019-03-01 04:01:01 +00:00
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
}
2020-07-17 00:09:41 +00:00
# Inhibit idle if a window is fullscreen
for_window [class="^.*"] inhibit_idle fullscreen
for_window [app_id="^.*"] inhibit_idle fullscreen
2019-03-01 04:01:01 +00:00
### Output configuration
output "*" {
background ~/.local/share/wallpaper fill
2019-03-01 04:01:01 +00:00
}
2024-03-27 16:34:40 +00:00
set $output1 "LG Electronics LG QHD 0x00051E95"
2023-10-02 03:34:08 +00:00
workspace $ws3 output $output1 VGA-1
workspace $ws4 output $output1 VGA-1
workspace $ws5 output $output1 VGA-1
workspace $ws6 output $output1 VGA-1
workspace $ws7 output $output1 VGA-1
workspace $ws8 output $output1 VGA-1
workspace $ws9 output $output1 VGA-1
2024-03-27 16:34:07 +00:00
workspace sunshine output $output1 VGA-1
output $output1 {
2023-11-09 04:06:25 +00:00
position 0 270
# we need to explicitly select the mode
mode 2560x1440@144Hz
2020-09-02 19:47:17 +00:00
adaptive_sync on
}
set $output2 "Ancor Communications Inc ASUS VH238 BALMIB547836"
2023-10-02 03:34:08 +00:00
workspace $ws1 output $output2 eDP-1
workspace $ws2 output $output2 eDP-1
output $output2 {
2023-11-09 04:06:25 +00:00
position 2560 0
transform 270
}
2024-06-18 16:09:41 +00:00
set $output3 "Sony SONY TV *30 0x01010101"
workspace $ws10 output $output3
output $output3 {
mode 3840x2160@120Hz
adaptive_sync on
disable
}
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
2024-06-11 04:13:12 +00:00
pointer_accel -0.4
2019-03-01 04:01:01 +00:00
}
### Key bindings
# start a terminal
bindsym $mod+Return exec $terminal
# thunar
2024-06-18 16:09:41 +00:00
bindsym $mod+Mod1+Return exec dolphin
2019-03-01 04:01:01 +00:00
# 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
# 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
2024-06-18 16:09:41 +00:00
# toggle TV
bindsym $mod+Alt+0 output $output3 toggle
2019-03-01 04:01:01 +00:00
# Assignation
2019-09-17 23:31:13 +00:00
assign [class="^[Ss]lack$"] $ws1
assign [class="^[Dd]iscord$"] $ws1
2020-12-05 02:18:03 +00:00
#assign [class="^looking-glass-client$"] $ws3
2019-03-01 04:01:01 +00:00
# screen
2023-10-02 03:34:08 +00:00
# workspace $ws1 output HDMI-A-2
# workspace $ws2 output HDMI-A-2
# workspace $ws3 output HDMI-A-1
# workspace $ws4 output HDMI-A-1
# workspace $ws5 output HDMI-A-1
# workspace $ws6 output HDMI-A-1
# workspace $ws7 output HDMI-A-1
# workspace $ws8 output HDMI-A-1
# workspace $ws9 output HDMI-A-1
# workspace $ws10 output HDMI-A-1
2019-03-01 04:01:01 +00:00
# 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
2021-05-30 02:13:46 +00:00
exec hash dbus-update-activation-environment 2>/dev/null && \
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
2019-03-01 04:01:01 +00:00
# autorun .desktop
exec /bin/dex -a
# run a terminal
exec $terminal
2023-10-02 03:34:08 +00:00
# setup outputs
exec_always ~/.local/bin/setup-outputs
2019-03-01 04:01:01 +00:00
bar {
2019-05-09 21:37:18 +00:00
swaybar_command waybar
2019-03-01 04:01:01 +00:00
}