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

297 lines
8.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### 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.
set $font Hack Nerd Font
font pango:$font 8
set $ws1 "1:[1]"
set $ws2 "2:[2]"
set $ws3 "3:[3]"
set $ws4 "4:[4]"
set $ws5 "5:[5]"
set $ws6 "6:[6]"
set $ws7 "7:[7]"
set $ws8 "8:[8]"
set $ws9 "9:[9]"
set $ws10 "10:[10]"
# default workspace
workspace "2:[2]"
# 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
for_window [app_id="pavucontrol"] floating enable
for_window [app_id="org.remmina.Remmina" title="Remmina Remote Desktop Client"] floating enable
for_window [class="TeamViewer"] floating enable
for_window [class="feh" title="Pinned screenshot"] {
floating enable
sticky enable
}
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
# 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
### Output configuration
output "*" {
background ~/.local/share/wallpaper fill
}
### 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
input "2:18:FocalTechPS/2_FocalTech_Touchpad" {
tap enabled
tap_button_map lrm
middle_emulation enabled
}
input "*" {
xkb_layout us
xkb_variant altgr-intl
xkb_options caps:super
}
### 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)
bindsym $mod+Control+Return exec rofi -combi drun -show drun -modi drun,window
# start rofi-pass for password autotype
bindsym $mod+Shift+Return exec rofi-pass
# start rofi-radio
bindsym $mod+p exec ~/.config/sway/rofi-radio.py
# 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
bindsym $mod+Shift+space floating toggle
# 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
assign [class="^Slack$"] $ws1
assign [class="^discord$"] $ws1
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
# 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
bindsym Shift+print exec sshot --pin
bindsym Control+print exec sshot --partial
bindsym Alt+print exec sshot --window
bindsym print exec sshot
# 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
exec /bin/systemctl --user start sway-session.target
# autorun .desktop
exec /bin/dex -a
# run a terminal
exec $terminal
bar {
status_command i3status --config ~/.config/sway/i3status.conf
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
}
}