Misc refactors.
This commit is contained in:
parent
381fc4a21e
commit
20484c96ba
27
sway/config
27
sway/config
|
@ -11,32 +11,23 @@ set $right l
|
||||||
set $term kitty
|
set $term kitty
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Rofi keybinds
|
|
||||||
|
|
||||||
# Your preferred application launcher
|
# Your preferred application launcher
|
||||||
# Note: it's recommended that you pass the final command to sway
|
# Note: it's recommended that you pass the final command to sway
|
||||||
#set $menu rofi -show run | xargs swaymsg exec
|
set $menu rofi -m $(expr $(swaymsg -t get_tree | jq '.nodes | map([recurse(.nodes[]?, .floating_nodes[]?) | .focused] | any) | index(true)') - 1) -show drun -p run -run-command 'swaymsg exec -- {cmd}'
|
||||||
set $menu rofi -m $(expr $(swaymsg -t get_tree | jq '.nodes | map([recurse(.nodes[]?, .floating_nodes[]?) | .focused] | any) | index(true)') - 1) -show drun -run-command 'swaymsg exec -- {cmd}'
|
set $gopass_menu gopass ls --flat \
|
||||||
# gopass prompt
|
|
||||||
bindsym $mod+backslash exec gopass ls --flat \
|
|
||||||
| rofi -dmenu -p pass -i \
|
| rofi -dmenu -p pass -i \
|
||||||
| xargs --no-run-if-empty gopass show -c
|
| xargs --no-run-if-empty gopass show -c
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Idle configuration
|
### Idle configuration
|
||||||
exec swayidle -w \
|
exec swayidle -w \
|
||||||
timeout 300 'swaylock-fancy' \
|
timeout 300 'swaylock-fancy' \
|
||||||
timeout 600 'swaymsg "output * dpms off"' \
|
timeout 600 'swaymsg "output * dpms off"' \
|
||||||
resume 'swaymsg "output * dpms on"' \
|
resume 'swaymsg "output * dpms on"' \
|
||||||
before-sleep 'swaylock-fancy'
|
before-sleep 'swaylock-fancy'
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Support for picture in picture mode. There is currently no support for automatically positioning it in the bottom left corner as xdotool doesn't exist in wayland
|
||||||
set $PIP floating enabled ; sticky enabled ; border pixel 0
|
set $PIP floating enabled ; sticky enabled ; border pixel 0
|
||||||
for_window [class="mpv"] $PIP
|
for_window [class="mpv"] $PIP
|
||||||
for_window [class="pip"] $PIP
|
for_window [class="pip"] $PIP
|
||||||
|
@ -44,18 +35,14 @@ for_window [class="pip"] $PIP
|
||||||
|
|
||||||
|
|
||||||
### Key bindings
|
### Key bindings
|
||||||
#
|
|
||||||
# Basics:
|
|
||||||
#
|
|
||||||
# start a terminal
|
# start a terminal
|
||||||
bindsym $mod+Return exec $term
|
bindsym $mod+Return exec $term
|
||||||
|
|
||||||
# kill focused window
|
# kill focused window
|
||||||
bindsym $mod+q kill
|
bindsym $mod+q kill
|
||||||
|
|
||||||
# start your launcher
|
# start your launcher
|
||||||
bindsym $mod+space exec $menu
|
bindsym $mod+space exec $menu
|
||||||
|
# gopass prompt
|
||||||
|
bindsym $mod+backslash exec $gopass_menu
|
||||||
# Drag floating windows by holding down $mod and left mouse button.
|
# Drag floating 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.
|
# Despite the name, also works for non-floating windows.
|
||||||
|
@ -129,6 +116,8 @@ bindsym print exec file=~/Pictures/Screenshots/Screenshot-$(date '+%Y%m%d%H%M%S'
|
||||||
## && wf-recorder -g "$(slurp)" $file \
|
## && wf-recorder -g "$(slurp)" $file \
|
||||||
## && wl-copy $file \
|
## && wl-copy $file \
|
||||||
## && notify-send -i $file "File copied to clipboard"
|
## && notify-send -i $file "File copied to clipboard"
|
||||||
|
|
||||||
|
################################################################################
|
||||||
# Layout stuff:
|
# Layout stuff:
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -191,6 +180,7 @@ mode "resize" {
|
||||||
# return to default mode
|
# return to default mode
|
||||||
bindsym Return mode "default"
|
bindsym Return mode "default"
|
||||||
bindsym Escape mode "default"
|
bindsym Escape mode "default"
|
||||||
|
bindsym $mod+r mode "default"
|
||||||
}
|
}
|
||||||
bindsym $mod+r mode "resize"
|
bindsym $mod+r mode "resize"
|
||||||
|
|
||||||
|
@ -206,7 +196,6 @@ bindsym XF86MonBrightnessUp exec brightnessctl set +5%
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Status Bar:
|
# Status Bar:
|
||||||
bar {
|
bar {
|
||||||
swaybar_command waybar
|
swaybar_command waybar
|
||||||
|
|
Loading…
Reference in New Issue
Block a user