mirror of
https://github.com/Stunkymonkey/dotfiles.git
synced 2025-05-24 19:14:39 +02:00
321 lines
11 KiB
Text
321 lines
11 KiB
Text
set $mod Mod4
|
|
floating_modifier $mod
|
|
|
|
# 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"
|
|
|
|
# keyboard layout
|
|
input * {
|
|
xkb_layout "gb,de"
|
|
xkb_variant altgr-intl
|
|
xkb_options "caps:escape,grp:win_space_toggle,compose:ralt"
|
|
xkb_numlock enabled
|
|
}
|
|
# hide cursor after 10 sec
|
|
seat * hide_cursor 10000
|
|
|
|
# background
|
|
output * bg #0C0C0D solid_color
|
|
#output * bg wallpaper.png fit
|
|
|
|
# source env-vars
|
|
exec systemctl --user import-environment
|
|
|
|
# startup programs
|
|
exec /run/current-system/sw/libexec/polkit-gnome-authentication-agent-1
|
|
exec gnome-keyring-daemon --start --components secrets
|
|
exec swayidle -w \
|
|
timeout 285 'notify-send -a lockscreen -c lock-warn -u critical -t 14900 -i system-lock-screen "Locking Screen" "Will Lock Screen in 15s"' \
|
|
timeout 300 '~/.dotfiles/sway/lock.sh' \
|
|
timeout 600 'swaymsg "output * dpms off"' \
|
|
resume 'swaymsg "output * dpms on"' \
|
|
before-sleep '~/.dotfiles/sway/lock.sh'
|
|
exec mako
|
|
exec syncthing -no-browser
|
|
#exec nm-applet --indicator
|
|
exec blueman-applet
|
|
exec telegram-desktop -startintray
|
|
exec gammastep-indicator
|
|
exec nextcloud --background
|
|
exec com.gitlab.newsflash
|
|
|
|
# mute microfone
|
|
exec amixer set Capture nocap
|
|
|
|
# prevent locking when fullscreen
|
|
for_window [app_id="firefox"] inhibit_idle fullscreen
|
|
for_window [class="Chromium-browser"] inhibit_idle fullscreen
|
|
for_window [class="vlc"] inhibit_idle fullscreen
|
|
for_window [app_id="evince"] inhibit_idle fullscreen
|
|
for_window [class="mpv"] inhibit_idle fullscreen
|
|
for_window [class="Skype"] inhibit_idle fullscreen
|
|
for_window [class="discord"] inhibit_idle fullscreen
|
|
|
|
# font
|
|
font pango:Fira Sans Mono 12
|
|
|
|
# default floating
|
|
for_window [window_role="pop-up"] floating enable
|
|
for_window [window_role="bubble"] floating enable
|
|
for_window [window_role="task_dialog"] floating enable
|
|
for_window [window_role="Preferences"] floating enable
|
|
for_window [window_type="dialog"] floating enable
|
|
for_window [window_type="menu"] floating enable
|
|
for_window [instance="update_installer"] floating enable
|
|
# custom floating
|
|
for_window [app_id="firefox" title="About Mozilla Firefox"] floating enable
|
|
for_window [app_id="firefox" title="Picture-in-Picture"] floating enable, sticky enable
|
|
for_window [app_id="firefox" title="Firefox — Sharing Indicator"] floating enable
|
|
for_window [app_id="firefox-developer-edition" title="About Firefox Developer Edition"] floating enable
|
|
for_window [app_id="gnome-calculator"] floating enable
|
|
for_window [app_id="org.gnome.NautilusPreviewer"] floating enable
|
|
|
|
# Stick windows to workspaces
|
|
assign [app_id="NewsFlashGTK"] 8
|
|
assign [app_id="thunderbird"] 9
|
|
assign [app_id="evolution"] 9
|
|
assign [app_id="rhythmbox"] 10
|
|
assign [app_id="lollypop"] 10
|
|
|
|
hide_edge_borders both
|
|
focus_follows_mouse no
|
|
|
|
# to switch workspace-tabs
|
|
bindsym $mod+Tab workspace next
|
|
bindsym Shift+$mod+Tab workspace prev
|
|
|
|
bindsym $mod+m exec . ~/.profile.d/90-keychain.sh && keepassxc
|
|
bindsym $mod+e exec sublime3
|
|
bindsym $mod+w exec firefox
|
|
bindsym $mod+u exec com.gitlab.newsflash
|
|
|
|
# mako
|
|
bindsym $mod+dead_circumflex exec makoctl dismiss
|
|
bindsym $mod+Shift+dead_circumflex exec makoctl dismiss --all
|
|
bindsym $mod+grave exec makoctl dismiss
|
|
bindsym $mod+Shift+grave exec makoctl dismiss --all
|
|
bindsym $mod+minus exec makoctl list
|
|
bindsym $mod+plus exec makoctl invoke
|
|
|
|
# to prevent gnome-help
|
|
bindsym F1 exec :
|
|
|
|
# script shortcuts
|
|
set $keyboard ~/.local/bin/keyboard
|
|
bindsym $mod+F1 exec $keyboard-f1
|
|
bindsym $mod+Shift+F1 exec $keyboard-shift-f1
|
|
bindsym $mod+F2 exec $keyboard-f2
|
|
bindsym $mod+Shift+F2 exec $keyboard-shift-f2
|
|
bindsym $mod+F3 exec $keyboard-f3
|
|
bindsym $mod+Shift+F3 exec $keyboard-shift-f3
|
|
bindsym $mod+F4 exec $keyboard-f4
|
|
bindsym $mod+Shift+F4 exec $keyboard-shift-f4
|
|
|
|
# Screenshot
|
|
bindsym Print exec grim ~/Downloads/Screenshot-$(date +'%Y-%m-%d_%H%M%S.png')
|
|
bindsym $mod+Print exec slurp | grim -g - ~/Downloads/Screenshot-$(date +'%Y-%m-%d_%H%M%S.png')
|
|
bindsym $mod+Shift+Print exec swaymsg -t get_tree | jq -r '.. | (.nodes? // empty , .floating_nodes? // empty)[] | select(.focused) | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"' | grim -g - ~/Downloads/Screenshot-$(date +'%Y-%m-%d_%H%M%S.png')
|
|
|
|
# forward an backward at arrow-keys
|
|
#bindsym --release XF86Back exec
|
|
#bindsym --release XF86Forward exec
|
|
|
|
# Sreen brightness controls
|
|
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
|
|
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
|
|
|
|
# Pulse Audio controls
|
|
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
|
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
|
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
|
|
|
# Microphone
|
|
bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
|
bindsym --locked $mod+XF86AudioRaiseVolume exec pactl set-source-volume @DEFAULT_SOURCE@ +5%
|
|
bindsym --locked $mod+XF86AudioLowerVolume exec pactl set-source-volume @DEFAULT_SOURCE@ -5%
|
|
|
|
# Media player controls
|
|
bindsym --locked XF86AudioPlay exec playerctl play-pause
|
|
bindsym --locked XF86AudioPause exec playerctl play-pause
|
|
bindsym --locked XF86AudioNext exec playerctl next
|
|
bindsym --locked XF86AudioPrev exec playerctl previous
|
|
bindsym --locked XF86AudioStop exec playerctl stop
|
|
|
|
# show helper for display-management
|
|
bindsym XF86Display exec wdisplays
|
|
#bindsym XF86NotificationCenter exec swaynag -t warning -m 'notificationcenter'
|
|
#bindsym XF86PickupPhone exec swaynag -t warning -m 'pickupphone'
|
|
#bindsym XF86HangupPhone exec swaynag -t warning -m 'hangupphone'
|
|
|
|
# main commands
|
|
bindsym $mod+Shift+c reload
|
|
bindsym $mod+Shift+e exec swaynag -t warning -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'
|
|
|
|
# start a terminal
|
|
bindsym $mod+Return exec $term
|
|
|
|
# screensaver
|
|
bindsym $mod+z exec ~/.dotfiles/sway/lock.sh
|
|
bindsym $mod+y exec ~/.dotfiles/sway/lock.sh
|
|
bindsym Scroll_Lock exec ~/.dotfiles/sway/lock.sh
|
|
|
|
# start dmenu (a program launcher)
|
|
bindsym $mod+d exec wofi --insensitive --show drun
|
|
bindsym $mod+Shift+d exec ~/.dotfiles/wofi/system.sh
|
|
bindsym Alt+Space exec wofi --insensitive --show drun
|
|
|
|
# gtk3
|
|
set $gnome-schema org.gnome.desktop.interface
|
|
exec_always {
|
|
gsettings set $gnome-schema gtk-theme 'Arc-Dark'
|
|
gsettings set $gnome-schema icon-theme 'Numix-Circle'
|
|
gsettings set $gnome-schema cursor-theme 'Adwaita'
|
|
}
|
|
|
|
# kill focused window
|
|
bindsym $mod+Shift+q kill
|
|
|
|
# enter fullscreen mode for the focused container
|
|
bindsym $mod+f fullscreen toggle
|
|
bindsym $mod+g fullscreen global
|
|
|
|
# change layouts
|
|
bindsym $mod+b split h
|
|
bindsym $mod+v split v
|
|
|
|
# toggle tiling / floating
|
|
bindsym $mod+BackSpace floating toggle
|
|
|
|
bindsym Alt+Left move workspace to output left
|
|
bindsym Alt+Right move workspace to output right
|
|
bindsym Alt+Up move workspace to output up
|
|
bindsym Alt+Down move workspace to output down
|
|
|
|
# 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
|
|
|
|
# move windows to workspace and switch to it
|
|
bindsym Ctrl+1 move container to workspace 1; workspace 1
|
|
bindsym Ctrl+2 move container to workspace 2; workspace 2
|
|
bindsym Ctrl+3 move container to workspace 3; workspace 3
|
|
bindsym Ctrl+4 move container to workspace 4; workspace 4
|
|
bindsym Ctrl+5 move container to workspace 5; workspace 5
|
|
bindsym Ctrl+6 move container to workspace 6; workspace 6
|
|
bindsym Ctrl+7 move container to workspace 7; workspace 7
|
|
bindsym Ctrl+8 move container to workspace 8; workspace 8
|
|
bindsym Ctrl+9 move container to workspace 9; workspace 9
|
|
# for settings the zoom-level back to default in firefox
|
|
#bindsym Ctrl+0 move container to workspace 10; workspace 10
|
|
|
|
bindsym $mod+n exec i3-input -F 'rename workspace to "%s"' -P 'New name: '
|
|
|
|
#FOCUS
|
|
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 focused window
|
|
bindsym $mod+Shift+$left move left
|
|
bindsym $mod+Shift+$down move down
|
|
bindsym $mod+Shift+$up move up
|
|
bindsym $mod+Shift+$right move right
|
|
bindsym $mod+Shift+Left move left
|
|
bindsym $mod+Shift+Down move down
|
|
bindsym $mod+Shift+Up move up
|
|
bindsym $mod+Shift+Right move right
|
|
|
|
# resize window (you can also use the mouse for that)
|
|
mode "resize" {
|
|
bindsym $left resize shrink width 10 px or 10 ppt
|
|
bindsym $down resize shrink height 10 px or 10 ppt
|
|
bindsym $up resize grow height 10 px or 10 ppt
|
|
bindsym $right resize grow width 10 px or 10 ppt
|
|
|
|
bindsym Left resize shrink width 10 px or 10 ppt
|
|
bindsym Up resize grow height 10 px or 10 ppt
|
|
bindsym Down resize shrink height 10 px or 10 ppt
|
|
bindsym Right resize grow width 10 px or 10 ppt
|
|
|
|
bindsym Return mode "default"
|
|
bindsym Escape mode "default"
|
|
bindsym $mod+r mode "default"
|
|
}
|
|
bindsym $mod+r mode "resize"
|
|
|
|
mode "passthrough" {
|
|
bindsym $mod+Escape mode "default"
|
|
}
|
|
bindsym $mod+Escape mode "passthrough"
|
|
|
|
# colors
|
|
set $color_bg #0C0C0D
|
|
set $color_bg_inactive #0C0C0D
|
|
set $color_text #F3F4F5
|
|
set $color_text_inactive #676E7D
|
|
set $color_bg_urgent #E53935
|
|
set $color_indicator #00FF00
|
|
|
|
set $color_separator #666666
|
|
set $color_ws #5294E2
|
|
set $color_ws_inactive #0C0C0D
|
|
set $color_ws_text #FFFFFF
|
|
set $color_ws_text_inactive #D3DAE3
|
|
|
|
# window colors
|
|
# border background text indicator child_border
|
|
client.focused $color_bg $color_bg $color_text $color_indicator $color_bg
|
|
client.unfocused $color_bg_inactive $color_bg_inactive $color_text_inactive $color_indicator $color_bg
|
|
client.focused_inactive $color_bg_inactive $color_bg_inactive $color_text_inactive $color_indicator $color_bg
|
|
client.urgent $color_bg_urgent $color_bg_urgent $color_text $color_indicator $color_bg
|
|
|
|
bar {
|
|
font pango:FiraCode
|
|
status_command i3status-rs
|
|
position top
|
|
workspace_buttons yes
|
|
icon_theme Numix
|
|
colors {
|
|
background $color_bg
|
|
statusline $color_ws_text_inactive
|
|
separator $color_separator
|
|
focused_workspace $color_ws $color_ws $color_ws_text
|
|
active_workspace $color_ws_inactive $color_ws_inactive $color_ws_text_inactive
|
|
inactive_workspace $color_ws_inactive $color_ws_inactive $color_ws_text_inactive
|
|
urgent_workspace $color_bg_urgent $color_bg_urgent $color_ws_text
|
|
}
|
|
}
|
|
|
|
include ~/.config/sway/`hostname`
|
|
include /etc/sway/config.d/*
|