Rework sway configuration

This commit is contained in:
Yorick Barbanneau 2021-03-08 00:03:05 +01:00
parent f27fa828f0
commit f8d84d44ab
26 changed files with 271 additions and 0 deletions

View file

@ -0,0 +1,111 @@
set $mod Mod4
# basic operation (reload, menu, menu etc.)
# -----------------------------------------
bindsym $mod+Shift+c reload
bindsym $mod+Shift+e exit
bindsym $mod+Return exec $term
bindsym $mod+d exec $menu
bindsym $mod+Alt+l exec swaylock -i $lock_bg
# kill focused window
bindsym $mod+Shift+q kill
# Moving around:
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move the focused window with the same, but add Shift
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
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 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# 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 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
# Layout stuff
# -----------
#split
bindsym $mod+b splith
bindsym $mod+v splitv
# layout
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+f fullscreen
# Toggle floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# move focus to the parent container
bindsym $mod+a focus parent
# move to scratchpad
bindsym $mod+Shift+p move scratchpad
bindsym $mod+p scratchpad show
# Media keys
# ----------
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%
bindsym XF86AudioMute exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle
# More resize
# -----------
bindsym $mod+r mode "resize"
mode "resize" {
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
# return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
# Mako
# ----
bindsym $mod+n exec makoctl dismiss

View file

@ -0,0 +1,18 @@
set $term termite
set $menu exec $term --name=launcher -e launcher.sh
set $lock_bg ~/documents/ressources/wallpapers/morty.jpg
# Input configuration
input * xkb_layout "us"
input * xkb_variant "altgr-intl"
output * bg ~/documents/ressources/wallpapers/building_cyberpunk.jpg fill
# autostart
# ---------
exec swayidle \
timeout 300 'swaylock -i $lock_bg' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -i $lock_bg'

View file

@ -0,0 +1,33 @@
set $term kitty
set $menu exec $term --class=launcher ~/.local/bin/launcher.sh
set $lock_bg ~/documents/ressources/wallpapers/morty.jpg
# Input configuration
input * xkb_layout "us"
input * xkb_variant "altgr-intl"
# Workspace and Windows
for_window [app_id="cal"] resize set height 240px
for_window [app_id="pavucontrol"] floating enable, resize set 600px 400px
# Brightness
bindsym XF86MonBrightnessDown exec brightnessctl set 2%-
bindsym XF86MonBrightnessUp exec brightnessctl set 2%+
output * bg ~/documents/ressources/wallpapers/building_cyberpunk.jpg fill
output eDP-1 scale 2
exec swayidle \
timeout 300 'swaylock -i $lock_bg' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -i $lock_bg'
# Autolaunch
for_window [app_id="cal"] resize set height 240 px
# $ws3 firefox
exec swaymsg 'workspace $ws3; exec firefox'
# launch mail workspace
exec ~/.local/bin/launch_mail_worksplace.sh

View file

View file

View file

@ -0,0 +1,33 @@
set $term kitty
set $menu exec $term --class=launcher ~/.local/bin/launcher.sh
set $lock_bg ~/documents/ressources/wallpapers/morty.jpg
# Input configuration
input * xkb_layout "us"
input * xkb_variant "altgr-intl"
# Workspace and Windows
for_window [app_id="cal"] resize set height 240px
for_window [app_id="pavucontrol"] floating enable, resize set 600px 400px
# Brightness
bindsym XF86MonBrightnessDown exec brightnessctl set 2%-
bindsym XF86MonBrightnessUp exec brightnessctl set 2%+
output * bg ~/documents/ressources/wallpapers/building_cyberpunk.jpg fill
output eDP-1 scale 2
exec swayidle \
timeout 300 'swaylock -i $lock_bg' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -i $lock_bg'
# Autolaunch
for_window [app_id="cal"] resize set height 240 px
# $ws3 firefox
exec swaymsg 'workspace $ws3; exec firefox'
# launch mail workspace
exec ~/.local/bin/launch_mail_worksplace.sh

View file

@ -0,0 +1,2 @@
input * xkb_layout "us"
input * xkb_variant "altgr-intl"

View file

@ -0,0 +1,3 @@
# Brightness
bindsym XF86MonBrightnessDown exec brightnessctl set 2%-
bindsym XF86MonBrightnessUp exec brightnessctl set 2%+

View file

@ -0,0 +1,2 @@
output * bg ~/documents/ressources/wallpapers/building_cyberpunk.jpg fill
output eDP-1 scale 2

View file

View file

@ -0,0 +1,3 @@
exec swaymsg 'workspace $ws3; exec firefox'
# launch mail workspace
exec ~/.local/bin/launch_mail_worksplace.sh

View file

View file

@ -0,0 +1,3 @@
set $term kitty
set $menu exec $term --class=launcher ~/.local/bin/launcher.sh
set $lock_bg ~/documents/ressources/wallpapers/morty.jpg

View file

@ -0,0 +1 @@
for_window [app_id="cal"] resize set height 240 px

View file

@ -0,0 +1,16 @@
# startup
# -------
exec_always import-gsettings.sh \
icon-theme:gtk-icon-theme-name \
cursor-theme:gtk-cursor-theme-name \
gtk-theme:gtk-theme-name \
font-name:gtk-font-name
exec swayidle \
timeout 300 'swaylock -i $lock_bg' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -i $lock_bg'
exec mako

View file

@ -0,0 +1,11 @@
# Appareance
# ----------
gaps inner 5
font pango:FuraCode Nerd Font Mono 10
default_border pixel 1
default_floating_border pixel 1
title_align center
client.focused #f268b3 #a82d70 #ffffff #f268b3 #f268b3
client.unfocused #000000 #4d3d46 #cccccc #000000 #000000

View file

@ -0,0 +1,12 @@
set $left h
set $down j
set $up k
set $right l
set $ws1 1: 
set $ws2 2: 
set $ws3 3: 
set $ws4 4: 
set $ws5 5: 
set $ws6 6: 
set $ws7 7: 

View file

@ -0,0 +1,23 @@
set $ws1 1: 
set $ws2 2: 
set $ws3 3: 
set $ws4 4: 
set $ws5 5: 
set $ws6 6: 
set $ws7 7: 
# Windows
assign [app_id="^firefox$"] $ws3
assign [app_id="KeePassXC$"] $ws3
assign [app_id="org.remmina.*"] $ws5
assign [app_id="homebank"] $ws6
assign [app_id="org.inkscape.Inkscape"] $ws7
assign [app_id="^libreoffice-*"] $ws6
assign [class="Gimp"] $ws7
# Manage float windows
for_window [app_id="imv"] floating enable
for_window [app_id="org.pwmt.zathura"] floating enable
for_window [app_id="^launcher$"] floating enable, resize set 800px 400px
for_window [title="Remmina Remote Desktop Client"] floating enable
for_window [app_id="pavucontrol"] floating enable, resize set 600px 400px