332 lines
8.8 KiB
Plaintext
332 lines
8.8 KiB
Plaintext
set
|
|
{
|
|
$mod Mod4
|
|
$left h
|
|
$down j
|
|
$up k
|
|
$right l
|
|
$lock exec ~/utils/bin/sway-locker -f
|
|
$lockt exec ~/utils/bin/sway-locker -t
|
|
$term qterminal #alacritty
|
|
$menu rofi -show drun
|
|
$bg "~/.cache/apod/2020-April-29-The-Ion-Tail-of-New-Comet-SWAN.jpg fit #000000"
|
|
$gtk_theme "Mint-Y-Dark-Blue"
|
|
$icon_theme "Flat-Remix-Blue-Dark"
|
|
}
|
|
|
|
default_border pixel 2
|
|
default_floating_border pixel 2
|
|
|
|
gaps outer 8
|
|
gaps inner 5
|
|
|
|
font pango:Cantarell 14px
|
|
|
|
exec_always --no-startup-id
|
|
{
|
|
pkill fusuma
|
|
pkill swayidle
|
|
dbus-update-activation-environment DISPLAY XAUTHORITY
|
|
eval $(/usr/bin/gnome-keyring-daemon --start --components=ssh)
|
|
~/.config/waybar/waybar.sh
|
|
mako
|
|
fusuma -d -c ~/.config/fusuma/config-wl.yml
|
|
swaymsg output eDP-1 bg $bg
|
|
gsettings set org.gnome.desktop.interface gtk-theme '$gtk_theme'
|
|
gsettings set org.gnome.desktop.interface icon-theme '$icon_theme'
|
|
swayidle -w timeout 3600 "$lock" \
|
|
timeout 3610 'swaymsg "output * dpms off"' \
|
|
resume 'swaymsg "output * dpms on"' \
|
|
before-sleep "$lockt"
|
|
}
|
|
bindsym ctrl+alt+l exec --no-startup-id $lock
|
|
bindsym $mod+grave exec --no-startup-id $lock
|
|
bindswitch lid:on exec --no-startup-id $lock
|
|
|
|
#--- Window Decorations
|
|
set
|
|
{
|
|
$nofocus #202020
|
|
$focus #202020
|
|
$titletxt #FFFFE8
|
|
$titlepad 10 center #000000
|
|
$gaps_change 20
|
|
}
|
|
#--- Notifications
|
|
set
|
|
{
|
|
$n_anchor top-center
|
|
$n_layer overlay
|
|
$n_dim 600
|
|
$n_margin 20
|
|
$n_padding 10
|
|
$n_border 3
|
|
$n_bg #202020
|
|
$n_fg #FFFFE8
|
|
}
|
|
|
|
bindsym
|
|
{
|
|
$mod+Shift+e exec swaynag -t error -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
|
|
$mod+Return exec $term
|
|
$mod+Shift+q kill
|
|
alt+F1 exec $menu
|
|
}
|
|
|
|
input *
|
|
{
|
|
xkb_layout gb,sk
|
|
xkb_options grp:win_space_toggle,compose:menu
|
|
xkb_variant ",qwerty"
|
|
repeat_delay 280
|
|
repeat_rate 30
|
|
|
|
tap enabled
|
|
natural_scroll enabled
|
|
scroll_method two_finger
|
|
tap_button_map lrm
|
|
}
|
|
|
|
focus_follows_mouse yes
|
|
focus_wrapping false
|
|
popup_during_fullscreen leave_fullscreen
|
|
|
|
|
|
#--- Floating Windows ------------------------------------------------------
|
|
for_window [class="pop-up"] floating enable; border normal $border
|
|
for_window [window_role="pop-up"] floating enable; border normal $border
|
|
for_window [window_role="task_dialog"] floating enable; border normal $border
|
|
for_window [class="MEGAsync"] floating enable; border pixel 0
|
|
for_window [title=".*JetBrains.*"] floating enable; border pixel 1
|
|
for_window [class="matplotlib"] floating enable; border normal $border
|
|
for_window [class="dosbox"] floating enable; border normal $border
|
|
for_window [title="ImageMagick.*"]
|
|
{
|
|
floating enable;
|
|
border normal $border
|
|
title_format " %title"
|
|
}
|
|
for_window [app_id="nm-connection-editor"]
|
|
{
|
|
floating enable
|
|
resize set width 882px
|
|
resize set height 600px
|
|
}
|
|
for_window [app_id="pavucontrol"]
|
|
{
|
|
floating enable
|
|
resize set width 882px
|
|
resize set height 600px
|
|
}
|
|
|
|
#--- Applications with CSD -------------------------------------------------
|
|
for_window [app_id="glade"] border pixel 2
|
|
for_window [app_id="baobab"] border pixel 2
|
|
for_window [title=".*eston.*"] border pixel 0
|
|
for_window [app_id="wdisplays"] border pixel 0
|
|
for_window [app_id="gnome-.*"] border pixel 1
|
|
for_window [app_id="qterminal"] border pixel 2
|
|
for_window [app_id="xterm"] border pixel 2
|
|
for_window [title=".*Brave.*"] border pixel 1 inhibit_idle fullscreen
|
|
for_window [title=".*Firefox.*"] border pixel 2 inhibit_idle fullscreen
|
|
for_window [class="vlc"] border pixel 2 inhibit_idle fullscreen
|
|
for_window [app_id="vlc"] border pixel 2 inhibit_idle fullscreen
|
|
for_window [app_id="nautilus"] border pixel 1
|
|
|
|
#--- Xtk Applications ------------------------------------------------------
|
|
for_window [title="xclock"] floating enable
|
|
for_window [title="Calculator"] floating enable
|
|
|
|
assign [app_id="telegram"] C
|
|
assign [title="Ferdi"] C
|
|
assign [class="vlc"] M
|
|
|
|
bindsym
|
|
{
|
|
print exec grim $(xdg-user-dir PICTURES)/grim-$(date +'%Y-%m-%dT%H-%M-%S').png
|
|
Shift+print exec grim -g "$(slurp)" - | wl-copy
|
|
$mod+c exec gnome-calculator
|
|
$mod+n exec nemo
|
|
$mod+m exec QT_QPA_PLATFORMTHEME=wayland vlc
|
|
$mod+Shift+b exec brave-browser-beta --incognito
|
|
$mod+Shift+w exec ~/Downloads/firefox-dev/firefox --private-window
|
|
$mod+Shift+g exec firefox --private-window
|
|
$mod+Shift+v exec ferdi
|
|
$mod+Shift+a exec chromium-freeworld --incognito
|
|
$mod+Escape exec systemctl suspend -i
|
|
$mod+Shift+o exec xterm -e "bash -c 'sudo cpupower frequency-set -g powersave;figlet powersave;sleep 2'"
|
|
$mod+Shift+p exec xterm -e "bash -c 'sudo cpupower frequency-set -g performance;figlet performance;sleep 2'"
|
|
$mod+ctrl+Shift+s exec xterm -e "bash -c 'sudo dell-bios-fan-control 0;sudo i8kfan 0 0'"
|
|
$mod+ctrl+Shift+d exec xterm -e "bash -c 'sudo dell-bios-fan-control 0;sudo i8kfan 0 1'"
|
|
$mod+ctrl+Shift+f exec xterm -e "bash -c 'sudo dell-bios-fan-control 0;sudo i8kfan 0 2'"
|
|
$mod+ctrl+Shift+b exec xterm -e "bash -c 'sudo dell-bios-fan-control 1'"
|
|
}
|
|
|
|
# Notifications
|
|
bindsym Control+Space exec makoctl dismiss
|
|
bindsym Control+Shift+Space exec makoctl dismiss --all
|
|
|
|
#
|
|
# Moving around:
|
|
#
|
|
bindsym
|
|
{
|
|
# Move your focus around
|
|
$mod+$left focus left
|
|
$mod+$down focus down
|
|
$mod+$up focus up
|
|
$mod+$right focus right
|
|
# Or use $mod+[up|down|left|right]
|
|
$mod+Left focus left
|
|
$mod+Down focus down
|
|
$mod+Up focus up
|
|
$mod+Right focus right
|
|
|
|
# Move the focused window with the same, but add Shift
|
|
$mod+Shift+$left move left
|
|
$mod+Shift+$down move down
|
|
$mod+Shift+$up move up
|
|
$mod+Shift+$right move right
|
|
# Ditto, with arrow keys
|
|
$mod+Shift+Left move left
|
|
$mod+Shift+Down move down
|
|
$mod+Shift+Up move up
|
|
$mod+Shift+Right move right
|
|
|
|
$mod+Shift+c move position center
|
|
}
|
|
|
|
#
|
|
# Workspaces:
|
|
#
|
|
# Switch to workspace
|
|
bindsym --to-code
|
|
{
|
|
$mod+Shift+comma workspace prev_on_output
|
|
$mod+Shift+period workspace next_on_output
|
|
$mod+Shift+tab workspace back_and_forth
|
|
$mod+1 workspace 1
|
|
$mod+2 workspace 2
|
|
$mod+3 workspace 3
|
|
$mod+4 workspace 4
|
|
$mod+5 workspace 5
|
|
$mod+6 workspace 6
|
|
$mod+7 workspace 7
|
|
$mod+8 workspace 8
|
|
$mod+9 workspace 9
|
|
$mod+0 workspace 10
|
|
$mod+F2 workspace C
|
|
$mod+F3 workspace M
|
|
}
|
|
# Move focused container to workspace
|
|
bindsym --to-code
|
|
{
|
|
$mod+Shift+1 move container to workspace 1
|
|
$mod+Shift+2 move container to workspace 2
|
|
$mod+Shift+3 move container to workspace 3
|
|
$mod+Shift+4 move container to workspace 4
|
|
$mod+Shift+5 move container to workspace 5
|
|
$mod+Shift+6 move container to workspace 6
|
|
$mod+Shift+7 move container to workspace 7
|
|
$mod+Shift+8 move container to workspace 8
|
|
$mod+Shift+9 move container to workspace 9
|
|
$mod+Shift+0 move container to workspace 10
|
|
$mod+Shift+F2 move container to workspace C
|
|
$mod+Shift+F3 move container to workspace M
|
|
# Note: workspaces can have any name you want, not just numbers.
|
|
# We just use 1-10 as the default.
|
|
}
|
|
|
|
#
|
|
# Layout stuff:
|
|
#
|
|
bindsym
|
|
{
|
|
# You can "split" the current object of your focus with
|
|
# $mod+b or $mod+v, for horizontal and vertical splits
|
|
# respectively.
|
|
$mod+b splith
|
|
$mod+v splitv
|
|
|
|
# Switch the current container between different layout styles
|
|
$mod+s layout stacking
|
|
$mod+w layout tabbed
|
|
$mod+e layout toggle split
|
|
|
|
# Make the current focus fullscreen
|
|
$mod+f fullscreen
|
|
|
|
# Toggle the current focus between tiling and floating mode
|
|
#bindsym $mod+Shift+space floating toggle
|
|
$mod+Shift+d floating toggle
|
|
|
|
# Swap focus between the tiling area and the floating area
|
|
#bindsym $mod+space focus mode_toggle
|
|
$mod+d focus mode_toggle
|
|
|
|
# Move focus to the parent container
|
|
$mod+a focus parent
|
|
}
|
|
|
|
#
|
|
# Scratchpad:
|
|
#
|
|
# Sway has a "scratchpad", which is a bag of holding for windows.
|
|
# You can send windows there and get them back later.
|
|
|
|
bindsym --to-code
|
|
{
|
|
# Move the currently focused window to the scratchpad
|
|
$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.
|
|
$mod+minus scratchpad show
|
|
}
|
|
|
|
#
|
|
# Resizing containers:
|
|
#
|
|
mode "resize"
|
|
{
|
|
# left will shrink the containers width
|
|
# right will grow the containers width
|
|
# up will shrink the containers height
|
|
# down will grow the containers height
|
|
bindsym
|
|
{
|
|
$left resize shrink width 10px
|
|
$down resize grow height 10px
|
|
$up resize shrink height 10px
|
|
$right resize grow width 10px
|
|
|
|
# Ditto, with arrow keys
|
|
Left resize shrink width 10px
|
|
Down resize grow height 10px
|
|
Up resize shrink height 10px
|
|
Right resize grow width 10px
|
|
|
|
# Return to default mode
|
|
Return mode "default"
|
|
Escape mode "default"
|
|
$mod+r mode "default"
|
|
}
|
|
}
|
|
bindsym $mod+r mode "resize"
|
|
bindsym $mod+Shift+r reload
|
|
|
|
#
|
|
# media keys
|
|
#
|
|
bindsym
|
|
{
|
|
XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
|
XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
|
XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
|
XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
|
XF86MonBrightnessUp exec light -A 5
|
|
XF86MonBrightnessDown exec light -U 5
|
|
}
|
|
|
|
include /etc/sway/config.d/*
|