diff --git a/module/sway/module/10-Launcher b/module/sway/module/10-Launcher index 1e20895..3238ea2 100644 --- a/module/sway/module/10-Launcher +++ b/module/sway/module/10-Launcher @@ -2,3 +2,5 @@ # 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. set $menu _dmenu_path_wrapped | wmenu -b -p 'Run:' -i -f "SF Pro Display Medium 14" -M 1d2021 -S 1d2021 -N 1d2021 -m b8bb26 -s b8bb26 -n ebdbb2 | xargs swaymsg exec -- + +bindsym $mod+space exec $menu diff --git a/module/sway/module/10-Terminal b/module/sway/module/10-Terminal index 6469588..de2a54c 100644 --- a/module/sway/module/10-Terminal +++ b/module/sway/module/10-Terminal @@ -1,2 +1,4 @@ # Terminal emulator. set $term foot --config=$FOOT_CONFIG + +bindsym $mod+Escape exec $term -e bash -c "tmux new-session -A -s $USER; bash" diff --git a/module/sway/module/20-Brightness b/module/sway/module/20-Brightness new file mode 100644 index 0000000..1d86f36 --- /dev/null +++ b/module/sway/module/20-Brightness @@ -0,0 +1,2 @@ +bindsym XF86MonBrightnessDown exec light -U 10 +bindsym XF86MonBrightnessUp exec light -A 10 diff --git a/module/sway/module/20-Keybind b/module/sway/module/20-Keybind deleted file mode 100644 index e02cef1..0000000 --- a/module/sway/module/20-Keybind +++ /dev/null @@ -1,32 +0,0 @@ -# Start a terminal. -bindsym $mod+Escape exec $term -e bash -c "tmux new-session -A -s $USER; bash" - -# Kill focused window. -bindsym $mod+x kill - -# Start your launcher. -bindsym $mod+space exec $menu - -# 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 -# mouse button for dragging. -floating_modifier $mod normal - -# Exit sway (logs you out of your Wayland session). -bindsym $mod+z exec '_twice 1 swaylock -F -c 000000 -k --font "SF Pro Display Medium" --font-size 14' -bindsym $mod+Shift+z exec '_twice 1 swaymsg exit' - -# Show last notification. -bindsym $mod+n exec makoctl restore -bindsym $mod+shift+n exec makoctl dismiss --all - -# Brightness -bindsym XF86MonBrightnessDown exec light -U 10 -bindsym XF86MonBrightnessUp exec light -A 10 - -# Adjust volume. -bindsym XF86AudioRaiseVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ +1%' -bindsym XF86AudioLowerVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ -1%' -bindsym XF86AudioMute exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle' diff --git a/module/sway/module/20-Navigation b/module/sway/module/20-Navigation index 61ac8a9..475345a 100644 --- a/module/sway/module/20-Navigation +++ b/module/sway/module/20-Navigation @@ -10,21 +10,11 @@ bindsym $mod+$left focus left bindsym $mod+$right focus right bindsym $mod+$up focus up -bindsym $mod+Down focus down -bindsym $mod+Left focus left -bindsym $mod+Right focus right -bindsym $mod+Up focus up - # Move the focused window. bindsym $mod+Shift+$down move down bindsym $mod+Shift+$left move left bindsym $mod+Shift+$right move right bindsym $mod+Shift+$up move up -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Right move right -bindsym $mod+Shift+Up move up - # Focus mouse following. focus_follows_mouse no diff --git a/module/sway/module/20-Notification b/module/sway/module/20-Notification new file mode 100644 index 0000000..143b167 --- /dev/null +++ b/module/sway/module/20-Notification @@ -0,0 +1,5 @@ +# Show last notification. +bindsym $mod+n exec makoctl restore + +# Hide all notifications. +bindsym $mod+shift+n exec makoctl dismiss --all diff --git a/module/sway/module/20-Session b/module/sway/module/20-Session new file mode 100644 index 0000000..3ce1b20 --- /dev/null +++ b/module/sway/module/20-Session @@ -0,0 +1,3 @@ +# Exit sway (logs you out of your Wayland session). +bindsym $mod+z exec '_twice 1 swaylock -F -c 000000 -k --font "SF Pro Display Medium" --font-size 14' +bindsym $mod+Shift+z exec '_twice 1 swaymsg exit' diff --git a/module/sway/module/20-Sound b/module/sway/module/20-Sound new file mode 100644 index 0000000..3f3cf21 --- /dev/null +++ b/module/sway/module/20-Sound @@ -0,0 +1,3 @@ +bindsym XF86AudioRaiseVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ +10%' +bindsym XF86AudioLowerVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ -10%' +bindsym XF86AudioMute exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle' diff --git a/module/sway/module/20-Tiling b/module/sway/module/20-Tiling index 4814c62..e3f8ba6 100644 --- a/module/sway/module/20-Tiling +++ b/module/sway/module/20-Tiling @@ -19,3 +19,13 @@ bindsym $mod+f fullscreen # Dim inactive windows. exec $SWAY_SCRIPT_IWT --opacity 0.85 + +# 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 +# mouse button for dragging. +floating_modifier $mod normal + +# Kill focused window. +bindsym $mod+x kill