Skip to content

Instantly share code, notes, and snippets.

@panther03
Created April 1, 2019 01:10
Show Gist options
  • Save panther03/bf88ce86de3f8e02cde56f29516d631d to your computer and use it in GitHub Desktop.
Save panther03/bf88ce86de3f8e02cde56f29516d631d to your computer and use it in GitHub Desktop.
Yeah you heard me right it's my sway config
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left Left
set $down Down
set $up Up
set $right Right
# Your preferred terminal emulator
set $term termite
# Your preferred application launcher
# Note: it's recommended that you pass the final command to sway
set $menu dmenu_path | dmenu | xargs swaymsg exec
### Output configuration
#
# GLpaper background
exec glpaper --fps 120 HDMI-A-1 /home/panther/Backgrounds/spiral.frag
exec glpaper DVI-D-1 /home/panther/Backgrounds/spiral.frag
#
# 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 DVI-D-1 resolution 1920x1080 position 0,0
output HDMI-A-1 resolution 1920x1080 position 1920,0
### Idle configuration
#
# Example configuration:
#
# 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'
#
# 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.
### Key bindings
#
# Basics:
#
# start a terminal
bindsym $mod+Return exec termite
# kill focused window
bindsym $mod+Shift+q kill
# start your launcher
bindsym $mod+d exec rofi -show drun
bindsym $mod+t exec rofi -show run
bindsym $mod+Print exec /home/panther/Scripts/img_upload
# 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+c reload
# exit sway (logs you out of your Wayland session)
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'
#
# 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
# or use $mod+[up|down|left|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
#
# Workspaces:
#
set $ws1 "1:"
set $ws2 "2:"
set $ws3 "3:"
set $ws4 "4:"
set $ws5 "5:"
set $ws6 "6:"
set $ws7 "7:"
set $ws8 "8:"
set $ws9 "9:1"
set $ws10 "10:"
set $ws11 "11:"
set $ws12 "12:"
set $ws13 "13:"
set $ws14 "14:"
set $ws15 "15:"
set $ws16 "16:"
set $ws17 "17:"
set $ws18 "18:2"
#set $ws10 "10:2"
workspace $ws1 output HDMI-A-1
workspace $ws2 output HDMI-A-1
workspace $ws3 output HDMI-A-1
workspace $ws4 output HDMI-A-1
workspace $ws5 output HDMI-A-1
workspace $ws6 output HDMI-A-1
workspace $ws7 output HDMI-A-1
workspace $ws8 output HDMI-A-1
workspace $ws9 output HDMI-A-1
workspace $ws10 output DVI-D-1
workspace $ws11 output DVI-D-1
workspace $ws12 output DVI-D-1
workspace $ws13 output DVI-D-1
workspace $ws14 output DVI-D-1
workspace $ws15 output DVI-D-1
workspace $ws16 output DVI-D-1
workspace $ws17 output DVI-D-1
workspace $ws18 output DVI-D-1
#
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym Mod1+1 workspace $ws10
bindsym Mod1+2 workspace $ws11
bindsym Mod1+3 workspace $ws12
bindsym Mod1+4 workspace $ws13
bindsym Mod1+5 workspace $ws14
bindsym Mod1+6 workspace $ws15
bindsym Mod1+7 workspace $ws16
bindsym Mod1+8 workspace $ws17
bindsym Mod1+9 workspace $ws18
#bindsym $mod+0 workspace $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
#bindsym $mod+Shift+0 move container to workspace $ws10 workspace $ws10
bindsym Mod1+Shift+1 move container to workspace $ws10
bindsym Mod1+Shift+2 move container to workspace $ws11
bindsym Mod1+Shift+3 move container to workspace $ws12
bindsym Mod1+Shift+4 move container to workspace $ws13
bindsym Mod1+Shift+5 move container to workspace $ws14
bindsym Mod1+Shift+6 move container to workspace $ws15
bindsym Mod1+Shift+7 move container to workspace $ws16
bindsym Mod1+Shift+8 move container to workspace $ws17
bindsym Mod1+Shift+9 move container to workspace $ws18
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+h splith
bindsym $mod+v splitv
# 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
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
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"
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
#bar {
# position top
#
# # When the status_command prints a new line to stdout, swaybar updates.
# # The default just shows the current date and time.
## status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done
#
# colors {
# statusline #ffffff
# background #323232
# inactive_workspace #32323200 #32323200 #5c5c5c
# }
#}
include /etc/sway/config.d/*
# set $bg-color #414959
# set $inactive-bg-color #303641
# set $text-color #b3bdcb
# set $inactive-text-color #9da3ad
# set $urgent-bg-color #E53935
set $bg-color #aa555d
set $inactive-bg-color #2b303b
set $text-color #c0c5ce
set $inactive-text-color #9da3ad
set $urgent-bg-color #E53935
set $indicator-color-focused #aa555d
set $indicator-color #2b303b
set $separator #757575
font pango:Luxi Sans 9
# window colors
# border background text indicator child_border
client.focused $bg-color $bg-color $text-color $indicator-color-focused $bg-color
client.unfocused $inactive-bg-color $inactive-bg-color $inactive-text-color $indicator-color $inactive-bg-color
client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color $indicator-color $inactive-bg-color
client.urgent $urgent-bg-color $urgent-bg-color $text-color $indicator-color $bg-color
gaps inner 10
default_border pixel 3
exec /home/panther/Scripts/launch-rootbar.fish
exec termite --exec="/home/panther/Scripts/mount-share.bash mount mpd"
exec mako
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment