Update .config/sway/config.d/default
Update .config/sway/config.d/input Update .config/sway/config.d/output
This commit is contained in:
parent
3295a6339a
commit
27e934e4c5
@ -1,49 +1,35 @@
|
|||||||
# Logo key. Use Mod1 for Alt.
|
# Logo key. Use Mod1 for Alt.
|
||||||
set $mod Mod4
|
set $mod Mod4
|
||||||
|
|
||||||
# Home row direction keys, like vim
|
# Add Vim key support
|
||||||
set $left h
|
set $left h
|
||||||
set $down j
|
set $down j
|
||||||
set $up k
|
set $up k
|
||||||
set $right l
|
set $right l
|
||||||
|
|
||||||
# audio control
|
# Set default terminal emulator
|
||||||
set $sink_volume pactl get-sink-volume @DEFAULT_SINK@ | grep '^Volume:' | cut -d / -f 2 | tr -d ' ' | sed 's/%//'
|
set $term alacritty
|
||||||
set $source_volume pactl get-source-volume @DEFAULT_SOURCE@ | grep '^Volume:' | cut -d / -f 2 | tr -d ' ' | sed 's/%//'
|
|
||||||
set $volume_down $(pactl set-sink-volume @DEFAULT_SINK@ -5% && $sink_volume)
|
|
||||||
set $volume_up $(pactl set-sink-volume @DEFAULT_SINK@ +5% && $sink_volume)
|
|
||||||
set $volume_mute $(pactl set-sink-mute @DEFAULT_SINK@ toggle && pactl get-sink-mute @DEFAULT_SINK@ | sed -En "/no/ s/.*/$($sink_volume)/p; /yes/ s/.*/0/p")
|
|
||||||
set $mic_mute $(pactl set-source-mute @DEFAULT_SOURCE@ toggle && pactl get-source-mute @DEFAULT_SOURCE@ | sed -En "/no/ s/.*/$($source_volume)/p; /yes/ s/.*/0/p")
|
|
||||||
|
|
||||||
# Your preferred terminal emulators
|
# Application launcher
|
||||||
set $term-float alacritty
|
set $launcher fuzzel
|
||||||
|
|
||||||
# Your preferred application launcher
|
# Application menu
|
||||||
# Note: pass the final command to swaymsg so that the resulting window can be opened
|
set $menu nwg-drawer
|
||||||
# on the original workspace that the command was run on.
|
|
||||||
set $menu wofi -c ~/.config/wofi/config -I
|
|
||||||
|
|
||||||
set $powermenu ~/.config/waybar/scripts/power-menu.sh
|
# Power Menu
|
||||||
|
set $powermenu ~/.config/sway/scripts/power_menu.sh
|
||||||
|
|
||||||
### Idle configuration
|
### Idle configuration
|
||||||
exec swayidle -w\
|
exec swayidle idlehint 1
|
||||||
timeout 1070 'swaylock -f -C ~/.config/swaylock/config'\
|
exec_always swayidle -w before-sleep "$lock"
|
||||||
timeout 770 'swaymsg "output * power off"' \
|
set $lock swaylock -C ~/.config/swaylock/config
|
||||||
resume 'swaymsg "output * power on"' \
|
|
||||||
before-sleep 'swaylock -C ~/.config/swaylock/config'
|
|
||||||
# This will lock your screen after 300 seconds of inactivity, then turn off
|
|
||||||
# your displays after another 300 seconds, and turn your screens back on when
|
|
||||||
# resumed. It will also lock your screen before your computer goes to sleep.
|
|
||||||
|
|
||||||
## Lock Screen
|
|
||||||
bindsym $mod+f1 exec ~/.config/sway/scripts/lockman.sh
|
|
||||||
|
|
||||||
### Key bindings
|
### Key bindings
|
||||||
#
|
#
|
||||||
# Basics:
|
# Basics:
|
||||||
#
|
#
|
||||||
# Start a floating terminal
|
# Launch the terminal
|
||||||
bindsym $mod+Return exec $term-float
|
bindsym $mod+Return exec $term
|
||||||
|
|
||||||
# Open the power menu
|
# Open the power menu
|
||||||
bindsym $mod+Shift+e exec $powermenu
|
bindsym $mod+Shift+e exec $powermenu
|
||||||
@ -52,80 +38,99 @@ exec swayidle -w\
|
|||||||
bindsym $mod+q kill
|
bindsym $mod+q kill
|
||||||
|
|
||||||
# Start your launcher
|
# Start your launcher
|
||||||
bindsym $mod+d exec $menu
|
bindsym $mod+d exec $launcher
|
||||||
|
|
||||||
|
# Menu
|
||||||
|
bindsym $mod+Shift+d exec $menu
|
||||||
|
|
||||||
|
# Lock screen
|
||||||
|
bindsym $mod+f1 exec $lock
|
||||||
|
|
||||||
# Activities
|
# Activities
|
||||||
bindsym $mod+p exec ~/.config/wofi/windows.py
|
bindsym $mod+p exec ~/.config/sway/scripts/window_switcher.sh
|
||||||
|
|
||||||
# Drag floating windows by holding down $mod and left mouse button.
|
# Move windows by holding down $mod and left mouse button.
|
||||||
# Resize them with right mouse button + $mod.
|
# Resize them with right mouse button + $mod.
|
||||||
# Despite the name, also works for non-floating windows.
|
# Change "normal" to "inverse" to switch left and right
|
||||||
# Change normal to inverse to use left mouse button for resizing and right
|
|
||||||
# mouse button for dragging.
|
|
||||||
floating_modifier $mod normal
|
floating_modifier $mod normal
|
||||||
|
|
||||||
# Reload the configuration file
|
# Reload the configuration file
|
||||||
bindsym $mod+Shift+c reload
|
bindsym $mod+Shift+c reload
|
||||||
|
|
||||||
|
# screen shot
|
||||||
|
bindsym $mod+Shift+p exec grim -g "$(slurp)" - | swappy -f -
|
||||||
|
bindsym $mod+Shift+Ctrl+p exec ~/.config/sway/scripts/screenshot_display.sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Moving around:
|
# Moving around:
|
||||||
#
|
#
|
||||||
# Move your focus around
|
bindsym {
|
||||||
bindsym $mod+$left focus left
|
# Change window focus
|
||||||
bindsym $mod+$down focus down
|
$mod+Left focus left
|
||||||
bindsym $mod+$up focus up
|
$mod+Down focus down
|
||||||
bindsym $mod+$right focus right
|
$mod+Up focus up
|
||||||
# Or use $mod+[up|down|left|right]
|
$mod+Right focus right
|
||||||
bindsym $mod+Left focus left
|
# Vim key support
|
||||||
bindsym $mod+Down focus down
|
$mod+$left focus left
|
||||||
bindsym $mod+Up focus up
|
$mod+$down focus down
|
||||||
bindsym $mod+Right focus right
|
$mod+$up focus up
|
||||||
|
$mod+$right focus right
|
||||||
|
|
||||||
|
# Move the focused window
|
||||||
|
$mod+Shift+Left move left
|
||||||
|
$mod+Shift+Down move down
|
||||||
|
$mod+Shift+Up move up
|
||||||
|
$mod+Shift+Right move right
|
||||||
|
# Vim key support
|
||||||
|
$mod+Shift+$left move left
|
||||||
|
$mod+Shift+$down move down
|
||||||
|
$mod+Shift+$up move up
|
||||||
|
$mod+Shift+$right move right
|
||||||
|
}
|
||||||
|
|
||||||
# Move the focused window with the same, but add Shift
|
|
||||||
bindsym $mod+Shift+$left move left
|
|
||||||
bindsym $mod+Shift+$down move down
|
|
||||||
bindsym $mod+Shift+$up move up
|
|
||||||
bindsym $mod+Shift+$right move right
|
|
||||||
# Ditto, with arrow keys
|
|
||||||
bindsym $mod+Shift+Left move left
|
|
||||||
bindsym $mod+Shift+Down move down
|
|
||||||
bindsym $mod+Shift+Up move up
|
|
||||||
bindsym $mod+Shift+Right move right
|
|
||||||
#
|
#
|
||||||
# Workspaces:
|
# Workspaces:
|
||||||
#
|
#
|
||||||
# Switch to workspace
|
# Workspace bindings are using bindcode instead of bindsym for better Azerty compatibility.
|
||||||
bindsym $mod+1 workspace number 1
|
# https://github.com/EndeavourOS-Community-Editions/sway/pull/81
|
||||||
bindsym $mod+2 workspace number 2
|
# Use wev to find keycodes for setting up other bindings this way.
|
||||||
bindsym $mod+3 workspace number 3
|
|
||||||
bindsym $mod+4 workspace number 4
|
bindcode {
|
||||||
bindsym $mod+5 workspace number 5
|
# Switch to workspace
|
||||||
bindsym $mod+6 workspace number 6
|
$mod+10 workspace number 1
|
||||||
bindsym $mod+7 workspace number 7
|
$mod+11 workspace number 2
|
||||||
bindsym $mod+8 workspace number 8
|
$mod+12 workspace number 3
|
||||||
bindsym $mod+9 workspace number 9
|
$mod+13 workspace number 4
|
||||||
bindsym $mod+0 workspace number 10
|
$mod+14 workspace number 5
|
||||||
# Move focused container to workspace
|
$mod+15 workspace number 6
|
||||||
bindsym $mod+Shift+1 move container to workspace number 1
|
$mod+16 workspace number 7
|
||||||
bindsym $mod+Shift+2 move container to workspace number 2
|
$mod+17 workspace number 8
|
||||||
bindsym $mod+Shift+3 move container to workspace number 3
|
$mod+18 workspace number 9
|
||||||
bindsym $mod+Shift+4 move container to workspace number 4
|
$mod+19 workspace number 10
|
||||||
bindsym $mod+Shift+5 move container to workspace number 5
|
|
||||||
bindsym $mod+Shift+6 move container to workspace number 6
|
# Move focused container to workspace
|
||||||
bindsym $mod+Shift+7 move container to workspace number 7
|
$mod+Shift+10 move container to workspace number 1
|
||||||
bindsym $mod+Shift+8 move container to workspace number 8
|
$mod+Shift+11 move container to workspace number 2
|
||||||
bindsym $mod+Shift+9 move container to workspace number 9
|
$mod+Shift+12 move container to workspace number 3
|
||||||
bindsym $mod+Shift+0 move container to workspace number 10
|
$mod+Shift+13 move container to workspace number 4
|
||||||
|
$mod+Shift+14 move container to workspace number 5
|
||||||
|
$mod+Shift+15 move container to workspace number 6
|
||||||
|
$mod+Shift+16 move container to workspace number 7
|
||||||
|
$mod+Shift+17 move container to workspace number 8
|
||||||
|
$mod+Shift+18 move container to workspace number 9
|
||||||
|
$mod+Shift+19 move container to workspace number 10
|
||||||
|
}
|
||||||
# Note: workspaces can have any name you want, not just numbers.
|
# Note: workspaces can have any name you want, not just numbers.
|
||||||
# We just use 1-10 as the default.
|
# We just use 1-10 as the default.
|
||||||
|
|
||||||
#
|
#
|
||||||
# Layout stuff:
|
# Layout stuff:
|
||||||
#
|
#
|
||||||
# You can "split" the current object of your focus with
|
# Set how the current window will be split
|
||||||
# $mod+b or $mod+v, for horizontal and vertical splits
|
# Split the window vertically
|
||||||
# respectively.
|
|
||||||
bindsym $mod+b splith
|
|
||||||
bindsym $mod+v splitv
|
bindsym $mod+v splitv
|
||||||
|
# Split the window horizontally
|
||||||
|
bindsym $mod+b splith
|
||||||
|
|
||||||
# Switch the current container between different layout styles
|
# Switch the current container between different layout styles
|
||||||
bindsym $mod+s layout stacking
|
bindsym $mod+s layout stacking
|
||||||
@ -135,7 +140,7 @@ exec swayidle -w\
|
|||||||
# Make the current focus fullscreen
|
# Make the current focus fullscreen
|
||||||
bindsym $mod+f fullscreen
|
bindsym $mod+f fullscreen
|
||||||
|
|
||||||
# Toggle the current focus between tiling and floating mode
|
# Toggle between tiling and floating mode
|
||||||
bindsym $mod+Shift+space floating toggle
|
bindsym $mod+Shift+space floating toggle
|
||||||
|
|
||||||
# Swap focus between the tiling area and the floating area
|
# Swap focus between the tiling area and the floating area
|
||||||
@ -143,6 +148,7 @@ exec swayidle -w\
|
|||||||
|
|
||||||
# Move focus to the parent container
|
# Move focus to the parent container
|
||||||
bindsym $mod+a focus parent
|
bindsym $mod+a focus parent
|
||||||
|
|
||||||
#
|
#
|
||||||
# Scratchpad:
|
# Scratchpad:
|
||||||
#
|
#
|
||||||
@ -155,73 +161,74 @@ exec swayidle -w\
|
|||||||
# Show the next scratchpad window or hide the focused scratchpad window.
|
# Show the next scratchpad window or hide the focused scratchpad window.
|
||||||
# If there are multiple scratchpad windows, this command cycles through them.
|
# If there are multiple scratchpad windows, this command cycles through them.
|
||||||
bindsym $mod+minus scratchpad show
|
bindsym $mod+minus scratchpad show
|
||||||
|
|
||||||
#
|
#
|
||||||
# Resizing containers:
|
# Resizing containers:
|
||||||
#
|
#
|
||||||
mode "resize" {
|
bindsym {
|
||||||
# left will shrink the containers width
|
# Resize with arrow keys
|
||||||
# right will grow the containers width
|
$mod+ctrl+Right resize shrink width 10 px
|
||||||
# up will shrink the containers height
|
$mod+ctrl+Up resize grow height 10 px
|
||||||
# down will grow the containers height
|
$mod+ctrl+Down resize shrink height 10 px
|
||||||
bindsym $left resize shrink width 10px
|
$mod+ctrl+Left resize grow width 10 px
|
||||||
bindsym $right resize grow width 10px
|
# Resize with Vim keys
|
||||||
bindsym $up resize shrink height 10px
|
$mod+ctrl+l resize shrink width 10 px
|
||||||
bindsym $down resize grow height 10px
|
$mod+ctrl+k resize grow height 10 px
|
||||||
|
$mod+ctrl+j resize shrink height 10 px
|
||||||
|
$mod+ctrl+h resize grow width 10 px
|
||||||
|
}
|
||||||
|
|
||||||
# Ditto, with arrow keys
|
# Resize floating windows with mouse scroll:
|
||||||
bindsym Left resize shrink width 10px
|
bindsym --whole-window --border {
|
||||||
bindsym Right resize grow width 10px
|
# Resize vertically
|
||||||
bindsym Up resize shrink height 10px
|
$mod+button4 resize shrink height 5 px or 5 ppt
|
||||||
bindsym Down resize grow height 10px
|
$mod+button5 resize grow height 5 px or 5 ppt
|
||||||
|
# Resize horizontally
|
||||||
# Return to default mode
|
$mod+Shift+button4 resize shrink width 5 px or 5 ppt
|
||||||
bindsym Return mode "default"
|
$mod+Shift+button5 resize grow width 5 px or 5 ppt
|
||||||
bindsym Escape mode "default"
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bindsym $mod+r mode "resize"
|
|
||||||
|
|
||||||
# Resize floating windows with mouse scroll:
|
|
||||||
bindsym --whole-window --border $mod+button4 resize shrink height 5 px or 5 ppt
|
|
||||||
bindsym --whole-window --border $mod+button5 resize grow height 5 px or 5 ppt
|
|
||||||
bindsym --whole-window --border $mod+Shift+button4 resize shrink width 5 px or 5 ppt
|
|
||||||
bindsym --whole-window --border $mod+Shift+button5 resize grow width 5 px or 5 ppt
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Volume
|
# Media Keys
|
||||||
#
|
#
|
||||||
# Control volume trough pamixer
|
bindsym {
|
||||||
# bindsym --locked XF86AudioRaiseVolume exec pamixer -ui 2
|
# Volume
|
||||||
# bindsym --locked XF86AudioLowerVolume exec pamixer -ud 2
|
XF86AudioRaiseVolume exec pamixer -ui 2
|
||||||
# bindsym --locked XF86AudioMute exec pamixer -t
|
XF86AudioLowerVolume exec pamixer -ud 2
|
||||||
|
XF86AudioMute exec pamixer --toggle-mute
|
||||||
# Control volume directly trough pactl
|
|
||||||
bindsym --locked XF86AudioRaiseVolume exec $volume_up
|
# Player
|
||||||
bindsym --locked XF86AudioLowerVolume exec $volume_down
|
XF86AudioPlay exec playerctl play-pause
|
||||||
bindsym --locked XF86AudioMute exec $volume_mute
|
XF86AudioNext exec playerctl next
|
||||||
#
|
XF86AudioPrev exec playerctl previous
|
||||||
# Player
|
|
||||||
#
|
# Backlight
|
||||||
bindsym XF86AudioPlay exec playerctl play
|
XF86MonBrightnessUp exec brightnessctl -c backlight set +5%
|
||||||
bindsym XF86AudioPause exec playerctl pause
|
XF86MonBrightnessDown exec brightnessctl -c backlight set 5%-
|
||||||
bindsym XF86AudioNext exec playerctl next
|
}
|
||||||
bindsym XF86AudioPrev exec playerctl previous
|
|
||||||
#
|
|
||||||
# Backlight
|
|
||||||
#
|
|
||||||
bindsym XF86MonBrightnessUp exec brightnessctl -c backlight set +5%
|
|
||||||
bindsym XF86MonBrightnessDown exec brightnessctl -c backlight set 5%-
|
|
||||||
#
|
#
|
||||||
# App shortcuts
|
# App shortcuts
|
||||||
#
|
#
|
||||||
|
# Launch the file explorer
|
||||||
bindsym $mod+n exec thunar
|
bindsym $mod+n exec thunar
|
||||||
bindsym $mod+o exec firefox
|
|
||||||
|
# Launch the browser
|
||||||
|
bindsym $mod+o exec zen-alpha
|
||||||
|
|
||||||
|
# Launch the clipboard manager
|
||||||
|
bindsym $mod+Ctrl+v exec cliphist list | fuzzel -d -w 90 -l 30 -p "Select an entry to copy it to your clipboard buffer:"| cliphist decode | wl-copy
|
||||||
|
# Delete an entry from the clipboard manager
|
||||||
|
bindsym $mod+Ctrl+x exec cliphist list | fuzzel -d -w 90 -l 30 -t cc9393ff -S cc9393ff -p "Select an entry to delete it from cliphist:"| cliphist delete
|
||||||
|
# Note: you can clear all cliphist entries by running `cliphist wipe`
|
||||||
|
|
||||||
#
|
#
|
||||||
# Screenshots
|
# Screenshots
|
||||||
#
|
#
|
||||||
bindsym print exec /usr/share/sway/scripts/grimshot --notify save output
|
# Snip a selection and pipe to swappy
|
||||||
bindsym Shift+print exec ~/.config/sway/scripts/screenshot.sh
|
bindsym print exec grim -g "$(slurp)" - | swappy -f -
|
||||||
#
|
# Screenshot a window and pipe to swappy
|
||||||
# Keybindings List
|
bindsym Ctrl+Print exec ~/.config/sway/scripts/screenshot_window.sh
|
||||||
#
|
# Screenshot the current display and pipe to swappy
|
||||||
bindsym $mod+t exec xed ~/.config/sway/cheatsheet
|
bindsym Shift+Print exec ~/.config/sway/scripts/screenshot_display.sh
|
||||||
|
|
||||||
|
@ -1,24 +1,30 @@
|
|||||||
### Input configuration
|
### Input configuration
|
||||||
#
|
#
|
||||||
# Example configuration:
|
# Read `man 5 sway-input` for more information about this section.
|
||||||
# You can get the names of your inputs by running: swaymsg -t get_inputs
|
|
||||||
# Put your touchpad's ID to replace "Touchpad-ID" (keep the quotation marks)
|
|
||||||
|
|
||||||
|
# Touchpad configuration
|
||||||
input type:touchpad {
|
input type:touchpad {
|
||||||
dwt enabled
|
dwt enabled
|
||||||
tap enabled
|
tap enabled
|
||||||
natural_scroll enabled
|
natural_scroll enabled
|
||||||
}
|
}
|
||||||
|
|
||||||
# Read `man 5 sway-input` for more information about this section.
|
# Enable numlock by default
|
||||||
#
|
input type:keyboard xkb_numlock enabled
|
||||||
input type:keyboard {
|
|
||||||
xkb_layout "us"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
# Set keyboard layout and variant based on current system settings
|
||||||
exec_always {
|
exec_always {
|
||||||
'swaymsg input type:keyboard xkb_layout "$(localectl status | grep "X11 Layout" | sed -e "s/^.*X11 Layout://")"'
|
'swaymsg input type:keyboard xkb_layout "$(localectl status | grep "X11 Layout" | sed -e "s/^.*X11 Layout://")"'
|
||||||
'swaymsg input type:keyboard xkb_variant "$(localectl status | grep "X11 Variant" | sed -e "s/^.*X11 Variant://")"'
|
'swaymsg input type:keyboard xkb_variant "$(localectl status | grep "X11 Variant" | sed -e "s/^.*X11 Variant://")"'
|
||||||
}
|
}
|
||||||
|
|
||||||
#output DP-2 transform 270
|
# # Toggle between keyboard layouts. This example has the "us" and "gb"
|
||||||
|
# # keyboard layouts, and uses Alt+Shift to toggle between them.
|
||||||
|
# input "type:keyboard" {
|
||||||
|
# xkb_layout "us,gb"
|
||||||
|
# xkb_options "grp:alt_shift_toggle"
|
||||||
|
# }
|
||||||
|
# # Assign the same binding to "pkill -RTMIN+1 waybar" to send signal to
|
||||||
|
# # the Waybar keyboard module (so the module shows the updated layout).
|
||||||
|
# # This example uses Alt + left Shift.
|
||||||
|
# bindsym Alt+Shift_L exec "pkill -RTMIN+1 waybar"
|
||||||
|
@ -6,9 +6,12 @@
|
|||||||
#
|
#
|
||||||
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
||||||
#
|
#
|
||||||
|
# You can also bind workspaces 1,2,3 to specific outputs
|
||||||
|
#
|
||||||
|
# workspace 1 output eDP-2
|
||||||
|
# workspace 2 output HDMI-A-1
|
||||||
|
# workspace 3 output DP-1
|
||||||
|
#
|
||||||
# Wacom Tablet - Example
|
# Wacom Tablet - Example
|
||||||
# input "1386:884:Wacom_Intuos_S_Pad" map_to_output HDMI-A-1
|
# input "1386:884:Wacom_Intuos_S_Pad" map_to_output HDMI-A-1
|
||||||
# input "1386:884:Wacom_Intuos_S_Pen" map_to_output HDMI-A-1
|
# input "1386:884:Wacom_Intuos_S_Pen" map_to_output HDMI-A-1
|
||||||
|
|
||||||
|
|
||||||
output HDMI-A-1 pos 0 0 res 3440x1440
|
|
Loading…
Reference in New Issue
Block a user