Skip to content

Instantly share code, notes, and snippets.

@JAicewizard
Created September 16, 2020 18:55
Show Gist options
  • Save JAicewizard/4e2fd7705e0807d13071114e92ad9ca1 to your computer and use it in GitHub Desktop.
Save JAicewizard/4e2fd7705e0807d13071114e92ad9ca1 to your computer and use it in GitHub Desktop.
# "supper"/windows/logo key
set $mod Mod4
# mouse+$mod to drag floating windows
floating_modifier $mod
# Your preferred terminal emulator
set $term termite
# Kill focused window
bindsym $mod+Shift+q kill
# Move focus around
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# More windows around
bindsym $mod+Shift+left move left
bindsym $mod+Shift+down move down
bindsym $mod+Shift+up move up
bindsym $mod+Shift+right move right
# split horizontal
bindsym $mod+Control+h split h
# split horizontal
bindsym $mod+Control+v split v
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Swap focus between the tiling area and the floating area
bindsym $mod+Shift+space floating toggle
# Move focus to the parent container
bindsym $mod+a focus parent
# start menu`
set $menu ~/bin/rofiConfig
# workspaces
set $default_gaps_inner 10
set $default_gaps_outer 0
set $workspace1 "1: browser "
set $workspace2 "2: code "
set $workspace3 "3: music "
set $workspace4 "4: social "
set $workspace5 "5: gaming "
set $workspace6 "6: git "
set $workspace7 "7"
set $workspace8 "8"
set $workspace9 "9"
set $workspace10 "10"
workspace $workspace1 gaps inner $default_gaps_inner
workspace $workspace1 gaps outer $default_gaps_outer
workspace $workspace2 gaps inner $default_gaps_inner
workspace $workspace2 gaps outer $default_gaps_outer
workspace $workspace3 gaps inner $default_gaps_inner
workspace $workspace3 gaps outer $default_gaps_outer
workspace $workspace4 gaps inner $default_gaps_inner
workspace $workspace4 gaps outer $default_gaps_outer
workspace $workspace5 gaps inner $default_gaps_inner
workspace $workspace5 gaps outer $default_gaps_outer
workspace $workspace6 gaps inner $default_gaps_inner
workspace $workspace6 gaps outer $default_gaps_outer
# switching workspaces
bindsym $mod+1 workspace $workspace1
bindsym $mod+2 workspace $workspace2
bindsym $mod+3 workspace $workspace3
bindsym $mod+4 workspace $workspace4
bindsym $mod+5 workspace $workspace5
bindsym $mod+6 workspace $workspace6
bindsym $mod+7 workspace $workspace7
bindsym $mod+8 workspace $workspace8
bindsym $mod+9 workspace $workspace9
bindsym $mod+0 workspace $workspace10
# moving windows to workspaces
bindsym $mod+Shift+1 move container to workspace $workspace1
bindsym $mod+Shift+2 move container to workspace $workspace2
bindsym $mod+Shift+3 move container to workspace $workspace3
bindsym $mod+Shift+4 move container to workspace $workspace4
bindsym $mod+Shift+5 move container to workspace $workspace5
bindsym $mod+Shift+6 move container to workspace $workspace6
bindsym $mod+Shift+7 move container to workspace $workspace7
bindsym $mod+Shift+8 move container to workspace $workspace8
bindsym $mod+Shift+9 move container to workspace $workspace9
bindsym $mod+Shift+0 move container to workspace $workspace10
for_window [class="^.*"] border pixel 0
assign [class="Nightly"] $workspace1
assign [class="Franz"] $workspace4
# sway controls
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
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'
bindsym $mod+Shift+i [title="math"] scratchpad show; [title="math"] move position center
bindsym $mod+Shift+g [title="dropdown"] scratchpad show; [title="dropdown"] move position center
bindsym $mod+Return exec $term
bindsym $mod+d exec $menu
output * bg /home/jaap/Downloads/pokemon-1600481_1920.jpg fill
mode "resize" {
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
mode "gaps_inner" {
bindsym plus gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 mode "defualt", gaps inner current set 0
bindsym d mode "defualt", gaps inner current set $default_gaps_inner
bindsym Return mode "gaps"
bindsym Escape mode "gaps"
}
mode "gaps_outer" {
bindsym plus gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 mode "defualt", gaps outer current set 0
bindsym d mode "defualt", gaps outer current set $default_gaps_outer
bindsym Return mode "gaps"
bindsym Escape mode "gaps"
}
mode "gaps" {
bindsym $mod+o mode "gaps_outer"
bindsym $mod+i mode "gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+g mode "gaps"
set $bg-color #2f343f
set $inactive-bg-color #2f343f
set $text-color #f3f4f5
set $inactive-text-color #676E7D
set $urgent-bg-color #E53935
set $transparent #44444444
set $50 88
client.focused $bg-color$50 $bg-color$50 $text-color $bg-color$50
client.unfocused $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00
client.focused_inactive $transparent $transparent $inactive-text-color $transparent
client.urgent $urgent-bg-color $urgent-bg-color $text-color #00ff00
workspace 1: browser 
#dropdown terminal
exec --no-startup-id $term --title dropdown
for_window [title="dropdown"] floating enable
for_window [title="dropdown"] resize set width 1600 height 800
for_window [title="dropdown"] border pixel 5
for_window [title="dropdown"] move scratchpad
#dropdown maths
exec --no-startup-id $term --title math -e R
for_window [title="math"] floating enable
for_window [title="math"] resize set width 1600 height 800
for_window [title="math"] border pixel 5
for_window [title="math"] move scratchpad
hide_edge_borders both
default_floating_border normal
exec swayidle -w \
timeout 300 'swaylock -f -c 000000' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f -c 000000'
exec firefox-nightly
exec waybar
exec mako
exec xhost si:localuser:root
#audio/backlight
set $volumepath ~/i3-volume
#bindsym XF86AudioRaiseVolume exec $volumepath/volume -i $volumestep
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym XF86MonBrightnessUp exec brightnessctl set +5%
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
include /etc/sway/config.d/*
workspace 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment