This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/sway/.config/sway/config

283 lines
7.8 KiB
Plaintext
Raw Normal View History

2019-10-16 02:28:41 +02:00
# LEL
2019-12-04 04:03:28 +01:00
#
2019-12-01 17:36:00 +01:00
# _____ ____ _ _ _
# / __\ \ /\ / / _` | | | |
# \__ \\ V V / (_| | |_| |
# |___/ \_/\_/ \__,_|\__, |
# |___/
2019-12-05 18:18:09 +01:00
2019-10-21 21:06:39 +02:00
# Variables {{{
#
# Logo key.
2019-10-16 02:28:41 +02:00
set $mod Mod4
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
2019-10-21 05:35:03 +02:00
set $term kitty
2019-12-03 04:38:10 +01:00
set $menu wofi --show drun -i -p'Iniciar: '
2019-10-21 05:56:52 +02:00
font pango:Hack 14px
2019-10-16 02:28:41 +02:00
2019-10-21 21:06:39 +02:00
# }}}
# Output configuration {{{
2019-10-16 02:28:41 +02:00
#
2019-11-23 20:29:02 +01:00
output * bg '#252525' solid_color
2019-10-16 02:28:41 +02:00
# output HDMI-A-1 resolution 720x576
#Disable laptop screen if closed, --reload is important
set $laptop eDP-1
2019-11-23 02:23:15 +01:00
bindswitch --reload lid:on output $laptop disable
bindswitch --reload lid:off output $laptop enable
# output $laptop disable
# bindsym $mod+o output eDP-1 toggle
2019-10-16 02:28:41 +02:00
# Backlight settings for laptops
exec sudo light -N 1
bindsym XF86MonBrightnessUp exec sudo light -A 5
bindsym XF86MonBrightnessDown exec sudo light -U 5
2019-10-21 21:06:39 +02:00
# }}}
# Input configuration {{{
2019-10-16 02:28:41 +02:00
#
input "1739:30966:Synaptics_TM3096-006" {
dwt enabled
natural_scroll enabled
tap enabled
}
input * {
xkb_layout br
xkb_numlock enabled
}
2019-10-21 21:06:39 +02:00
# }}}
# Key bindings: {{{
# Basic {{{
#
2019-10-16 02:28:41 +02:00
# Start a terminal
bindsym $mod+Return exec $term
#start web browser
bindsym $mod+q exec qutebrowser
2019-11-23 18:35:46 +01:00
#start file manager
bindsym $mod+m exec nemo
2019-10-16 02:28:41 +02:00
# Kill focused window
bindsym $mod+x kill
# Start your launcher
bindsym $mod+d exec $menu
# Fill passwords
bindsym Control+$mod+p exec keepmenu
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+c reload
# Lock Sway
bindsym $mod+Control+s exec swaylock
# 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'
2019-10-21 21:06:39 +02:00
# }}}
# Moving around: {{{
#
2019-10-16 02:28:41 +02:00
# 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
2019-10-21 21:06:39 +02:00
# }}}
# Workspaces: {{{
#
2019-10-16 02:28:41 +02:00
# Switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
# Assign programs to their workspace
2019-11-23 02:23:15 +01:00
assign [app_id=org.qutebrowser.qutebrowser] workspace 2
assign [app_id=telegramdesktop] workspace 10
2019-10-16 02:28:41 +02:00
assign [class=discord] workspace 10
2019-10-21 21:06:39 +02:00
# }}}
# Layout stuff: {{{
#
2019-10-16 02:28:41 +02:00
# Splits
bindsym $mod+b splith
bindsym $mod+v splitv
# 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
# Floating
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
2019-10-21 21:06:39 +02:00
# }}}
# Scratchpad: {{{
#
2019-10-16 02:28:41 +02:00
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window
bindsym $mod+minus scratchpad show
2019-10-21 21:06:39 +02:00
#}}}
# Screenshots: {{{
#
2019-10-16 02:28:41 +02:00
# Screens to file
bindsym Print exec grim $(xdg-user-dir PICTURES)/$(date +'%Y-%m-%d-%H%M%S_grim.png')
# Screen area to file
bindsym Shift+Print exec grim -g "$(slurp)" $(xdg-user-dir PICTURES)/$(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
2019-12-02 19:57:45 +01:00
# Screen recorder
bindsym Control+Alt+Shift+r exec wf-recorder -a
2019-10-16 02:28:41 +02:00
2019-10-21 21:06:39 +02:00
# }}}
2019-12-02 19:57:45 +01:00
# Audio: {{{
2019-10-21 21:06:39 +02:00
#
2019-12-02 19:57:45 +01:00
bindsym $mod+p exec pulse-sink
2019-10-16 02:28:41 +02:00
for_window [app_id="pavucontrol"] floating enable
# Volume controll
2019-11-24 18:33:26 +01:00
bindsym XF86AudioRaiseVolume exec pavolume volup 5
bindsym XF86AudioLowerVolume exec pavolume voldown 5
bindsym XF86AudioMute exec pavolume mutetoggle
2019-10-16 02:28:41 +02:00
# Media player controls
2019-12-02 19:57:45 +01:00
bindsym XF86AudioPlay exec mpc toggle
bindsym XF86AudioNext exec mpc next
bindsym XF86AudioPrev exec mpc prev
2019-12-04 05:18:30 +01:00
bindsym $mod+Shift+x exec musmenu delete
bindsym $mod+Shift+s exec musmenu search
2019-10-16 02:28:41 +02:00
2019-10-21 21:06:39 +02:00
# }}}
# }}}
# Visual: {{{
2019-10-16 02:28:41 +02:00
#
2019-12-01 17:36:00 +01:00
exec flashfocus -o .5
2019-10-16 02:28:41 +02:00
set $accent #CC575D
set $aclite #CC575D50
set $fg_color #ffffff
2019-12-03 04:38:10 +01:00
set $bg_color #191919
2019-11-26 04:25:42 +01:00
set $bg_darker #151515
2019-10-16 02:28:41 +02:00
set $alert #000000
2019-10-17 16:36:48 +02:00
2019-10-16 02:28:41 +02:00
# border background text indicator child_border
client.focused $accent $accent $fg_color $accent $accent
2019-12-03 04:38:10 +01:00
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
2019-10-16 02:28:41 +02:00
client.urgent $alert $alert $fg_color $alert $alert
2019-11-26 04:25:42 +01:00
bar swaybar_command waybar
# bar mode hide
# bar position top
2019-10-16 02:28:41 +02:00
default_border pixel 2px
gaps inner 5px
smart_gaps on
smart_borders on
2019-10-21 22:55:20 +02:00
2019-12-05 20:48:20 +01:00
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 700px
2019-11-24 18:33:26 +01:00
# set theme
set $gnome-schema org.gnome.desktop.interface
exec_always {
2019-12-05 18:18:09 +01:00
kvantummanager --set MateriaDark
2019-12-01 17:36:00 +01:00
gsettings set $gnome-schema gtk-theme 'materia-custom-accent'
2019-12-05 18:18:09 +01:00
gsettings set $gnome-schema icon-theme 'Papirus-Dark'
2019-11-25 02:34:09 +01:00
gsettings set $gnome-schema cursor-theme 'capitaine-cursors'
2019-11-24 18:33:26 +01:00
}
2019-10-21 21:06:39 +02:00
# }}}
# Daemons {{{
2019-10-16 02:28:41 +02:00
#
2019-11-25 05:02:00 +01:00
2019-10-16 02:28:41 +02:00
#Notification Daemon
exec mako
# Block device Mounter to /run/media/<username>
exec udiskie
# Blue light filter
exec redshift
2019-11-26 04:25:42 +01:00
# kde connect
2019-11-23 20:29:02 +01:00
exec /usr/lib/kdeconnectd
2019-11-26 04:25:42 +01:00
exec kdeconnect-indicator
# Telegram
exec telegram-desktop
2019-11-26 14:02:22 +01:00
# Music Player Daemon
2019-12-05 15:28:02 +01:00
exec mpd --no-daemon
2019-11-26 14:02:22 +01:00
exec mpDris2
2019-10-16 02:28:41 +02:00
# 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 \
2019-10-16 21:33:16 +02:00
timeout 900 'swaylock -f' \
2019-11-23 02:23:15 +01:00
# timeout 1800 'swaymsg "output * dpms off"' \
# resume 'swaymsg "output * dpms on;reload"' \
2019-10-21 21:06:39 +02:00
#}}}
2019-10-16 02:28:41 +02:00
include /etc/sway/config.d/*
2019-10-21 21:32:26 +02:00
# vim:filetype=i3config:foldmethod=marker