2022-07-21 16:26:10 +02:00
|
|
|
# vim: ft=sway tw=99
|
2020-04-29 10:58:21 +02:00
|
|
|
set
|
|
|
|
{
|
|
|
|
$mod Mod4
|
|
|
|
$left h
|
|
|
|
$down j
|
|
|
|
$up k
|
|
|
|
$right l
|
2021-11-15 23:45:34 +01:00
|
|
|
$lock exec swaylock -f
|
2020-04-29 12:53:25 +02:00
|
|
|
$lockt exec ~/utils/bin/sway-locker -t
|
2022-10-17 22:13:40 +02:00
|
|
|
$chromium_flags --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-gpu-rasterization --enable-zero-copy --js-flags=--jitless
|
2021-06-11 23:24:08 +02:00
|
|
|
$keyring "/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh"
|
2022-10-17 21:56:51 +02:00
|
|
|
$term KITTY_ENABLE_WAYLAND=1 kitty -1 # qterminal alacritty
|
2022-10-17 22:14:22 +02:00
|
|
|
$menu wofi --show drun --allow-markup swaymsg exec --
|
2020-10-05 18:20:37 +02:00
|
|
|
$nutermmenu kitty --class 'launcher' bash -c 'compgen -c | sort -u | fzf | xargs -r kitty'
|
2022-10-17 22:14:58 +02:00
|
|
|
$bemenu bemenu-run --fork -l 5 -n -p "▶" --fn 'FiraCode Retina 17' | xargs swaymsg exec
|
2021-05-03 04:10:55 +02:00
|
|
|
$dashpls nwggrid
|
2020-06-11 23:12:48 +02:00
|
|
|
# $bg "~/Pictures/apod/2019-January-2-The-Orion-Nebula-in-Infrared-from-WISE.jpg fit #000000"
|
2020-10-05 18:20:37 +02:00
|
|
|
# $bg "~/Pictures/apod/2020-April-29-The-Ion-Tail-of-New-Comet-SWAN.jpg fit #000000"
|
2020-11-24 20:49:09 +01:00
|
|
|
$bg "~/Pictures/apod/2020-August-11-Churning-Clouds-on-Jupiter.jpg"
|
|
|
|
$bg2 "~/Pictures/apod/2019-October-20-Pluto-at-Night.jpg"
|
2021-09-01 16:11:33 +02:00
|
|
|
$gtk_theme "Dracula"
|
2022-10-17 22:45:57 +02:00
|
|
|
$gtk_font_name "CascadiaCodePL ExtraLight"
|
|
|
|
$gtk_font_size "10.4"
|
2020-04-29 10:58:21 +02:00
|
|
|
$icon_theme "Flat-Remix-Blue-Dark"
|
2021-09-01 16:11:33 +02:00
|
|
|
$theme "Dracula"
|
2022-10-17 22:45:57 +02:00
|
|
|
$gtk_cursor_theme "Adwaita"
|
2021-02-04 22:50:23 +01:00
|
|
|
$laptop_screen "eDP-1"
|
2022-10-17 21:57:42 +02:00
|
|
|
$ext_screen "Dell Inc. DELL U2412M Y1H5T27N1EVL"
|
|
|
|
$ext_screen2 "Dell Inc. DELL U2412M YPPY077L1JXS"
|
2021-02-04 22:50:23 +01:00
|
|
|
$pri $laptop_screen
|
|
|
|
$sec $ext_screen
|
2022-10-17 21:57:42 +02:00
|
|
|
$ter $ext_screen2
|
2020-04-29 10:58:21 +02:00
|
|
|
}
|
|
|
|
|
2022-07-21 16:24:19 +02:00
|
|
|
default_border pixel 0
|
2020-11-24 20:49:09 +01:00
|
|
|
default_floating_border normal
|
2022-10-17 21:51:44 +02:00
|
|
|
# hide_edge_borders --i3 both
|
|
|
|
# smart_borders on
|
2021-12-07 02:41:51 +01:00
|
|
|
|
2021-02-04 22:50:23 +01:00
|
|
|
# works also for non-floating windows
|
2021-11-15 23:44:24 +01:00
|
|
|
# normal - drag floating windows by holding down $mod and left mouse button.
|
|
|
|
# resize them with right mouse button + $mod.
|
2021-02-04 22:50:23 +01:00
|
|
|
# inverse for $mod+left click to resize, $mod+right click to drag
|
2021-11-15 23:44:24 +01:00
|
|
|
floating_modifier $mod normal
|
2020-04-29 10:58:21 +02:00
|
|
|
|
2020-10-05 18:20:37 +02:00
|
|
|
#smart_gaps on
|
2021-12-07 02:43:01 +01:00
|
|
|
smart_gaps inverse_outer
|
2020-04-29 10:58:21 +02:00
|
|
|
gaps outer 8
|
|
|
|
gaps inner 5
|
|
|
|
|
2021-06-14 11:24:17 +02:00
|
|
|
font pango:FiraCode Retina 14px
|
2020-04-29 10:58:21 +02:00
|
|
|
|
|
|
|
exec_always --no-startup-id
|
|
|
|
{
|
2020-11-24 20:49:09 +01:00
|
|
|
swaymsg output $pri bg $bg fill #000000
|
|
|
|
swaymsg output $sec bg $bg2 fill #000000
|
2022-10-17 22:43:41 +02:00
|
|
|
swaymsg output $ter bg $bg fill #000000
|
2020-04-29 11:43:41 +02:00
|
|
|
gsettings set org.gnome.desktop.interface gtk-theme '$gtk_theme'
|
2020-04-29 10:58:21 +02:00
|
|
|
gsettings set org.gnome.desktop.interface icon-theme '$icon_theme'
|
2022-10-17 22:45:57 +02:00
|
|
|
gsettings set org.gnome.desktop.interface cursor-theme '$gtk_cursor_theme'
|
|
|
|
gsettings set org.gnome.desktop.interface font-name '$gtk_font_name $gtk_font_size'
|
2021-09-01 16:11:33 +02:00
|
|
|
gsettings set org.gnome.desktop.wm.preferences button-layout 'icon:close'
|
|
|
|
gsettings set org.gnome.desktop.wm.preferences theme '$theme'
|
2022-10-17 22:22:02 +02:00
|
|
|
gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true
|
|
|
|
|
|
|
|
pgrep -u $(id -u) kanshi && pkill kanshi
|
|
|
|
pgrep -u $(id -u) ibus-daemon && pkill ibus-daemon
|
|
|
|
ibus-daemon -dxrt auto
|
|
|
|
### Needed for xdg-desktop-portal-kde
|
|
|
|
dbus-update-activation-environment --systemd --all
|
|
|
|
/usr/lib/xdg-desktop-portal --replace
|
|
|
|
pgrep -u $(id -u) kdeconnect-indi && pkill kdeconnect-indi
|
|
|
|
pgrep -u $(id -u) mako && pkill mako
|
|
|
|
pgrep -u $(id -u) fusuma && pkill fusuma
|
|
|
|
pgrep -u $(id -u) swayrd && pkill swayrd
|
|
|
|
pgrep -u $(id -u) autotiling && pkill autotiling
|
|
|
|
pgrep -u $(id -u) batsignal && pkill batsignal
|
|
|
|
pgrep -u $(id -u) swayidle && pkill swayidle
|
|
|
|
|
|
|
|
kdeconnect-indicator
|
|
|
|
mako
|
|
|
|
XDG_SESSION_TYPE=x11 XDG_CURRENT_DESKTOP=gnome fusuma -d -c ~/.config/fusuma/config-wl.yml
|
|
|
|
env RUST_BACKTRACE=1 ~/.cargo/bin/swayrd > /tmp/swayrd.log 2>&1
|
|
|
|
kanshi
|
|
|
|
autotiling
|
|
|
|
batsignal '-d -w 25 -c 15 -d 10'
|
|
|
|
swayidle -w \
|
|
|
|
timeout 545 'pgrep -u $(id -u) swaylock || notify-send -t 15000 -u critical -i "Idle timeout" "Screen is locking soon"' \
|
|
|
|
timeout 600 "$lock" \
|
|
|
|
timeout 610 'swaymsg "output * dpms off"' \
|
|
|
|
timeout 15 'pgrep -u $(id -u) swaylock && swaymsg "output * dpms off"' \
|
|
|
|
resume 'swaymsg "output * dpms on"' \
|
|
|
|
before-sleep "pgrep -u $(id -u) swaylock || $lockt"
|
2020-04-29 10:58:21 +02:00
|
|
|
}
|
2021-05-03 04:10:55 +02:00
|
|
|
|
|
|
|
exec --no-startup-id {
|
2022-10-17 22:34:31 +02:00
|
|
|
# TODO(me):
|
|
|
|
# https://github.com/slgobinath/SafeEyes
|
2021-05-03 04:10:55 +02:00
|
|
|
nm-applet --indicator
|
|
|
|
lxpolkit
|
|
|
|
dbus-update-activation-environment DISPLAY XAUTHORITY
|
2022-10-17 22:22:02 +02:00
|
|
|
ibus-daemon -dxrt auto
|
2021-06-11 23:24:08 +02:00
|
|
|
$keyring
|
2022-10-17 22:22:02 +02:00
|
|
|
### Needed for xdg-desktop-portal-kde
|
|
|
|
dbus-update-activation-environment --systemd --all
|
|
|
|
/usr/lib/xdg-desktop-portal --replace
|
|
|
|
pgrep -u $(id -u) kdeconnect-indi || kdeconnect-indicator
|
|
|
|
pgrep -u $(id -u) mako || mako
|
|
|
|
# XDG_SESSION_TYPE=x11 XDG_CURRENT_DESKTOP=gnome fusuma -d -c ~/.config/fusuma/config-wl.yml
|
|
|
|
pgrep -u $(id -u) fusuma || fusuma -d -c ~/.config/fusuma/config-wl.yml
|
|
|
|
env RUST_BACKTRACE=1 ~/.cargo/bin/swayrd > /tmp/swayrd.log 2>&1
|
|
|
|
pgrep -u $(id -u) kansi || kanshi
|
|
|
|
pgrep -u $(id -u) autotiling || autotiling
|
|
|
|
pgrep -u $(id -u) batsignal || batsignal '-d -w 25 -c 15 -d 10'
|
|
|
|
pgrep -u $(id -u) swayidle || swayidle -w \
|
|
|
|
timeout 545 'pgrep -u $(id -u) swaylock || notify-send -t 15000 -u critical -i "Idle timeout" "Screen is locking soon"' \
|
|
|
|
timeout 600 "$lock" \
|
|
|
|
timeout 610 'swaymsg "output * dpms off"' \
|
|
|
|
timeout 15 'pgrep -u $(id -u) swaylock && swaymsg "output * dpms off"' \
|
|
|
|
resume 'swaymsg "output * dpms on"' \
|
|
|
|
before-sleep "pgrep -u $(id -u) swaylock || $lockt"
|
2021-05-03 04:10:55 +02:00
|
|
|
}
|
|
|
|
|
2020-04-29 10:58:21 +02:00
|
|
|
bindsym ctrl+alt+l exec --no-startup-id $lock
|
2021-02-04 22:50:23 +01:00
|
|
|
bindsym $mod+grave exec $lock
|
2022-10-17 22:23:03 +02:00
|
|
|
bindswitch --reload --locked lid:on exec --no-startup-id $(swaymsg output $laptop_screen disable && /usr/local/bin/kanshictl reload)
|
|
|
|
bindswitch --reload --locked lid:off exec --no-startup-id $(swaymsg output $laptop_screen enable && /usr/local/bin/kanshictl reload)
|
|
|
|
|
2020-10-05 18:20:37 +02:00
|
|
|
exec --no-startup-id swaymsg focus output $pri
|
2021-02-04 22:50:23 +01:00
|
|
|
output "*" bg $bg fill #000000
|
2020-04-29 10:58:21 +02:00
|
|
|
|
|
|
|
#--- Window Decorations
|
|
|
|
set
|
|
|
|
{
|
2020-04-29 11:43:41 +02:00
|
|
|
$nofocus #202020
|
|
|
|
$focus #202020
|
|
|
|
$titletxt #FFFFE8
|
|
|
|
$titlepad 10 center #000000
|
2020-04-29 10:58:21 +02:00
|
|
|
$gaps_change 20
|
|
|
|
}
|
|
|
|
#--- Notifications
|
|
|
|
set
|
|
|
|
{
|
|
|
|
$n_anchor top-center
|
|
|
|
$n_layer overlay
|
|
|
|
$n_dim 600
|
|
|
|
$n_margin 20
|
|
|
|
$n_padding 10
|
|
|
|
$n_border 3
|
|
|
|
$n_bg #202020
|
|
|
|
$n_fg #FFFFE8
|
|
|
|
}
|
|
|
|
|
|
|
|
bindsym
|
|
|
|
{
|
|
|
|
$mod+Return exec $term
|
2020-06-11 23:12:48 +02:00
|
|
|
$mod+t exec $term
|
2020-10-05 18:20:37 +02:00
|
|
|
$mod+ctrl+Shift+t exec qterminal
|
2020-04-29 10:58:21 +02:00
|
|
|
$mod+Shift+q kill
|
|
|
|
alt+F1 exec $menu
|
2021-05-03 04:10:55 +02:00
|
|
|
alt+Shift+F1 exec $dashpls
|
2021-05-29 20:48:36 +02:00
|
|
|
alt+F2 exec $bemenu
|
2021-12-07 02:31:00 +01:00
|
|
|
alt+F3 exec ulauncher-toggle
|
2020-10-05 18:20:37 +02:00
|
|
|
alt+Shift+F2 exec $nutermmenu
|
|
|
|
$mod+ctrl+k exec QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_QPA_PLATFORMTHEME=wayland keepassxc
|
2021-05-03 04:10:55 +02:00
|
|
|
$mod+ctrl+t exec QT_QPA_PLATFORMTHEME=wayland telegram-desktop
|
2020-10-05 18:20:37 +02:00
|
|
|
$mod+ctrl+v exec QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_QPA_PLATFORMTHEME=wayland VirtualBox
|
2020-11-02 17:32:35 +01:00
|
|
|
$mod+shift+m exec swaymsg output $(swaymsg -p -t get_outputs | grep Output | head -n2 | tail -n1 | sed -e 's/Output //g' -e 's/ ''.*$//g') toggle
|
2020-04-29 10:58:21 +02:00
|
|
|
}
|
2020-10-05 18:20:37 +02:00
|
|
|
for_window [app_id="^launcher$"] floating enable, border none, resize set width 25 ppt height 100 ppt, move position 0 px 0 px
|
2020-04-29 10:58:21 +02:00
|
|
|
|
2022-07-21 15:23:34 +02:00
|
|
|
input 1:1:AT_Translated_Set_2_keyboard
|
2020-04-29 10:58:21 +02:00
|
|
|
{
|
2022-07-21 15:23:34 +02:00
|
|
|
# laptop kbd
|
2020-04-29 10:58:21 +02:00
|
|
|
xkb_layout gb,sk
|
2020-06-11 23:12:48 +02:00
|
|
|
xkb_options grp:win_space_toggle,compose:ralt
|
2020-04-29 10:58:21 +02:00
|
|
|
xkb_variant ",qwerty"
|
|
|
|
repeat_delay 280
|
2020-10-05 18:20:37 +02:00
|
|
|
repeat_rate 55
|
2022-07-21 15:23:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
input 1133:16522:Logitech_MX_Keys
|
|
|
|
{
|
|
|
|
xkb_layout gb,sk
|
|
|
|
xkb_options grp:win_space_toggle,compose:ralt
|
|
|
|
xkb_variant ",qwerty"
|
|
|
|
repeat_delay 280
|
|
|
|
repeat_rate 55
|
|
|
|
}
|
|
|
|
|
|
|
|
input 1102:4619:DLL07A7:01_044E:120B
|
|
|
|
{
|
|
|
|
# touchpad
|
|
|
|
accel_profile adaptive
|
2020-04-29 10:58:21 +02:00
|
|
|
|
|
|
|
tap enabled
|
2021-12-07 02:36:31 +01:00
|
|
|
# disable-while-typing
|
|
|
|
dwt enabled
|
2020-04-29 10:58:21 +02:00
|
|
|
natural_scroll enabled
|
|
|
|
scroll_method two_finger
|
2022-07-21 15:23:34 +02:00
|
|
|
# lrm treats 1 finger as left click, 2 fingers as right click, and 3
|
|
|
|
# fingers as middle click.
|
2020-04-29 10:58:21 +02:00
|
|
|
tap_button_map lrm
|
|
|
|
}
|
2022-07-21 15:23:34 +02:00
|
|
|
input 1149:8264:Primax_Kensington_Eagle_Trackball
|
2021-05-20 18:11:21 +02:00
|
|
|
{
|
2022-07-21 15:23:34 +02:00
|
|
|
# scroll_factor 1.5
|
|
|
|
scroll_factor 0.5
|
|
|
|
natural_scroll enabled
|
2021-05-20 18:11:21 +02:00
|
|
|
accel_profile adaptive
|
2021-12-07 02:36:31 +01:00
|
|
|
dwt enabled
|
2021-05-20 18:11:21 +02:00
|
|
|
}
|
2020-04-29 10:58:21 +02:00
|
|
|
|
|
|
|
focus_follows_mouse yes
|
|
|
|
focus_wrapping false
|
2021-06-12 10:44:24 +02:00
|
|
|
popup_during_fullscreen smart
|
2020-04-29 10:58:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
#--- Floating Windows ------------------------------------------------------
|
2021-11-16 00:07:04 +01:00
|
|
|
for_window [window_role="pop-up"] floating enable
|
|
|
|
for_window [window_role="bubble"] floating enable
|
|
|
|
for_window [window_role="task_dialog"] floating enable
|
|
|
|
for_window [window_role="Preferences"] floating enable
|
|
|
|
for_window [window_type="dialog"] floating enable
|
|
|
|
for_window [window_type="menu"] floating enable
|
|
|
|
for_window [window_role="About"] floating enable
|
2022-10-17 22:30:37 +02:00
|
|
|
for_window [instance="Farge"] floating enable
|
2021-11-16 00:07:04 +01:00
|
|
|
|
2020-04-29 11:43:41 +02:00
|
|
|
for_window [class="pop-up"] floating enable; border normal $border
|
|
|
|
for_window [window_role="pop-up"] floating enable; border normal $border
|
2020-04-29 10:58:21 +02:00
|
|
|
for_window [window_role="task_dialog"] floating enable; border normal $border
|
2020-04-29 11:43:41 +02:00
|
|
|
for_window [class="MEGAsync"] floating enable; border pixel 0
|
|
|
|
for_window [title=".*JetBrains.*"] floating enable; border pixel 1
|
|
|
|
for_window [class="matplotlib"] floating enable; border normal $border
|
|
|
|
for_window [class="dosbox"] floating enable; border normal $border
|
2020-04-29 10:58:21 +02:00
|
|
|
for_window [app_id="nm-connection-editor"]
|
|
|
|
{
|
|
|
|
floating enable
|
|
|
|
resize set width 882px
|
|
|
|
resize set height 600px
|
|
|
|
}
|
|
|
|
for_window [app_id="pavucontrol"]
|
|
|
|
{
|
|
|
|
floating enable
|
|
|
|
resize set width 882px
|
|
|
|
resize set height 600px
|
|
|
|
}
|
2021-12-07 02:31:00 +01:00
|
|
|
for_window [app_id="ulauncher"] border none
|
2020-04-29 10:58:21 +02:00
|
|
|
|
|
|
|
#--- Applications with CSD -------------------------------------------------
|
2020-04-29 11:43:41 +02:00
|
|
|
for_window [app_id="glade"] border pixel 2
|
2020-04-29 10:58:21 +02:00
|
|
|
for_window [app_id="baobab"] border pixel 2
|
|
|
|
for_window [title=".*eston.*"] border pixel 0
|
|
|
|
for_window [app_id="wdisplays"] border pixel 0
|
|
|
|
for_window [app_id="gnome-.*"] border pixel 1
|
|
|
|
for_window [app_id="qterminal"] border pixel 2
|
2020-04-29 11:43:41 +02:00
|
|
|
for_window [app_id="xterm"] border pixel 2
|
2020-04-29 10:58:21 +02:00
|
|
|
for_window [title=".*Brave.*"] border pixel 1 inhibit_idle fullscreen
|
2022-10-17 22:30:37 +02:00
|
|
|
for_window [title=".*Firefox.*"] border pixel 2 inhibit_idle fullscreen
|
|
|
|
for_window [app_id="firefox"] border pixel 2 inhibit_idle fullscreen
|
|
|
|
for_window [class="Firefox"] border pixel 2 inhibit_idle fullscreen
|
|
|
|
for_window [class="vlc"] border pixel 2 inhibit_idle visible fullscreen
|
|
|
|
for_window [app_id="vlc"] border pixel 2 inhibit_idle visible fullscreen
|
|
|
|
for_window [title=".*VLC*."] border pixel 2 inhibit_idle visible fullscreen
|
|
|
|
for_window [app_id="org.gnome.Nautilus"] border pixel 1
|
|
|
|
for_window [app_id="dolphin"] border pixel 1
|
|
|
|
for_window [app_id="kitty"] border pixel 2
|
2020-04-29 10:58:21 +02:00
|
|
|
|
2022-10-17 22:32:39 +02:00
|
|
|
# as per https://github.com/japhir/ArchConfigs/blob/master/swayconfig
|
|
|
|
# add the webcam screen for video recording
|
|
|
|
bindsym $mod+ctrl+Shift+a exec mpv --no-osc --demuxer-lavf-format=video4linux2 --demuxer-lavf-o-set=input_format=mjpeg av://v4l2:/dev/video0 || notify-send "failed to start webcam"
|
|
|
|
# for_window [title="^video0 - mpv$"] floating enable, sticky enable, resize set height 260 px, move absolute position 0 px 820 px, border none
|
|
|
|
for_window [title="^video0 - mpv$"] floating enable, sticky enable, resize set height 130 px, border none
|
|
|
|
for_window [title="Firefox — Sharing Indicator$"] floating enable, resize set height 16 px, border none
|
|
|
|
for_window [title="Picture-in-Picture"] floating enable
|
|
|
|
|
2020-04-29 10:58:21 +02:00
|
|
|
#--- Xtk Applications ------------------------------------------------------
|
2020-04-29 11:43:41 +02:00
|
|
|
for_window [title="xclock"] floating enable
|
2020-04-29 10:58:21 +02:00
|
|
|
for_window [title="Calculator"] floating enable
|
|
|
|
|
|
|
|
assign [app_id="telegram"] C
|
2022-07-21 16:22:58 +02:00
|
|
|
assign [class="Signal"] C
|
2020-04-29 10:58:21 +02:00
|
|
|
assign [title="Ferdi"] C
|
2021-02-04 22:50:23 +01:00
|
|
|
assign [title="Discord"] C
|
|
|
|
assign [class="Discord"] C
|
2020-04-29 10:58:21 +02:00
|
|
|
assign [class="vlc"] M
|
|
|
|
|
|
|
|
bindsym
|
|
|
|
{
|
2021-05-20 20:15:18 +02:00
|
|
|
# screenshot of all outputs
|
2021-05-20 20:11:02 +02:00
|
|
|
print exec grim $(xdg-user-dir PICTURES)/screenshots/grim-$(date +'%Y-%m-%dT%H-%M-%S').png
|
2021-05-20 20:15:18 +02:00
|
|
|
# screenshot of an area
|
2020-04-29 10:58:21 +02:00
|
|
|
Shift+print exec grim -g "$(slurp)" - | wl-copy
|
2021-05-20 20:15:18 +02:00
|
|
|
# screenshot of a window
|
2021-05-20 20:11:02 +02:00
|
|
|
Control+print exec winprint.sh
|
2021-05-20 20:14:51 +02:00
|
|
|
# colour picker
|
|
|
|
Control+Shift+print exec grim -g "$(slurp -p)" -t ppm - | convert - -format '%[pixel:p{0,0}]' txt: | wl-copy
|
2020-04-29 10:58:21 +02:00
|
|
|
$mod+c exec gnome-calculator
|
2022-10-17 22:33:52 +02:00
|
|
|
# -w: Always open a new window for browsing specified URIs.
|
|
|
|
$mod+n exec nautilus -w
|
2021-12-07 02:45:02 +01:00
|
|
|
$mod+Shift+n exec nemo
|
2020-10-05 18:20:37 +02:00
|
|
|
$mod+m exec QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_QPA_PLATFORMTHEME=wayland vlc
|
2022-10-17 22:13:40 +02:00
|
|
|
$mod+Shift+b exec brave-browser-beta --incognito $chromium_flags
|
2020-06-11 23:12:48 +02:00
|
|
|
$mod+Shift+w exec MOZ_USE_XINPUT2=1 MOZ_ENABLE_WAYLAND=1 ~/Downloads/firefox-dev/firefox --private-window
|
2021-11-10 03:00:24 +01:00
|
|
|
$mod+Ctrl+Shift+w exec MOZ_USE_XINPUT2=1 MOZ_ENABLE_WAYLAND=1 systemctl --user start ff_nn
|
2020-06-11 23:12:48 +02:00
|
|
|
$mod+Shift+g exec MOZ_USE_XINPUT2=1 MOZ_ENABLE_WAYLAND=1 firefox --private-window
|
2022-07-21 15:19:48 +02:00
|
|
|
$mod+Shift+v exec ferdi --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-gpu-rasterization --enable-zero-copy
|
2022-10-17 22:13:40 +02:00
|
|
|
$mod+Shift+a exec chromium-freeworld --incognito $chromium_flags
|
2020-06-11 23:12:48 +02:00
|
|
|
--locked $mod+Escape exec systemctl suspend -i
|
2022-10-17 22:11:10 +02:00
|
|
|
$mod+Shift+o exec kitty bash -c 'powerprofilesctl set power-saver; powerprofilesctl|grep "*"; sleep 1'
|
|
|
|
$mod+Shift+p exec kitty bash -c 'powerprofilesctl set performance; powerprofilesctl|grep "*"; sleep 1'
|
2020-10-05 18:20:37 +02:00
|
|
|
--locked $mod+ctrl+Shift+s exec kitty bash -c 'sudo dell-bios-fan-control 0;sudo i8kfan 0 0'
|
|
|
|
--locked $mod+ctrl+Shift+d exec kitty bash -c 'sudo dell-bios-fan-control 0;sudo i8kfan 0 1'
|
|
|
|
--locked $mod+ctrl+Shift+f exec kitty bash -c 'sudo dell-bios-fan-control 0;sudo i8kfan 0 2'
|
2021-11-10 15:35:20 +01:00
|
|
|
--locked $mod+ctrl+Shift+b exec kitty bash -c 'sudo dell-bios-fan-control 1; powerprofilesctl set balanced; powerprofilesctl|grep "*"'
|
2021-02-04 22:50:23 +01:00
|
|
|
$mod+Ctrl+r exec alacritty --class ranger -e ranger
|
2022-10-17 22:09:13 +02:00
|
|
|
# colour picker / eyedropper
|
|
|
|
$mod+Shift+Alt+f exec farge --notify
|
2022-10-17 22:09:21 +02:00
|
|
|
$mod+tab exec swayr switch-workspace-or-window
|
2020-04-29 10:58:21 +02:00
|
|
|
}
|
|
|
|
|
2022-10-17 22:08:22 +02:00
|
|
|
#
|
|
|
|
# Borders
|
|
|
|
#
|
|
|
|
bindsym --to-code
|
|
|
|
{
|
|
|
|
$mod+ctrl+semicolon border toggle
|
|
|
|
}
|
|
|
|
|
2022-10-17 22:08:46 +02:00
|
|
|
#
|
|
|
|
# Gaps
|
|
|
|
#
|
|
|
|
bindsym --to-code
|
|
|
|
{
|
|
|
|
# $mod+ctrl+minus gaps inner 2px
|
|
|
|
# $mod+ctrl+equal gaps inner 2px
|
|
|
|
$mod+z gaps outer current plus 5
|
|
|
|
$mod+Shift+z gaps outer current minus 5
|
|
|
|
$mod+x gaps inner current plus 5
|
|
|
|
$mod+Shift+x gaps inner current minus 5
|
|
|
|
}
|
|
|
|
|
2020-04-29 10:58:21 +02:00
|
|
|
# Notifications
|
|
|
|
bindsym Control+Space exec makoctl dismiss
|
|
|
|
bindsym Control+Shift+Space exec makoctl dismiss --all
|
2022-03-31 14:48:03 +02:00
|
|
|
bindsym Control+Alt+Space exec makoctl set-mode do-not-disturb
|
|
|
|
bindsym Control+Alt+Shift+Space exec makoctl set-mode default
|
2020-04-29 10:58:21 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Moving around:
|
|
|
|
#
|
|
|
|
bindsym
|
|
|
|
{
|
|
|
|
# Move your focus around
|
|
|
|
$mod+$left focus left
|
|
|
|
$mod+$down focus down
|
|
|
|
$mod+$up focus up
|
|
|
|
$mod+$right focus right
|
|
|
|
# Or use $mod+[up|down|left|right]
|
|
|
|
$mod+Left focus left
|
|
|
|
$mod+Down focus down
|
|
|
|
$mod+Up focus up
|
|
|
|
$mod+Right focus right
|
|
|
|
|
|
|
|
# Move the focused window with the same, but add Shift
|
|
|
|
$mod+Shift+$left move left
|
|
|
|
$mod+Shift+$down move down
|
|
|
|
$mod+Shift+$up move up
|
|
|
|
$mod+Shift+$right move right
|
|
|
|
# Ditto, with arrow keys
|
|
|
|
$mod+Shift+Left move left
|
|
|
|
$mod+Shift+Down move down
|
|
|
|
$mod+Shift+Up move up
|
|
|
|
$mod+Shift+Right move right
|
|
|
|
|
|
|
|
$mod+Shift+c move position center
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Workspaces:
|
|
|
|
#
|
|
|
|
# Switch to workspace
|
|
|
|
bindsym --to-code
|
|
|
|
{
|
|
|
|
$mod+Shift+comma workspace prev_on_output
|
|
|
|
$mod+Shift+period workspace next_on_output
|
|
|
|
$mod+Shift+tab workspace back_and_forth
|
2022-10-17 22:07:30 +02:00
|
|
|
$mod+comma focus output left
|
|
|
|
$mod+period focus output right
|
2020-06-11 23:12:48 +02:00
|
|
|
$mod+0 exec ~/.local/bin/swws.py 0
|
|
|
|
$mod+1 exec ~/.local/bin/swws.py 1
|
|
|
|
$mod+2 exec ~/.local/bin/swws.py 2
|
|
|
|
$mod+3 exec ~/.local/bin/swws.py 3
|
|
|
|
$mod+4 exec ~/.local/bin/swws.py 4
|
|
|
|
$mod+5 exec ~/.local/bin/swws.py 5
|
|
|
|
$mod+6 exec ~/.local/bin/swws.py 6
|
|
|
|
$mod+7 exec ~/.local/bin/swws.py 7
|
|
|
|
$mod+8 exec ~/.local/bin/swws.py 8
|
|
|
|
$mod+9 exec ~/.local/bin/swws.py 9
|
2020-04-29 10:58:21 +02:00
|
|
|
$mod+F2 workspace C
|
|
|
|
$mod+F3 workspace M
|
2020-06-11 23:12:48 +02:00
|
|
|
}
|
|
|
|
# Switch directly to workspace of another monitor
|
|
|
|
bindsym --to-code
|
|
|
|
{
|
|
|
|
$mod+ctrl+0 exec "~/.local/bin/swws.py 0 -c"
|
|
|
|
$mod+ctrl+1 exec "~/.local/bin/swws.py 1 -c"
|
|
|
|
$mod+ctrl+2 exec "~/.local/bin/swws.py 2 -c"
|
|
|
|
$mod+ctrl+3 exec "~/.local/bin/swws.py 3 -c"
|
|
|
|
$mod+ctrl+4 exec "~/.local/bin/swws.py 4 -c"
|
|
|
|
$mod+ctrl+5 exec "~/.local/bin/swws.py 5 -c"
|
|
|
|
$mod+ctrl+6 exec "~/.local/bin/swws.py 6 -c"
|
|
|
|
$mod+ctrl+7 exec "~/.local/bin/swws.py 7 -c"
|
|
|
|
$mod+ctrl+8 exec "~/.local/bin/swws.py 8 -c"
|
|
|
|
$mod+ctrl+9 exec "~/.local/bin/swws.py 9 -c"
|
2020-04-29 10:58:21 +02:00
|
|
|
}
|
|
|
|
# Move focused container to workspace
|
|
|
|
bindsym --to-code
|
|
|
|
{
|
2020-06-11 23:12:48 +02:00
|
|
|
$mod+Shift+0 exec "~/.local/bin/swws.py 0 -s"
|
|
|
|
$mod+Shift+1 exec "~/.local/bin/swws.py 1 -s"
|
|
|
|
$mod+Shift+2 exec "~/.local/bin/swws.py 2 -s"
|
|
|
|
$mod+Shift+3 exec "~/.local/bin/swws.py 3 -s"
|
|
|
|
$mod+Shift+4 exec "~/.local/bin/swws.py 4 -s"
|
|
|
|
$mod+Shift+5 exec "~/.local/bin/swws.py 5 -s"
|
|
|
|
$mod+Shift+6 exec "~/.local/bin/swws.py 6 -s"
|
|
|
|
$mod+Shift+7 exec "~/.local/bin/swws.py 7 -s"
|
|
|
|
$mod+Shift+8 exec "~/.local/bin/swws.py 8 -s"
|
|
|
|
$mod+Shift+9 exec "~/.local/bin/swws.py 9 -s"
|
2020-04-29 10:58:21 +02:00
|
|
|
$mod+Shift+F2 move container to workspace C
|
|
|
|
$mod+Shift+F3 move container to workspace M
|
|
|
|
}
|
2020-06-11 23:12:48 +02:00
|
|
|
# Move focused container to workspace of another monitor
|
|
|
|
bindsym --to-code
|
|
|
|
{
|
|
|
|
ctrl+$mod+Shift+0 exec "~/.local/bin/swws.py 0 -t"
|
|
|
|
ctrl+$mod+Shift+1 exec "~/.local/bin/swws.py 1 -t"
|
|
|
|
ctrl+$mod+Shift+2 exec "~/.local/bin/swws.py 2 -t"
|
|
|
|
ctrl+$mod+Shift+3 exec "~/.local/bin/swws.py 3 -t"
|
|
|
|
ctrl+$mod+Shift+4 exec "~/.local/bin/swws.py 4 -t"
|
|
|
|
ctrl+$mod+Shift+5 exec "~/.local/bin/swws.py 5 -t"
|
|
|
|
ctrl+$mod+Shift+6 exec "~/.local/bin/swws.py 6 -t"
|
|
|
|
ctrl+$mod+Shift+7 exec "~/.local/bin/swws.py 7 -t"
|
|
|
|
ctrl+$mod+Shift+8 exec "~/.local/bin/swws.py 8 -t"
|
|
|
|
ctrl+$mod+Shift+9 exec "~/.local/bin/swws.py 9 -t"
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Workspace-monitor assignments
|
|
|
|
#
|
|
|
|
workspace 0 output $pri
|
|
|
|
workspace 1 output $pri
|
|
|
|
workspace 2 output $pri
|
|
|
|
workspace 3 output $pri
|
|
|
|
workspace 4 output $pri
|
|
|
|
workspace 5 output $pri
|
|
|
|
workspace 6 output $pri
|
|
|
|
workspace 7 output $pri
|
|
|
|
workspace 8 output $pri
|
|
|
|
workspace 9 output $pri
|
|
|
|
workspace C output $pri
|
|
|
|
workspace M output $pri
|
|
|
|
workspace 10 output $sec
|
|
|
|
workspace 11 output $sec
|
|
|
|
workspace 12 output $sec
|
|
|
|
workspace 13 output $sec
|
|
|
|
workspace 14 output $sec
|
|
|
|
workspace 15 output $sec
|
|
|
|
workspace 16 output $sec
|
|
|
|
workspace 17 output $sec
|
|
|
|
workspace 18 output $sec
|
|
|
|
workspace 19 output $sec
|
2020-10-05 18:20:37 +02:00
|
|
|
workspace 20 output $ter
|
|
|
|
workspace 21 output $ter
|
|
|
|
workspace 22 output $ter
|
|
|
|
workspace 23 output $ter
|
|
|
|
workspace 24 output $ter
|
|
|
|
workspace 25 output $ter
|
|
|
|
workspace 26 output $ter
|
|
|
|
workspace 27 output $ter
|
|
|
|
workspace 28 output $ter
|
|
|
|
workspace 29 output $ter
|
2020-04-29 10:58:21 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Layout stuff:
|
|
|
|
#
|
|
|
|
bindsym
|
|
|
|
{
|
|
|
|
# You can "split" the current object of your focus with
|
|
|
|
# $mod+b or $mod+v, for horizontal and vertical splits
|
|
|
|
# respectively.
|
|
|
|
$mod+b splith
|
|
|
|
$mod+v splitv
|
|
|
|
|
|
|
|
# Switch the current container between different layout styles
|
|
|
|
$mod+s layout stacking
|
|
|
|
$mod+w layout tabbed
|
|
|
|
$mod+e layout toggle split
|
|
|
|
|
|
|
|
# Make the current focus fullscreen
|
|
|
|
$mod+f fullscreen
|
|
|
|
|
2022-10-17 22:06:53 +02:00
|
|
|
# for in-container fullscreen chromium
|
|
|
|
# ref: https://www.reddit.com/r/i3wm/comments/egvj3k/chrome_tabs_not_visible_in_full_screen_mode/fdeps34/
|
|
|
|
$mod+Shift+f split v; focus parent; fullscreen toggle; focus child
|
|
|
|
|
2020-04-29 10:58:21 +02:00
|
|
|
# Toggle the current focus between tiling and floating mode
|
|
|
|
#bindsym $mod+Shift+space floating toggle
|
|
|
|
$mod+Shift+d floating toggle
|
|
|
|
|
|
|
|
# Swap focus between the tiling area and the floating area
|
|
|
|
#bindsym $mod+space focus mode_toggle
|
|
|
|
$mod+d focus mode_toggle
|
|
|
|
|
|
|
|
# Move focus to the parent container
|
|
|
|
$mod+a focus parent
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Scratchpad:
|
|
|
|
#
|
|
|
|
# Sway has a "scratchpad", which is a bag of holding for windows.
|
|
|
|
# You can send windows there and get them back later.
|
|
|
|
|
|
|
|
bindsym --to-code
|
|
|
|
{
|
|
|
|
# Move the currently focused window to the scratchpad
|
|
|
|
$mod+Shift+minus move scratchpad
|
|
|
|
|
|
|
|
# Show the next scratchpad window or hide the focused scratchpad window.
|
|
|
|
# If there are multiple scratchpad windows, this command cycles through them.
|
|
|
|
$mod+minus scratchpad show
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Resizing containers:
|
|
|
|
#
|
|
|
|
mode "resize"
|
|
|
|
{
|
|
|
|
# left will shrink the containers width
|
|
|
|
# right will grow the containers width
|
|
|
|
# up will shrink the containers height
|
|
|
|
# down will grow the containers height
|
|
|
|
bindsym
|
|
|
|
{
|
|
|
|
$left resize shrink width 10px
|
|
|
|
$down resize grow height 10px
|
|
|
|
$up resize shrink height 10px
|
|
|
|
$right resize grow width 10px
|
|
|
|
|
|
|
|
# Ditto, with arrow keys
|
|
|
|
Left resize shrink width 10px
|
|
|
|
Down resize grow height 10px
|
|
|
|
Up resize shrink height 10px
|
|
|
|
Right resize grow width 10px
|
|
|
|
|
|
|
|
# Return to default mode
|
|
|
|
Return mode "default"
|
|
|
|
Escape mode "default"
|
|
|
|
$mod+r mode "default"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bindsym $mod+r mode "resize"
|
|
|
|
bindsym $mod+Shift+r reload
|
|
|
|
|
2020-11-24 20:49:09 +01:00
|
|
|
# kudos to github.com/rbnis for the following menu-like section inspiration
|
|
|
|
# https://github.com/rbnis/dotfiles/blob/dfd6f956f6d00a1012a3a167d947773095dac7fd/.config/sway/config#L228-L235
|
|
|
|
set $mode_sys System: (l) lock, (e) logout, (s) suspend, (r) reboot, (S) shutdown
|
|
|
|
mode "$mode_sys" {
|
|
|
|
bindsym {
|
|
|
|
l exec $lock, mode "default"
|
|
|
|
e exit
|
|
|
|
s exec --no-startup-id systemctl suspend -i, mode "default"
|
|
|
|
r exec --no-startup-id systemctl reboot, mode "default"
|
|
|
|
Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"
|
|
|
|
# return to default mode
|
|
|
|
Return mode "default"
|
|
|
|
Escape mode "default"
|
|
|
|
$mod+Shift+e mode "default"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bindsym $mod+Shift+e mode "$mode_sys"
|
|
|
|
|
2022-10-17 22:04:06 +02:00
|
|
|
bindsym XF86Sleep exec "systemctl suspend -i"
|
|
|
|
|
2020-04-29 10:58:21 +02:00
|
|
|
#
|
|
|
|
# media keys
|
|
|
|
#
|
|
|
|
bindsym
|
|
|
|
{
|
2020-06-11 23:12:48 +02:00
|
|
|
--locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
|
|
|
--locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
2022-10-17 22:05:28 +02:00
|
|
|
--locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle;exec notify-send -t3600 'audio muted'
|
|
|
|
--locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle;exec notify-send -t 3600 'mic mute toggle'
|
2020-06-11 23:12:48 +02:00
|
|
|
--locked XF86MonBrightnessUp exec light -A 5
|
|
|
|
--locked XF86MonBrightnessDown exec light -U 5
|
2021-06-14 11:33:16 +02:00
|
|
|
--locked $mod+Ctrl+p exec playerctl play-pause
|
2022-10-17 22:06:02 +02:00
|
|
|
--locked $mod+Ctrl+n exec playerctl next
|
|
|
|
--locked $mod+Ctrl+Shift+n exec playerctl previous
|
2021-02-04 22:50:23 +01:00
|
|
|
--locked XF86AudioPlay exec playerctl play-pause
|
|
|
|
--locked XF86AudioNext exec playerctl next
|
|
|
|
--locked XF86AudioPrev exec playerctl previous
|
2020-04-29 10:58:21 +02:00
|
|
|
}
|
|
|
|
|
2021-04-20 22:31:51 +02:00
|
|
|
|
2020-04-29 10:58:21 +02:00
|
|
|
include /etc/sway/config.d/*
|
2021-09-01 16:16:06 +02:00
|
|
|
include ~/.config/sway/config.d/*
|
2021-06-11 23:35:09 +02:00
|
|
|
# Export environment to systemd and start services.
|
|
|
|
exec "systemctl --user import-environment; systemctl --user start sway-session.target"
|