Created
November 3, 2017 21:35
-
-
Save reedjosh/02192841820b18a84f6d0a07b310011d to your computer and use it in GitHub Desktop.
Sway Config File (About a week into using sway)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
font pango:Inconsolata B 14 | |
focus_follows_mouse no | |
gaps edge_gaps on | |
gaps 1 | |
hide_edge_borders smart | |
default_border pixel | |
seamless_mouse off | |
#font Inconsolata-dz for Powerline 14 | |
# special | |
#foreground = #c5c8c6 | |
#foreground_bold = #c5c8c6 | |
#cursor = #c5c8c6 | |
#background = #1d1f21 | |
# black | |
#color0 = #282a2e | |
#color8 = #373b41 | |
# | |
## red | |
#color1 = #a54242 | |
#color9 = #cc6666 | |
# | |
## green | |
#color2 = #8c9440 | |
#color10 = #b5bd68 | |
# | |
## yellow | |
#color3 = #de935f | |
#color11 = #f0c674 | |
# | |
## blue | |
#color4 = #5f819d | |
#color12 = #81a2be | |
# | |
## magenta | |
#color5 = #85678f | |
#color13 = #b294bb | |
# | |
## cyan | |
#color6 = #5e8d87 | |
#color14 = #8abeb7 | |
# | |
## white | |
#color7 = #707880 | |
#color15 = #c5c8c6 | |
#client.focused_inactive $tertiary $tertiary $primary $background | |
set $background #282a2e | |
set $foreground #707880 | |
set $gray #373b41 | |
set $primary #c5c8c6 | |
set $secondary #85678f | |
set $tertiary #8c9440 | |
set $warning #85678f | |
# colors BORDER BACKGROUND TEXT INDICATOR | |
client.focused $secondary $secondary $primary $primary | |
client.unfocused $tertiary $tertiary $background $secondary | |
client.urgent $warning $warning $foreground $warning | |
### Variables | |
# | |
# Logo key. Use Mod1 for Alt. | |
set $mod Mod1 | |
# Home row direction keys, like vim | |
set $left h | |
set $down j | |
set $up k | |
set $right l | |
# Your preferred terminal emulator | |
set $term termite | |
# Your preferred application launcher | |
set $menu dmenu_run | |
# Set wallpaper. | |
output * bg $HOME/Pictures/Wallpapers/psychedelic-skull-wallpaper.jpg fit | |
### Output configuration. | |
# Get the names of your outputs by running: swaymsg -t get_outputs. | |
output eDP-1 resolution 1920x1080 scale 1 | |
output DP-1 resolution 3840x2160 scale 1 | |
### Input configuration. | |
input "1739:30382:DLL0704:01_06CB:76AE_To" { | |
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 $term | |
# Kill focused window. | |
bindsym $mod+Shift+q kill | |
# Start launcher. | |
bindsym $mod+d exec $menu | |
# Drag floating windows by holding down $mod and left mouse button. | |
# Resize them with right mouse button + $mod. | |
floating_modifier $mod normal | |
# Reload the configuration file. | |
bindsym $mod+Shift+c reload | |
# | |
# System Exit Menu | |
# | |
# Create the sysmenu mode. | |
set $sysmenu "system: [r]eboot [s]hutdown [e]xit" | |
mode $sysmenu { | |
# Restart or shutdown. | |
bindsym r exec shutdown -r now | |
bindsym s exec shutdown -P now | |
# Exit sway (logs out of wayland session). | |
bindsym e exit | |
bindsym Return mode "default" | |
bindsym Escape mode "default" | |
} | |
# Enter system exit menu. | |
bindsym $mod+p mode $sysmenu | |
# | |
# Moving around: | |
# | |
# Move focus. | |
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 | |
# | |
# Workspaces: | |
# | |
# 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 | |
# | |
# Layout | |
# | |
# You can "split" the current object of your focus with | |
# $mod+b or $mod+v, for horizontal and vertical splits | |
# respectively. | |
bindsym $mod+b 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 | |
# | |
# Laptop Buttons: | |
# | |
# Volume up and down. | |
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5% | |
bindsym XF86AudioLowerVolume exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5% bindsym XF86AudioMute exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle | |
# Brightness up and down. | |
bindsym XF86MonBrightnessDown exec dsplight down 5 | |
bindsym XF86MonBrightnessDown exec dsplight down 5 | |
# | |
# 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 10 px or 10 ppt | |
bindsym $down resize grow height 10 px or 10 ppt | |
bindsym $up resize shrink height 10 px or 10 ppt | |
bindsym $right resize grow width 10 px or 10 ppt | |
# return to default mode | |
bindsym Return mode "default" | |
bindsym Escape mode "default" | |
} | |
# Enter resize mode. | |
bindsym $mod+r mode "resize" | |
### Status Bar: | |
# | |
# | |
bar { | |
position top | |
status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf | |
} | |
include /etc/sway/config.d/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment