From e54a1e78692db8ab6b2cacd0efba3d7a5246d079 Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Tue, 14 Feb 2023 10:58:22 +0100 Subject: [PATCH] Update sway configs --- sway/config | 6 +++++- sway/config.d/bar | 1 - sway/config.d/displays | 20 +++++++++++++++++++- sway/config.d/keys | 7 ++++++- sway/config.d/keys_scratchpad | 6 ++++-- sway/config.d/screen_sharing | 2 ++ sway/config.d/window_rules | 14 ++++++++++++++ sway/config.d/zoom.conf | 14 ++++++++++++++ sway/themes/default | 10 +++++----- sway/themes/dracula | 13 +++++++------ sway/themes/dracula2 | 17 +++++++++++++++++ 11 files changed, 93 insertions(+), 17 deletions(-) create mode 100644 sway/config.d/screen_sharing create mode 100644 sway/config.d/zoom.conf create mode 100644 sway/themes/dracula2 diff --git a/sway/config b/sway/config index b895f20..3042ac8 100644 --- a/sway/config +++ b/sway/config @@ -21,5 +21,9 @@ include @sysconfdir@/sway/config.d/* include $HOME/.config/sway/config.d/* # Color Scheme -include $HOME/.config/sway/themes/dracula +include $HOME/.config/sway/themes/dracula2 # include $HOME/.config/sway/themes/default + +exec wl-clipsync +exec mako +exec env QT_QPA_PLATFORM=wayland kwalletd5 diff --git a/sway/config.d/bar b/sway/config.d/bar index 8aca0d3..2ea4300 100644 --- a/sway/config.d/bar +++ b/sway/config.d/bar @@ -5,7 +5,6 @@ # Read `man 5 sway-bar` for more information about this section. bar { - font $uifont position top swaybar_command waybar } diff --git a/sway/config.d/displays b/sway/config.d/displays index fe2b355..8664b20 100644 --- a/sway/config.d/displays +++ b/sway/config.d/displays @@ -2,5 +2,23 @@ # Display configurations # -# Set UI scale to 1.5 on home display (AOC U2790) +# Laptop screen +# output eDP-1 position 1920 0 scale 2 +output eDP-1 position 2560 0 scale 2 + +# Home display (AOC U2790) output "Unknown U2790B 0x000007CE" scale 1.5 + +# Office Dell 24" +# output "Dell Inc. DELL U2412M YPPY07AV1AHB" position 0 0 +output "Dell Inc. DELL U2421HE CD8LV83" position 0 0 + +# Office Dell 27" 1080p +output "Dell Inc. DELL P2719HC 6T1Y223" position 0 0 + +# Maison n9 TV +output "Samsung Electric Company SAMSUNG 0x00000701" res 3840x2160 scale 2 position 0 0 + +# Current office 4K LG screen +output "LG Electronics LG HDR 4K 0x0000E7EC" position 0 0 scale 1.5 res 3840x2160 + diff --git a/sway/config.d/keys b/sway/config.d/keys index a700310..fc57fbb 100644 --- a/sway/config.d/keys +++ b/sway/config.d/keys @@ -18,7 +18,7 @@ bindsym --locked Alt+F10 exec screens-off bindsym --locked Alt+F1 exec screens-on # Start a terminal -bindsym $mod+Return exec termite +bindsym $mod+Return exec alacritty # Start your launcher # set $menu dmenu_path | dmenu | xargs swaymsg exec -- @@ -39,6 +39,11 @@ bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #d bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound # Media player controls +seat * keyboard_grouping none bindsym XF86AudioPlay exec playerctl -p spotify,plasma-browser-integration play-pause bindsym XF86AudioNext exec playerctl -p spotify,plasma-browser-integration next bindsym XF86AudioPrev exec playerctl -p spotify,plasma-browser-integration previous + +# Laptop screen brightness +bindsym XF86MonBrightnessUp exec --no-startup-id laptop-screen-brightness up 10 +bindsym XF86MonBrightnessDown exec --no-startup-id laptop-screen-brightness down 10 diff --git a/sway/config.d/keys_scratchpad b/sway/config.d/keys_scratchpad index c837428..25e4594 100644 --- a/sway/config.d/keys_scratchpad +++ b/sway/config.d/keys_scratchpad @@ -2,9 +2,11 @@ # Scratchpad # +# All keybindings are disabled to avoid confusion + # Move the currently focused window to the scratchpad -bindsym $mod+Shift+minus move scratchpad +# bindsym $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. -bindsym $mod+minus scratchpad show +# bindsym $mod+minus scratchpad show diff --git a/sway/config.d/screen_sharing b/sway/config.d/screen_sharing new file mode 100644 index 0000000..ed474f9 --- /dev/null +++ b/sway/config.d/screen_sharing @@ -0,0 +1,2 @@ +exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway + diff --git a/sway/config.d/window_rules b/sway/config.d/window_rules index 7dfffdc..d6ea0ef 100644 --- a/sway/config.d/window_rules +++ b/sway/config.d/window_rules @@ -2,6 +2,20 @@ # Window rules # + +for_window [window_type="dialog"] floating enable +for_window [window_type="splash"] floating enable +for_window [window_type="menu"] floating enable +for_window [window_type="dropdown_menu"] floating enable +for_window [window_type="popup_menu"] floating enable +for_window [window_type="tooltip"] floating enable + for_window [app_id="nm-connection-editor"] floating enable for_window [app_id="pavucontrol"] floating enable for_window [app_id="spotify-qt"] floating enable + +# Annoying and pointless sharing indicator +# First make it float so that window layout doesn't change before it gets killed +# for_window [app_id="firefox" title="Firefox - Sharing Indicator"] floating enable +for_window [app_id="firefox" title="^Firefox .* Sharing Indicator$"] floating enable +for_window [app_id="firefox" title="^Firefox .* Sharing Indicator$"] kill diff --git a/sway/config.d/zoom.conf b/sway/config.d/zoom.conf new file mode 100644 index 0000000..154711d --- /dev/null +++ b/sway/config.d/zoom.conf @@ -0,0 +1,14 @@ +# ~/.config/sway/config.d/zoom.us.conf +# +# Zoom Meeting App +# +# Default for all windows is non-floating. +# +# For pop up notification windows that don't use notifications api +for_window [app_id="zoom" title="^zoom$"] border none, floating enable +# For specific Zoom windows +for_window [app_id="zoom" title="^(Zoom|About)$"] border pixel, floating enable +for_window [app_id="zoom" title="Settings"] floating enable, floating_minimum_size 960 x 700 +# Open Zoom Meeting windows on a new workspace (a bit hacky) +for_window [app_id="zoom" title="Zoom Meeting(.*)?"] workspace next_on_output --create, move container to workspace current, floating disable, inhibit_idle open + diff --git a/sway/themes/default b/sway/themes/default index 7316ea8..2abc63c 100644 --- a/sway/themes/default +++ b/sway/themes/default @@ -1,8 +1,8 @@ # Default theme that came with sway # Changed focused background color a bit -# class border backgr. text wtf . child_border # wtf = indicator? -client.focused #14568c #0e3f66 #ffffff #14568c #14568c -client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a -client.unfocused #333333 #222222 #888888 #292d2e #222222 -client.urgent #2f343a #900000 #ffffff #900000 #900000 \ No newline at end of file +# class border bg text indic child_border +client.focused #14568c #0e3f66 #ffffff #14568c #14568c +client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a +client.unfocused #333333 #222222 #888888 #292d2e #222222 +client.urgent #2f343a #900000 #ffffff #900000 #900000 diff --git a/sway/themes/dracula b/sway/themes/dracula index d84f6c1..744f3bf 100644 --- a/sway/themes/dracula +++ b/sway/themes/dracula @@ -2,10 +2,11 @@ # https://github.com/dracula/i3/blob/master/.config/i3/config # Slightly modified -client.focused #ffb86c #ffb86c #282a36 #ffb86c #ffb86c -client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A -client.unfocused #44475A #282A36 #F8F8F2 #44475A #44475A -client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555 -client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36 +# class border bg text indic child_border +client.focused #ffb86c #ffb86c #282a36 #ffb86c #ffb86c +client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A +client.unfocused #44475A #282A36 #F8F8F2 #44475A #44475A +client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555 +client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36 -client.background #F8F8F2 \ No newline at end of file +client.background #F8F8F2 diff --git a/sway/themes/dracula2 b/sway/themes/dracula2 new file mode 100644 index 0000000..dc35aeb --- /dev/null +++ b/sway/themes/dracula2 @@ -0,0 +1,17 @@ +set $color1 "#14568c" +set $color2 "#0e3f66" +set $color3 "#ffffff" +set $color4 "#333333" +set $color5 "#5f676a" +set $color6 "#484e50" +set $color7 "#222222" +set $color8 "#2f343a" +set $color9 "#888888" +set $color0 "#900000" +set $colorx "#292d2e" + +# class border bg text indic child_border +client.focused $color1 $color2 $color3 $color1 $color1 +client.focused_inactive $color4 $color5 $color3 $color6 $color5 +client.unfocused $color4 $color7 $color9 $colorx $color7 +client.urgent $color8 $color0 $color3 $color0 $color0