set $mod Mod4
set $term kitty
### Output configuration
#
# Example configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
output * {
bg ~/.jrvieira/bg.png fill #191919
}
### Idle configuration
#
# Example configuration:
#
# exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
# before-sleep 'swaylock -f -c 000000'
#
# 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
#
# Example configuration:
#
# input "2:14:SynPS/2_Synaptics_TouchPad" {
# dwt enabled
# tap enabled
# natural_scroll enabled
# middle_emulation enabled
# }
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
input * {
xkb_layout "us"
repeat_delay 260
repeat_rate 90
natural_scroll enabled
}
# BASICS
# Start a terminal
bindsym $mod+return exec $term
# Kill focused window
bindsym $mod+shift+q kill
# Start your launcher
bindsym $mod+d exec tofi-run | xargs swaymsg exec --
bindsym $mod+shift+d exec tofi-drun | xargs swaymsg exec --
bindsym $mod+tab exec swaymsg -t get_tree | jq -r '.. | select(type == "object" and (.type == "con" or .type == "floating_con") and .name != null) | "\(.id) \(.name)"' | tofi | awk '{print $1}' | xargs -I {} swaymsg [con_id="{}"] focus
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+shift+r reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+shift+e exec bash -c 'echo -e "no\nyes" | tofi --prompt-text "exit sway? " | grep -qi yes && swaymsg exit'
# WORKSPACE, FOCUS AND LAYOUT
# Scratchpad
bindsym $mod+shift+z move scratchpad
bindsym $mod+z scratchpad show
# sticky
bindsym $mod+shift+s sticky toggle
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
# Move focused container to workspace
bindsym $mod+shift+1 move container to workspace number 1 , workspace number 1
bindsym $mod+shift+2 move container to workspace number 2 , workspace number 2
bindsym $mod+shift+3 move container to workspace number 3 , workspace number 3
bindsym $mod+shift+4 move container to workspace number 4 , workspace number 4
bindsym $mod+shift+5 move container to workspace number 5 , workspace number 5
bindsym $mod+shift+6 move container to workspace number 6 , workspace number 6
bindsym $mod+shift+7 move container to workspace number 7 , workspace number 7
bindsym $mod+shift+8 move container to workspace number 8 , workspace number 8
bindsym $mod+shift+9 move container to workspace number 9 , workspace number 9
bindsym $mod+shift+0 move container to workspace number 10 , workspace number 10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
# switch to workspace
bindsym $mod+n workspace next_on_output
bindsym $mod+p workspace prev_on_output
# move focused container to workspace
bindsym $mod+shift+n move container to workspace next_on_output , workspace next_on_output
bindsym $mod+shift+p move container to workspace prev_on_output , workspace prev_on_output
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
focus_wrapping yes
# move focused window
bindsym $mod+shift+h move left 12 px
bindsym $mod+shift+j move down 12 px
bindsym $mod+shift+k move up 12 px
bindsym $mod+shift+l move right 12 px
# Split
bindsym $mod+v splitv
bindsym $mod+shift+v splith
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
# focus the child container
bindsym $mod+x focus child
# focus last urgent
bindsym $mod+i [urgent=latest] focus
# Move floating container to the center
bindsym $mod+c move position center
bindsym $mod+shift+c move position center
#bindsym $mod+shift+c move absolute position center
# move focus to output
bindsym $mod+o focus output next
bindsym $mod+shift+o move container to output next , focus output next
bindsym $mod+shift+w move workspace to output next
focus_follows_mouse no
# windows demanding focus will always be marked urgent but the focus will not be stolen
focus_on_window_activation urgent
# RESIZE
mode "resize" {
bindsym h resize shrink width 10px
bindsym j resize shrink height 10px
bindsym k resize grow height 10px
bindsym l resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# UTIL
# Special keys to adjust volume via PulseAudio
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
# Special keys to adjust brightness via brightnessctl
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# # Special key to take a screenshot with grim
# bindsym Print exec grim
# LOOK
# no titlebars
font pango:monospace 1
for_window [title="^.*"] title_format ""
titlebar_border_thickness 0
titlebar_padding 0
default_border pixel 0
default_floating_border pixel 0
# gaps
bindsym $mod+g gaps inner all set 0px
bindsym $mod+shift+g gaps inner all set 12px
# i3bar
bindsym $mod+b bar mode dock
bindsym $mod+shift+b bar mode invisible
# float pop-ups, don't focus
no_focus [window_role="pop-up"]
for_window [window_role="pop-up"] floating enable
for_window [window_role="^floating$"] floating enable
# float always
for_window [class="Sxiv"] floating enable
for_window [app_id="Sxiv"] floating enable
for_window [class="Nsxiv"] floating enable
for_window [app_id="Nsxiv"] floating enable
for_window [class="Vlc"] floating enable
for_window [app_id="Vlc"] floating enable
for_window [class="kitty"] floating enable , resize set 828 420
for_window [app_id="kitty"] floating enable , resize set 828 420
# for_window [class="Vimb"] floating enable
# for_window [app_id="Vimb"] floating enable
# default layout for workspace level windows
workspace_layout tabbed
# resizing
set $maxw 1644
set $minw 12
set $maxh 1236
set $minh 12
# floating window size
floating_minimum_size 12 x 12
floating_maximum_size 1644 x 1236
set $black #191919
set $dark #222222
set $tone #66cccc
set $dimmed #747369
set $attention #c47848
# window colors
# border background text indicator child_border
client.focused $dimmed $dimmed $tone $dimmed $dimmed
client.focused_tab_title $dimmed $dimmed $black
client.focused_inactive $dark $dark $dimmed $dark $dark
client.unfocused $black $black $dimmed $black $black
client.urgent $attention $attention $black $attention $attention
# bar
# Read `man 5 sway-bar` for more information about this section.
# Start i3bar to display a workspace bar (plus the system information i3status finds out, if available)
bar {
mode invisible
# modifier None
position top
status_command i3blocks
tray_output primary
# tray_padding 0
separator_symbol " "
font pango:Hasklig 7
colors {
background $dark
separator #757575
# border background text
focused_workspace $dark $dark $tone
inactive_workspace $dark $dark $dimmed
urgent_workspace $dark $dark $attention
}
}
# # FX
#
# blur enable
#
# # blur_xray disable
#
# # blur_passes 1
# ##integer 0-10
#
# # blur_radius 1
# ##integer 0-10
#
# # blur_noise 0.1
# ##float 0-1
#
# # blur_brightness 0.0
# ##float 0-2
#
# # blur_contrast 0.0
# ##float 0-2
#
# # blur_saturation 0
# ##float 0-2
#
# #
#
# corner_radius 1
#
# #
#
# shadows enable
#
# # shadows_on_csd disable
#
# shadow_blur_radius 9
# ##integer 0-99
#
# shadow_color #66cccc
#
# # shadow_offset 0 0
#
# shadow_inactive_color #0000007F
#
# #
#
# # layer_effects <layer namespace> <effects>
# ##The current layer namespaces can be shown with swaymsg -r -t get_outputs | jq '.[0].layer_shell_surfaces | .[] | .namespace'
# ##Example: layer_effects "waybar" blur enable; shadows enable; corner_radius 6
# ##Effects: blur <enable|disable> | blur_ignore_transparent <enable|disable> | shadows <enable|disable> | corner_radius <int>
#
# #
#
# # default_dim_inactive 0
# ##float 0-1
#
# # for window [<criteria>] dim_inactive <float 0-1>
#
# # dim_inactive_colors.unfocused #000000FF
#
# # dim_inactive_colors.urgent #000000FF
#
# # for_window [<criteria>] saturation <set|plus|minus> <vale 0.0 <-> 2.0>
#
# titlebar_separator disable
#
# # scratchpad_minimize <enable|disable>
# ##recommend off (buggy)
# MISC
# shot
# monitor
bindsym $mod+t exec grim
# region
bindsym $mod+shift+t exec grim -g "$(slurp -w 0)"
# set audio
exec pipewire
#exec gammastep -l 41.1:-8.6
exec wlsunset -l 41.1 -L -8.6
exec mako
# machine specific
exec ~/this
# # launch terminal
# exec $term
include /etc/sway/config.d/*