107 lines
2.8 KiB
Plaintext
107 lines
2.8 KiB
Plaintext
# Default config for sway
|
|
#
|
|
# Copy this to ~/.config/sway/config and edit it to your liking.
|
|
#
|
|
# Read `man 5 sway` for a complete reference.
|
|
|
|
### Variables
|
|
#
|
|
# Logo key. Use Mod1 for Alt.
|
|
set $mod Mod4
|
|
|
|
# Home row direction keys, like vim
|
|
set $left h
|
|
set $down j
|
|
set $up k
|
|
set $right l
|
|
|
|
# Your preferred terminal emulator
|
|
set $term alacritty
|
|
|
|
# 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.
|
|
#set $menu dmenu_path | dmenu | xargs swaymsg exec --
|
|
set $menu j4-dmenu-desktop --dmenu='bemenu -i --tf "#04819E" --nb "#000000" --hb "#000000" --nf "#A65200" --hf "#FF7F00" --fn "pango:DejaVu Sans Mono 12"' --term='alacritty'
|
|
|
|
### Output configuration
|
|
#
|
|
set $bg_picture /home/main/.config/sway/background.jpg
|
|
output * bg $bg_picture fill
|
|
|
|
set $screenlock swaylock -f -i $bg_picture -c 000000
|
|
|
|
### Idle configuration
|
|
exec_always swayidle -w \
|
|
timeout 300 '$screenlock' \
|
|
timeout 280 'swaymsg "output * dpms off"' \
|
|
resume 'swaymsg "output * dpms on"' \
|
|
before-sleep '$screenlock'
|
|
#
|
|
# 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.
|
|
|
|
### Input configuration
|
|
#
|
|
input * {
|
|
xkb_layout "fr"
|
|
xkb_variant "azerty"
|
|
xkb_options ""
|
|
repeat_delay 300
|
|
repeat_rate 60
|
|
}
|
|
|
|
input * xkb_numlock enable
|
|
|
|
### Status Bar:
|
|
#
|
|
# Read `man 5 sway-bar` for more information about this section.
|
|
bar {
|
|
swaybar_command waybar
|
|
}
|
|
|
|
### Style
|
|
#
|
|
|
|
# Window decorations
|
|
for_window [class=".*"] border pixel 0
|
|
gaps inner 4
|
|
gaps outer 4
|
|
default_border pixel 2
|
|
smart_gaps on
|
|
#hide_edge_borders both
|
|
|
|
# Colors
|
|
client.focused #FF7F00 #000000 #04819E #04819E #FF7F00
|
|
client.focused_inactive #A65200 #000000 #206676 #206676 #A65200
|
|
client.unfocused #A65200 #000000 #206676 #206676 #A65200
|
|
client.urgent #206676 #000000 #A65200 #A65200 #206676
|
|
|
|
### Floating windows
|
|
#
|
|
for_window [app_id="pavucontrol"] floating enable
|
|
for_window [title="IV"] floating enable;
|
|
for_window [title="iVy_"] floating enable;
|
|
|
|
### Xwayland notification in windows title
|
|
#
|
|
for_window [shell="xwayland"] title_format "%title [XWayland]"
|
|
|
|
### Sreenshots
|
|
#
|
|
# Take a screenshot with all output and save it into screenshots
|
|
set $screenshot grim -t jpeg ~/Pictures/$(date +%Y-%m-%d_%H-%m-%s).jpg
|
|
|
|
# Take a screenshot of the select window
|
|
set $screenshot_window grim -t jpeg -g "$(swaymsg -t get_tree | jq -r '.. | select(.focused?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"')" ~/Pictures/$(date +%Y-%m-%d_%H-%m-%s).jpg
|
|
|
|
# Take a Screenshot with the region select
|
|
set $screenshot_select grim -t jpeg -g "$(slurp)" ~/Pictures/$(date +%Y-%m-%d_%H-%m-%s).jpg
|
|
|
|
### Other config files
|
|
#
|
|
include /etc/sway/config.d/*
|
|
include /home/main/.config/sway/config.d/*
|
|
|