337 lines
9.6 KiB
Text
337 lines
9.6 KiB
Text
# {{@@ header() @@}}
|
|
# LEL
|
|
# _____ ____ _ _ _
|
|
# / __\ \ /\ / / _` | | | |
|
|
# \__ \\ V V / (_| | |_| |
|
|
# |___/ \_/\_/ \__,_|\__, |
|
|
# |___/
|
|
|
|
# Variables {{{
|
|
#
|
|
# Logo key.
|
|
set $mod Mod4
|
|
# Home row direction keys, like vim
|
|
set $left {{@@ key.left @@}}
|
|
set $down {{@@ key.down @@}}
|
|
set $up {{@@ key.up @@}}
|
|
set $right {{@@ key.right @@}}
|
|
set $menu e
|
|
set $suspend o
|
|
set $kill k
|
|
set $mus r
|
|
|
|
set $term terminal
|
|
# set $menu wofi --show drun --allow-images --insensitive --term $term -p'Iniciar: '
|
|
# set $menu bmenu run $term
|
|
font {{@@ font.interface @@}} 14px
|
|
|
|
# }}}
|
|
# Output configuration {{{
|
|
#
|
|
# output * bg '#252525' solid_color
|
|
output * bg ~/.local/share/wallpapers/assembly.png fit
|
|
# Output HDMI-A-1 resolution 1280x720
|
|
|
|
# Disable laptop screen if closed, --reload is important
|
|
set $laptop eDP-1
|
|
bindswitch --reload lid:on output $laptop disable
|
|
bindswitch --reload lid:off output $laptop enable
|
|
|
|
# output $laptop disable
|
|
# bindsym $mod+o output eDP-1 toggle
|
|
# exec_always swaymsg -t get_outputs | grep HDMI || swaymsg 'output eDP-1 enable'
|
|
|
|
# Backlight settings for laptops
|
|
exec doas light -N 1
|
|
bindsym XF86MonBrightnessUp exec doas light -A 5
|
|
bindsym XF86MonBrightnessDown exec doas light -U 5
|
|
|
|
# }}}
|
|
# Input configuration {{{
|
|
|
|
#hide the mouse after 10 seconds
|
|
seat * hide_cursor 10000
|
|
seat * xcursor_theme capitaine-cursors
|
|
|
|
input "type:touchpad" {
|
|
#disable while typing
|
|
dwt enabled
|
|
natural_scroll enabled
|
|
tap enabled
|
|
}
|
|
|
|
input * {
|
|
xkb_layout br(dvorak)
|
|
xkb_numlock enabled
|
|
}
|
|
|
|
# }}}
|
|
# Key bindings: {{{
|
|
# Basic {{{
|
|
|
|
# Start a terminal
|
|
bindsym $mod+Return exec $term
|
|
|
|
#start web browser
|
|
bindsym $mod+b exec qutebrowser
|
|
|
|
#start file manager
|
|
bindsym $mod+m exec nemo
|
|
|
|
bindsym $mod+i exec emoji
|
|
|
|
# Kill focused window
|
|
bindsym $mod+$kill kill
|
|
|
|
# Start your launcher
|
|
bindsym $mod+$menu exec launcher
|
|
|
|
# Fill passwords
|
|
bindsym Control+$mod+p exec wpass
|
|
|
|
# mouse button for dragging.
|
|
floating_modifier $mod normal
|
|
|
|
# Reload the configuration file
|
|
bindsym $mod+Shift+c reload; exec pkill kanshi && kanshi
|
|
|
|
# Lock Sway
|
|
bindsym $mod+Control+$suspend exec sudo systemctl suspend
|
|
|
|
# Exit sway (logs you out of your Wayland session)
|
|
bindsym $mod+Shift+e exec swaynag -t warning -m 'Do you really want to exit sway?' -b 'Yes, exit sway' 'swaymsg exit'
|
|
|
|
bindsym Control+Shift+BackSpace exit
|
|
|
|
# }}}
|
|
# Moving around: {{{
|
|
|
|
# Move your focus around
|
|
bindsym $mod+$left focus left
|
|
bindsym $mod+$down focus down
|
|
bindsym $mod+$up focus up
|
|
bindsym $mod+$right focus right
|
|
bindsym $mod+Left focus left
|
|
bindsym $mod+Down focus down
|
|
bindsym $mod+Up focus up
|
|
bindsym $mod+Right focus 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
|
|
|
|
# Resizing containers:
|
|
bindsym $mod+Control+$left resize shrink width 10px
|
|
bindsym $mod+Control+$down resize grow height 10px
|
|
bindsym $mod+Control+$up resize shrink height 10px
|
|
bindsym $mod+Control+$right resize grow width 10px
|
|
|
|
#}}}
|
|
# Workspaces: {{{
|
|
|
|
bindsym $mod+j workspace next
|
|
bindsym $mod+q workspace prev
|
|
|
|
# Switch to workspace
|
|
# Move focused container to workspace
|
|
{%@@ for i in range(10) @@%}
|
|
bindsym $mod+{{@@ i @@}} workspace {{@@ i @@}}
|
|
bindsym $mod+Shift+{{@@ i @@}} move container to workspace {{@@ i @@}}
|
|
{%@@ endfor @@%}
|
|
|
|
# Assign programs to their workspace
|
|
assign [app_id=qutebrowser] workspace 2
|
|
assign [class=qutebrowser] workspace 2
|
|
assign [class=Steam] workspace 9
|
|
|
|
assign [app_id=telegram-?desktop] workspace 10
|
|
assign [class=TelegramDesktop] workspace 10
|
|
|
|
assign [class=discord] workspace 10
|
|
|
|
# }}}
|
|
# Layout stuff: {{{
|
|
#
|
|
# Splits
|
|
# bindsym $mod+b splith
|
|
bindsym $mod+v splitv
|
|
|
|
# Layout styles
|
|
bindsym $mod+w layout tabbed
|
|
bindsym $mod+o layout toggle split
|
|
|
|
# Make the current focus fullscreen
|
|
bindsym $mod+f fullscreen
|
|
|
|
# Floating
|
|
bindsym $mod+Shift+space floating toggle
|
|
bindsym $mod+space focus mode_toggle
|
|
|
|
# Move focus to the parent container
|
|
bindsym $mod+a focus parent
|
|
bindsym $mod+z focus child
|
|
|
|
# }}}
|
|
# Screenshots: {{{
|
|
#
|
|
|
|
# Screens to file
|
|
bindsym Print exec grim $(xdg-user-dir PICTURES || Imagens)/$(date +'%Y-%m-%d-%H%M%S_grim.png')
|
|
|
|
# Screen area to file
|
|
bindsym Shift+Print exec grim -g "$(slurp)" $(xdg-user-dir PICTURES || Imagens)/$(date +'%Y-%m-%d-%H%M%S_grim-slurp.png')
|
|
|
|
# Screen area to clipboard
|
|
bindsym Control+Shift+Print exec grim -g "$(slurp)" - | wl-copy
|
|
|
|
# Focused monitor to clipboard
|
|
bindsym Control+Print exec grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - | wl-copy
|
|
|
|
# Screen recorder
|
|
bindsym Control+Alt+Shift+r exec wf-recorder -a
|
|
|
|
# Color picker
|
|
bindsym $mod+c exec color-picker
|
|
|
|
# }}}
|
|
# Audio: {{{
|
|
#
|
|
bindsym $mod+p exec pulse-sink
|
|
for_window [app_id="pavucontrol"] floating enable
|
|
|
|
# Volume controll
|
|
{%@@ if exists_in_path ( 'pavolume' ) @@%}
|
|
bindsym --locked XF86AudioRaiseVolume exec pavolume volup 5%
|
|
bindsym --locked XF86AudioLowerVolume exec pavolume voldown 5%
|
|
bindsym --locked XF86AudioMute exec pavolume mutetoggle
|
|
{%@@ else @@%}
|
|
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
|
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
|
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
|
{%@@ endif @@%}
|
|
|
|
# Media player controls
|
|
{%@@ if exists_in_path ( 'playerctl' ) @@%}
|
|
# playerctl for notifications
|
|
bindsym --locked XF86AudioPlay exec playerctl -p mpd play-pause
|
|
bindsym --locked XF86AudioNext exec playerctl -p mpd next
|
|
bindsym --locked XF86AudioPrev exec playerctl -p mpd previous
|
|
{%@@ else @@%}
|
|
bindsym --locked XF86AudioPlay exec mpc toggle
|
|
bindsym --locked XF86AudioNext exec mpc next
|
|
bindsym --locked XF86AudioPrev exec mpc prev
|
|
{%@@ endif @@%}
|
|
bindsym $mod+Shift+$mus exec musmenu delete
|
|
bindsym $mod+Control+$mus exec musmenu search
|
|
bindsym $mod+Control+Shift+$mus exec dzadd
|
|
|
|
# }}}
|
|
# Special Keys{{{
|
|
|
|
bindsym XF86Calculator exec $term ipython
|
|
bindsym XF86Mail exec $term neomutt
|
|
bindsym XF86Explorer exec thunar
|
|
bindsym XF86HomePage exec xdg-open http://start.duckduckgo.com
|
|
|
|
mode Passthrough {
|
|
bindsym $mod+escape mode default
|
|
}
|
|
bindsym $mod+escape mode Passthrough
|
|
|
|
# }}}
|
|
# }}}
|
|
# Visual: {{{
|
|
#
|
|
set $accent {{@@ color.accent @@}}
|
|
set $fg_color {{@@ color.txt @@}}
|
|
set $bg_color {{@@ color.bg_dark @@}}
|
|
set $alert #000000
|
|
|
|
# border background text indicator child_border
|
|
client.focused $accent $accent $fg_color $accent $accent
|
|
client.focused_inactive $bg_color $bg_color $fg_color $bg_color $bg_color
|
|
client.unfocused $bg_color $bg_color $fg_color $bg_color $bg_color
|
|
client.urgent $alert $alert $fg_color $alert $alert
|
|
|
|
{%@@ if bar == "waybar" @@%}
|
|
bar swaybar_command waybar
|
|
{%@@ else @@%}
|
|
bar {
|
|
position {{@@ bar_pos @@}}
|
|
status_command i3blocks
|
|
|
|
gaps 5px
|
|
icon_theme Papirus
|
|
|
|
font {{@@ font.interface @@}} 14px
|
|
|
|
colors {
|
|
statusline $fg_color
|
|
background $bg_color
|
|
focused_workspace $accent $bg_color $fg_color
|
|
}
|
|
}
|
|
{%@@ endif @@%}
|
|
|
|
default_border pixel 2px
|
|
default_floating_border normal 2px
|
|
gaps inner 5px
|
|
|
|
smart_gaps on
|
|
smart_borders on
|
|
|
|
# for_window [app_id=mpv] floating enable
|
|
for_window [app_id=weather] floating enable
|
|
# for_window [app_id=weather] resize set 635px 700px
|
|
for_window [app_id=weather] resize set 1280px 750px
|
|
|
|
# set theme
|
|
set $gnome-schema org.gnome.desktop.interface
|
|
exec_always {
|
|
kvantummanager --set MateriaDark
|
|
gsettings set $gnome-schema gtk-theme 'materia-custom-accent'
|
|
gsettings set $gnome-schema icon-theme 'Papirus-Dark'
|
|
gsettings set $gnome-schema cursor-theme 'capitaine-cursors'
|
|
}
|
|
|
|
# }}}
|
|
# Daemons {{{
|
|
#
|
|
|
|
exec 'dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus'
|
|
# Autostart a terminal
|
|
exec $term
|
|
#Notification Daemon
|
|
exec mako
|
|
# Block device Mounter to /run/media/<username>
|
|
exec udiskie
|
|
# Screen manager
|
|
exec kanshi
|
|
# gesture daemon
|
|
exec fusuma
|
|
# exec sh -c 'pkill fusuma; fusuma'
|
|
# Blue light filter
|
|
exec redshift
|
|
# exec_always sh -c 'pkill redshift;redshift'
|
|
# kde connect
|
|
exec /usr/lib/kdeconnectd
|
|
exec kdeconnect-indicator
|
|
# Telegram
|
|
exec telegram-desktop-bin || telegram-desktop
|
|
# Music Player Daemon
|
|
exec sh -c 'pgrep mpd || mpd'
|
|
exec sh -c 'pgrep mpDris2|| mpDris2'
|
|
# lock screen after a period of inactivity execp for fullscreen
|
|
for_window [class=.*] inhibit_idle fullscreen
|
|
exec swayidle -w \
|
|
before-sleep 'swaylock -f' \
|
|
lock swaylock \
|
|
timeout 1800 'swaylock -f' \
|
|
# timeout 1800 'swaymsg "output * dpms off"' \
|
|
# resume 'swaymsg "output * dpms on;reload"' \
|
|
|
|
include /etc/sway/config.d/
|
|
#}}}
|
|
# vim:filetype=i3config:foldmethod=marker
|