Change to Alacritty for grave, tablet improvements

Automatically rotate 270 upon tablet switch. Move a few 'behaviour'
settings to main config
This commit is contained in:
John Mertz 2023-04-09 21:24:23 -04:00
parent 323a492c04
commit 585127fe28
2 changed files with 29 additions and 20 deletions

View File

@ -5,9 +5,9 @@
################################################################################ ################################################################################
# ` - Grave # ` - Grave
assign [class="UXTerm"] grave assign [app_id="Alacritty-grave"] grave
# 0 - HUD # 0 - HUD
assign [app_id="chrome-papillon.john.me.tz*"] 0 # Dedicated Chromium window for HUD assign [app_id="chrome-papillon.john.me.tz__-Default"] 0
# 1 - Chat # 1 - Chat
assign [class="Mattermost"] 1 assign [class="Mattermost"] 1
assign [app_id="Mattermost"] 1 assign [app_id="Mattermost"] 1
@ -40,6 +40,7 @@ assign [app_id="argos"] 9
# Floating windows # Floating windows
################################################################################ ################################################################################
for_window [app_id="Alacritty-grave"] floating enable, resize set height 600px, resize set width 800px, move position 990px 400px
for_window [app_id="org.gnome.Software"] floating enable # Gnome software doesn't get correct dimensions for_window [app_id="org.gnome.Software"] floating enable # Gnome software doesn't get correct dimensions
for_window [title="SSH Passphrase"] floating enable # SSH auth dialog for_window [title="SSH Passphrase"] floating enable # SSH auth dialog
for_window [title="^Picture-in-Picture$"] floating enable # Picture-in-picture firefox for_window [title="^Picture-in-Picture$"] floating enable # Picture-in-picture firefox
@ -50,7 +51,7 @@ for_window [instance="Download"] floating enable
for_window [window_role="plugin_ui"] floating enable for_window [window_role="plugin_ui"] floating enable
for_window [title="Menu Update"] floating enable for_window [title="Menu Update"] floating enable
for_window [title="___"] floating enable for_window [title="___"] floating enable
for_window [class="UXTerm"] floating enable, resize set height 600px, resize set width 800px, move position 990px 400px for_window [title="todotxt-machine"] floating enable, resize set height 600px, resize set width 800px, move position 990px 400px
for_window [class="Tlpui"] floating enable for_window [class="Tlpui"] floating enable
for_window [title="XTerm"] floating enable for_window [title="XTerm"] floating enable
for_window [class="Gvim"] floating enable for_window [class="Gvim"] floating enable
@ -72,13 +73,3 @@ for_window [shell="xwayland"] title_format "%title [XWayland]"
# Maintain 'urgency' for 1 second # Maintain 'urgency' for 1 second
force_display_urgency_hint 1000 ms force_display_urgency_hint 1000 ms
# Move cursor to center of container when switching
mouse_warping container
# Restore display configuration on reload
bindswitch --reload lid:on /home/jpm/scripts/sway/displays.pl detached
# Rotate screen and toggle OSK on tablet mode change
bindswitch --reload tablet:on busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true; swaymsg output eDP-1 rotate 270
bindswitch --reload tablet:off busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b false; swaymsg output eDP-1 rotate 0

View File

@ -26,9 +26,31 @@ input * middle_emulation enable
# Hide cursor after 5 seconds # Hide cursor after 5 seconds
seat seat0 hide_cursor 5000 seat seat0 hide_cursor 5000
# Move cursor to center of container when switching
mouse_warping container
# Disable mouse as trigger to wake from idle # Disable mouse as trigger to wake from idle
#seat * idle_wake keyboard switch #seat * idle_wake keyboard switch
################################################################################
# Touchscreen
################################################################################
# Map touchscreen to output
input 1386:20615:Wacom_Pen_and_multitouch_sensor_Pen map_to_output eDP-1
input 1386:20615:Wacom_Pen_and_multitouch_sensor_Finger map_to_output eDP-1
#
# bindswitch [lib|tablet]:[on|off|toggle]
bindswitch --reload tablet:on exec ${HOME}/scripts/thinkpad/tablet_mode.sh on ; busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true
bindswitch --reload tablet:off exec ${HOME}/scripts/thinkpad/tablet_mode.sh off; busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b false
################################################################################
# Lid switch
################################################################################
# Restore display configuration on reload
bindswitch --reload lid:on /home/jpm/scripts/sway/displays.pl detached
################################################################################ ################################################################################
# Appearance # Appearance
################################################################################ ################################################################################
@ -43,8 +65,8 @@ seat seat0 xcursor_theme FlatbedCursors-Blue
# Minimize borders from all windows # Minimize borders from all windows
hide_edge_borders none hide_edge_borders none
default_floating_border none default_floating_border pixel 1
default_border none default_border pixel 1
# Font only visible in tabbed mode. Also inheritted by bar. # Font only visible in tabbed mode. Also inheritted by bar.
font pango:Anonymous Pro 12 font pango:Anonymous Pro 12
@ -70,7 +92,7 @@ client.background $base07
client.focused $base05 $base0D $base00 $base0D $base0D client.focused $base05 $base0D $base00 $base0D $base0D
client.focused_inactive $base01 $base01 $base05 $base03 $base01 client.focused_inactive $base01 $base01 $base05 $base03 $base01
client.unfocused $base01 $base00 $base05 $base01 $base01 client.unfocused $base01 $base00 $base05 $base01 $base01
client.urgent $base08 $base08 $base00 $base08 $base08 client.urgent $base02 $base08 $base00 $base08 $base02
# Feature request (https://github.com/swaywm/sway/pull/7208) does not exist as of 1.7 # Feature request (https://github.com/swaywm/sway/pull/7208) does not exist as of 1.7
#client.sticky $base04 $base04 $base04 $base04 $base04 #client.sticky $base04 $base04 $base04 $base04 $base04
#client.sticky_inactive $base06 $base06 $base06 $base06 $base06 #client.sticky_inactive $base06 $base06 $base06 $base06 $base06
@ -97,10 +119,6 @@ floating_modifier $mod
# Load special window behaviours # Load special window behaviours
include $HOME/.dotfiles/sway/behaviours include $HOME/.dotfiles/sway/behaviours
# TODO Execute actions upon entering/exiting a device mode
# bindswitch [lib|tablet]:[on|off|toggle]
# eg. bindswitch tablet:on tablet_mode.sh on
# X window 'activation' should just make a window 'urgent' instead of 'focused' # X window 'activation' should just make a window 'urgent' instead of 'focused'
focus_on_window_activation urgent focus_on_window_activation urgent