From 170c5385bc51a94fe1680231e0718dcb735c694f Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Thu, 29 Jul 2021 23:51:14 +0200 Subject: sway: update config --- .config/sway/auto.conf | 24 +++++++++++++++++------- .config/sway/binds.conf | 48 ++++++++++++++++++++++++++++++++++-------------- .config/sway/config | 18 ++++++++---------- .config/sway/input.conf | 10 +++++++--- 4 files changed, 66 insertions(+), 34 deletions(-) (limited to '.config/sway') diff --git a/.config/sway/auto.conf b/.config/sway/auto.conf index ca7b85a..df65c74 100644 --- a/.config/sway/auto.conf +++ b/.config/sway/auto.conf @@ -1,14 +1,22 @@ # vim: ft=i3config # NOTE: never use assign, it crashes sway for some reason... +# for_window [floating] border csd + +for_window [app_id="mpv"] max_render_time off +for_window [app_id="foot"] max_render_time 4 +for_window [app_id="firefox.*"] max_render_time 6 + for_window [app_id="mpv"] floating enable; inhibit_idle open # for_window [app_id="mpv" title=".* - mvi$"] border pixel $bpix; + for_window [app_id="imv"] floating enable; inhibit_idle open for_window [app_id="^__floating-.*"] floating enable for_window [class="pinentry"] floating enable; border normal -for_window [class="zoom" title="Settings"] floating enable -for_window [class="zoom" title="Zoom - Converting.*"] floating enable +# for_window [class="zoom" title="Settings"] floating enable +# for_window [class="zoom" title="Zoom - Converting.*"] floating enable +for_window [class="zoom"] floating enable for_window [title="tridactyledit"] floating enable for_window [app_id="launcher"] floating enable @@ -23,8 +31,12 @@ for_window [app_id="firefox.*" title="^File Upload$"] floating enable for_window [app_id="firefox.*" title="^Save As$"] floating enable # exec centercon -w .6 for_window [app_id="firefox.*" title="^Open Firefox in Troubleshoot Mode?$"] floating enable +for_window [app_id="multimc" title="Folder$"] floating enable -for_window [app_id="Telegram" title="^Choose Files$"] floating enable; exec centercon -w .6 +for_window [app_id="telegramdesktop" title="^Choose Files$"] floating enable; exec centercon -w .6 +for_window [app_id="telegramdesktop" title="^Media viewer$"] floating enable +for_window [app_id="Telegram" floating] exec centercon -w .6 +for_window [app_id="telegramdesktop" floating] exec centercon -w .6 for_window [app_id="obs" title="^Local File$"] floating enable; exec centercon -w .6 # Tag windows @@ -41,10 +53,8 @@ for_window [con_mark="browser"] inhibit_idle fullscreen # Move around set $outputSide eDP-1 -set $wsWork 3 -set $wsMail 2 -for_window [con_mark="work"] move workspace $wsWork -for_window [con_mark="mail"] move workspace $wsMail, move workspace to output $outputSide, layout tabbed +for_window [con_mark="work"] move workspace 3 +for_window [con_mark="mail"] move workspace 2, move workspace to output $outputSide, layout tabbed for_window [class="Spotify"] move workspace $wsMusic, move workspace to output $outputSide for_window [class="osu!"] move workspace $wsGame, layout tabbed, exec osu-mode on diff --git a/.config/sway/binds.conf b/.config/sway/binds.conf index 7800cd9..6679e57 100644 --- a/.config/sway/binds.conf +++ b/.config/sway/binds.conf @@ -11,9 +11,7 @@ bindsym $mod+w exec firefox --private-window bindsym $mod+Shift+q kill # start your launcher -bindsym $mod+d exec $run_menu -bindsym $mod+Shift+d exec $menu -bindsym $mod+o exec fs +bindsym $mod+d exec menu -run # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. @@ -35,22 +33,44 @@ bindsym $mod+Shift+e exec swaynag \ bindsym $mod+Shift+backspace exec lock +bindsym $mod+Shift+b border toggle +bindsym $mod+Shift+r output - transform 90 anticlockwise + +# }}} + bindsym Print exec grimshot copy output bindsym $mod+Shift+s mode "screengrab" +# {{{ mode "screengrab" { -bindsym a exec grimshot save screen; mode "default" -bindsym o exec grimshot save output; mode "default" -bindsym s exec grimshot save area; mode "default" -bindsym c exec grimshot copy area; mode "default" -bindsym p exec colorpick; mode "default" + bindsym a exec grimshot save screen; mode "default" + bindsym o exec grimshot save output; mode "default" + bindsym s exec grimshot save area; mode "default" + bindsym c exec grimshot copy area; mode "default" + bindsym p exec colorpick; mode "default" -bindsym Escape mode "default" -} + bindsym r exec grimshot rec win; mode "default" + bindsym q exec pkill -INT wf-recorder; mode "default" -bindsym $mod+Shift+b border toggle -bindsym $mod+Shift+r output - transform 90 anticlockwise + bindsym Escape mode "default" + bindsym Return mode "default" +} +# }}} -bindsym $mod+Shift+a exec soundswitch +bindsym $mod+m mode "menu" +# {{{ +mode "menu" { + bindsym a exec soundswitch; mode "default" + bindsym m exec mnts; mode "default" + bindsym n exec notifmenu; mode "default" + bindsym o exec fs; mode "default" + bindsym p exec passmenu; mode "default" + bindsym r exec rcmenu; mode "default" + bindsym x exec menu -drun; mode "default" + + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym q mode "default" +} # }}} # Moving around {{{ @@ -228,7 +248,7 @@ bindsym XF86AudioPrev exec playerctl -p playerctld previous bindsym XF86WakeUp exec true # switch video mode -bindsym XF86Display exec once -K kanshi; exec once kanshi +bindsym XF86Display exec kanshictl reload # config bindsym XF86Tools exec true # keyboard diff --git a/.config/sway/config b/.config/sway/config index b1ef8f1..8af69ad 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -1,7 +1,9 @@ # vim: ft=i3config fdm=marker +gaps inner 5 + output * scale 1 -output * max_render_time 1 +output * max_render_time 15 output * adaptive_sync on # for_window [app_id=Alacritty] max_render_time 2 @@ -20,11 +22,7 @@ set $up k set $right l set $term footclient -# set $floating_term alacritty --config-file $HOME/.config/alacritty/launcher.yml --class '__floating-Alacritty' -set $floating_term foot -c $HOME/.config/foot/float.ini -set $menu menu -drun -# set $menu wofi -k /dev/null --terminal $term --show drun -set $run_menu menu -run +set $floating_term floaterm set $firefox nightly # workspaces {{{ @@ -87,12 +85,8 @@ client.unfocused $bg2 $bg $text2 $indicator_unfocused $bg client.urgent $urgent2 $urgent $text $indicator_focused $urgent # }}} -# include config.d/* -# include "`uname -n`" - exec { light -S 80 - once mako once oguri once kanshi once wlsunset -l $HOME_LAT -L $HOME_LON -H ~/bin/darkmode @@ -109,3 +103,7 @@ exec { exec { dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK && once pipewire } + +exec_always sleep 1.4 && kanshictl reload + +include config.d/* diff --git a/.config/sway/input.conf b/.config/sway/input.conf index 1c30aaf..10ac7d4 100644 --- a/.config/sway/input.conf +++ b/.config/sway/input.conf @@ -20,9 +20,9 @@ input type:touchpad { tap enabled natural_scroll enabled } -input type:tablet_tool { - accel_profile flat -} +#input type:tablet_tool { +# accel_profile flat +#} set { $keyboard 1:1:AT_Translated_Set_2_keyboard @@ -56,3 +56,7 @@ bindsym --input-device=$slimblade --whole-window button3 seat - cursor press but # seat pen hide_cursor 10000 # seat pen idle_inhibit tablet_tool # seat pen idle_wake tablet_tool + +input $pen { + accel_profile flat +} -- cgit 1.4.1