diff --git a/sway/config b/sway/config index 3bdbf0ba5b742eb146f512247fa075ab2a28d3c3..a957e16c9307a06c2624d12acb7bb075d930d074 100644 --- a/sway/config +++ b/sway/config @@ -1,9 +1,14 @@ +# General Look and Feel +font pango:"JetBrains Mono" 10 include catppuccin-frappe -# Default config for sway -# Read `man 5 sway` for a complete reference. -# Set font -font pango:"JetBrains Mono" 10 +# target title bg text indicator border +client.focused $lavender $base $text $rosewater $lavender +client.focused_inactive $overlay0 $base $text $rosewater $overlay0 +client.unfocused $overlay0 $base $text $rosewater $overlay0 +client.urgent $peach $base $peach $overlay0 $peach +client.placeholder $overlay0 $base $text $overlay0 $overlay0 +client.background $base ### Variables # @@ -42,6 +47,10 @@ exec --no-startup-id "avizo-service" # Binds for workspace Manager - Sov exec rm -f /tmp/sovpipe && mkfifo /tmp/sovpipe && tail -f /tmp/sovpipe | sov -t 500 + +# For the custom +# exec_always "pkill -f 'python3? .+/swaymonad.py'; ~/.config/sway/swaymonad/swaymonad.py" + # Your preferred application launcher # Note: pass the final command to swaymsg so that the resulting window can be opened # on the original workspace that the command was run on. @@ -57,9 +66,7 @@ smart_gaps inverse_outer output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill # # Example configuration: -# # output HDMI-A-1 resolution 1920x1080 position 1920,0 -# # You can get the names of your outputs by running: swaymsg -t get_outputs # Clipboard manager @@ -107,7 +114,9 @@ exec swayidle -w \ bindsym $mod+d exec $menu # Lockscreen - bindsym $mod+Escape exec $lockscreen # Drag floating windows by holding down $mod and left mouse button. + bindsym $mod+Escape exec $lockscreen + + # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. # Despite the name, also works for non-floating windows. # Change normal to inverse to use left mouse button for resizing and right @@ -207,37 +216,26 @@ exec swayidle -w \ # 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 +# +# Special and Media Keys: +# + # Manage volume controls using PulseAudio + bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle + bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% + bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% + bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle -# target title bg text indicator border -client.focused $lavender $base $text $rosewater $lavender -client.focused_inactive $overlay0 $base $text $rosewater $overlay0 -client.unfocused $overlay0 $base $text $rosewater $overlay0 -client.urgent $peach $base $peach $overlay0 $peach -client.placeholder $overlay0 $base $text $overlay0 $overlay0 -client.background $base - - -# Manage volume controls using PulseAudio -bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle -bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% -bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% -bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle - -# Media Player Controls -bindsym XF86AudioPlay exec playerctl play-pause -bindsym XF86AudioNext exec playerctl next -bindsym XF86AudioPrev exec playerctl previous - -# Calculator Button -bindsym XF86Calculator exec kcalc -for_window [class="(?i)KCalc"] floating enable -for_window [app_id="(?i)KCalc"] floating enable - + # Media Player Controls + bindsym XF86AudioPlay exec playerctl play-pause + bindsym XF86AudioNext exec playerctl next + bindsym XF86AudioPrev exec playerctl previous -# Manage Screen Brightness -bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%- -bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set 5%+ + # Manage Screen Brightness + bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%- + bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set 5%+ + # Calculator Button + bindsym XF86Calculator exec kcalc # # Resizing containers: @@ -261,35 +259,25 @@ mode "resize" { # Return to default mode bindsym Return mode "default" bindsym Escape mode "default" + bindsym $mod+r mode "default" } bindsym $mod+r mode "resize" + +include /etc/sway/config.d/* + + # -# Status Bar: +# External Configurations: # -# Read `man 5 sway-bar` for more information about this section. -bar { - position top - - swaybar_command waybar - font "jetbrains-mono" - - colors { - background $base - statusline $text - focused_statusline $text - focused_separator $base - focused_workspace $base $base $green - active_workspace $base $base $blue - inactive_workspace $base $base $surface1 - urgent_workspace $base $base $surface1 - binding_mode $base $base $surface1 - } -} + # Sway(?) Bar + include config-bar -include /etc/sway/config.d/* + # Keybindings + include config-keybinds -exec_always "pkill -f 'python3? .+/swaymonad.py'; ~/.config/sway/swaymonad/swaymonad.py" + # SwayFX Special Effects + include config-fancy -# SwayFX Special Effects -include config-fancy + # Window-specific definitions + include config-window-specifics diff --git a/sway/config-bar b/sway/config-bar new file mode 100644 index 0000000000000000000000000000000000000000..6778cc0016e2eb893daf8f6769145fd78fc8a892 --- /dev/null +++ b/sway/config-bar @@ -0,0 +1,23 @@ + +# +# Status Bar: +# +# Read `man 5 sway-bar` for more information about this section. +bar { + position top + + swaybar_command waybar + font "jetbrains-mono" + + colors { + background $base + statusline $text + focused_statusline $text + focused_separator $base + focused_workspace $base $base $green + active_workspace $base $base $blue + inactive_workspace $base $base $surface1 + urgent_workspace $base $base $surface1 + binding_mode $base $base $surface1 + } +} diff --git a/sway/config-fancy b/sway/config-fancy index 1d0c3f57102d53fe2c5e2886318d9687badbd3f5..e4b370ec8ba93725f64ad07465d1611f4384d56c 100644 --- a/sway/config-fancy +++ b/sway/config-fancy @@ -4,11 +4,6 @@ corner_radius 10 default_dim_inactive 0.50 dim_inactive_colors.unfocused #00000088 dim_inactive_colors.urgent #90000088 -for_window [app_id="(?i)firefox" title="^Picture-in-Picture$"] \ - floating enable, \ - dim_inactive 0.00, \ - sticky enable, \ - width 100 # Bar between titlebar and content titlebar_separator disable diff --git a/sway/config-keybinds b/sway/config-keybinds new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/sway/config-window-specifics b/sway/config-window-specifics new file mode 100644 index 0000000000000000000000000000000000000000..26682a7b51cbb047a62ece6daf6b439ddaec2c30 --- /dev/null +++ b/sway/config-window-specifics @@ -0,0 +1,11 @@ + +# Calculator +for_window [class="(?i)KCalc"] floating enable +for_window [app_id="(?i)KCalc"] floating enable + +# Picture-in-Picture floating window mowe +for_window [app_id="(?i)firefox" title="^Picture-in-Picture$"] \ + floating enable, \ + dim_inactive 0.00, \ + sticky enable, \ + width 100