From d084754c4a13ee74162275bafa63de4b6b2cb031 Mon Sep 17 00:00:00 2001 From: Andrea Rogers Date: Sat, 31 Aug 2024 17:39:43 -0500 Subject: [PATCH] sway: Add SwayFX config from Surface Pro You may need to change $main_display from LVDS-1 to eDP-1 on newer laptops! --- .sway/config | 88 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 35 deletions(-) mode change 100644 => 100755 .sway/config diff --git a/.sway/config b/.sway/config old mode 100644 new mode 100755 index bb423af..1c395fb --- a/.sway/config +++ b/.sway/config @@ -1,11 +1,17 @@ # This file was auto-generated by i3-config-wizard(1) a long, long time ago. -set $mod Mod1 # Alt/Option on most keyboards -set $mod2 Mod4 # Super/Command on most keyboards +# Set to eDP-1 on most newer laptops! +set $main_screen LVDS-1 + +# Alt/Option on most keyboards +set $mod Mod1 + +# Super/Command on most keyboards +set $mod2 Mod4 # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. -font pango:monofur for Powerline 10 +font pango:Monofur Nerd Font Propo 10 # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod @@ -18,13 +24,10 @@ bindsym $mod+Shift+Return exec alacritty bindsym $mod2+Shift+Return exec urxvt # rotate screen -bindsym $mod2+Up exec swaymsg output "eDP-1" transform "180" -bindsym $mod2+Left exec swaymsg output "eDP-1" transform "90" -bindsym $mod2+Right exec swaymsg output "eDP-1" transform "270" -bindsym $mod2+Down exec swaymsg output "eDP-1" transform "normal" - -# werk-layout -#bindsym $mod2+w exec /home/anon/.screenlayout/werk-tripple.sh +bindsym $mod2+Up exec swaymsg output $main_screen transform "180" +bindsym $mod2+Left exec swaymsg output $main_screen transform "90" +bindsym $mod2+Right exec swaymsg output $main_screen transform "270" +bindsym $mod2+Down exec swaymsg output $main_screen transform "normal" # Brightness keys (TODO: Sway-ify) #bindsym XF86MonBrightnessUp exec xbacklight -inc 20 @@ -41,12 +44,13 @@ bindsym $mod2+Shift+1 exec projectM-pulseaudio # kill focused window bindsym $mod+Shift+c kill -# start program launcher +# start dmenu (a program launcher) bindsym $mod+p exec bemenu-run --tb "#9ece9e" --tf "#0c0c0c" --nb "#1f1f1f" --nf "#ffcfaf" --sb "#f0dfaf" --sf "#1f1f1f" --hf "#9ece9e" # thigh gaps -#gaps inner 10 -#gaps outer 20 +# gaps inner 10 +# gaps outer 20 +# smart_gaps off # change focus bindsym $mod+h focus left @@ -145,10 +149,7 @@ bindsym $mod2+$mod+0 move container to workspace 20 # reload the configuration file bindsym $mod+Shift+r reload -# restart sway inplace (preserves your layout/session, can be used to upgrade sway) -bindsym $mod+Shift+u restart - -# exit sway logs you out of your session +# exit Sway bindsym $mod+Shift+q exec "swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit Sway?' -b 'Yes, exit Sway' 'swaymsg exit'" # resize window (you can also use the mouse for that) @@ -180,7 +181,6 @@ bindsym $mod+r mode "resize" # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) bar { - font pango:monofur for Powerline 9.5 position top status_command i3status @@ -194,6 +194,7 @@ bar { urgent_workspace #d33682 #d33682 #fdf6e3 } } + # Colors # class border backgr. text indicator child_border client.focused #8faf9f #9ece9e #0c0c0c #8faf9f @@ -203,38 +204,55 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000 client.placeholder #000d18 #0c0c0c #ffffff #000d18 #0c0c0c client.background #ffffff +# SwayFX +shadows enable +shadow_offset 5 10 +shadow_blur_radius 55 +shadow_color #000000AF +shadow_inactive_color #0000007F + exec /usr/lib/gnome-settings-daemon/* + +# Setup Xwayland exec xrdb ~/.Xresources exec_always xrandr --output $(xrandr | grep -m 1 XWAYLAND | awk '{print $1;}') --primary -exec alacritty --class scratch_term --working-directory /home/anon/notes +# Setup scratchpad windows +exec alacritty --class scratch_term --working-directory $HOME/notes exec urxvt -name Ranger -e ranger for_window [app_id="scratch_term"] move to scratchpad for_window [instance="Ranger"] move to scratchpad bindsym $mod+o [app_id="scratch_term"] scratchpad show -bindsym $mod+Shift+o exec alacritty --class scratch_term --working-directory /home/anon/notes +bindsym $mod+Shift+o exec alacritty --class scratch_term --working-directory $HOME/notes bindsym $mod+i [instance="Ranger"] scratchpad show bindsym $mod+Shift+i exec urxvt -name Ranger -e ranger -input * { +# Uncomment this to make Caps Lock a Control key on all keyboards. +#input * { +# xkb_options "caps:ctrl_modifier" +#} + +input "1118:1948:MICROSOFT_SAM_Keyboard" { xkb_options "caps:ctrl_modifier" } -#input "2612:258:TG3_Electronics,_Inc._nBLT_Keyboard" { -# -#} +input "1003:33289:Atmel_Atmel_maXTouch_Digitizer" { + map_to_output $main_screen +} -#### GARAGE DESK ### -output HDMI-A-1 pos 0 0 transform 270 -output DP-1 pos 1080 0 transform 90 -output eDP-1 pos 0 1920 +# Monitor outputs +output DP-1 { + pos 0 0 + # mode 3840x2160@30.000Hz + # scale 1.28 + # transform 270 +} -# PIPER'S TV -# output HDMI-A-1 pos 0 0 -# output eDP-1 pos 960 2160 +output $main_screen { + # pos 4916 0 + pos 0 1080 +} # Sway papes -#output "*" background /home/anon/pics/papes/l337wallpaperz_1920.png fill -#output "*" background /home/anon/pics/papes/04199_lonelyisland_4096x2304.jpg fill -output "*" background /home/anon/pics/papes/2f102a08ce7aaabee429129d8f464896.jpg fill -#output "*" background /home/anon/pics/papes/tmbgsnowman.jpg tile +#output "*" background ~/Library/Desktop Pictures/Green.jpg fill +output "*" background ~/Library/Desktop Pictures/TV.jpg fill