1
0
Fork 0

add sway configuration

This commit is contained in:
coderkun 2016-08-21 19:07:25 +02:00
commit b8db145787

220
sway/config Normal file
View file

@ -0,0 +1,220 @@
# 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
# Your preferred terminal emulator
set $term gnome-terminal
# Your preferred application launcher
set $menu dmenu_run
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/sway/)
output HDMI-A-1 primary true
output HDMI-A-1 bg "/home/oliver/Bilder/Wallpapers/the neon demon.png" fill
output DP-1 disable
#
# Example output configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running swaymsg -t get_outputs
### Input configuration
input "5426:66:Razer_Razer_Abys" {
drag_lock disabled
accel_profile flat
}
### Key bindings
#
# Basics:
#
# start a terminal
bindsym $mod+Return exec $term
# kill focused window
bindsym $mod+Shift+x kill
# start your launcher
bindsym $mod+a exec $menu
# 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+adiaresis exit
#
# Moving around:
#
# Move your focus around with $mod+[h|j|k|l], like vim
bindsym $mod+n focus left
bindsym $mod+r focus down
bindsym $mod+t focus up
bindsym $mod+d focus right
# or use $mod+[up|down|left|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+n move left
bindsym $mod+Shift+r move down
bindsym $mod+Shift+t move up
bindsym $mod+Shift+d move right
# ditto, with arrow keys
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
bindsym $mod+mod3+m workspace 1
bindsym $mod+mod3+comma workspace 2
bindsym $mod+mod3+period workspace 3
bindsym $mod+mod3+n workspace 4
bindsym $mod+mod3+r workspace 5
bindsym $mod+mod3+t workspace 6
bindsym $mod+mod3+h workspace 7
bindsym $mod+mod3+g workspace 8
bindsym $mod+mod3+f workspace 9
bindsym $mod+mod3+space 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
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
bindsym $mod+Shift+mod3+m move container to workspace 1
bindsym $mod+Shift+mod3+comma move container to workspace 2
bindsym $mod+Shift+mod3+period move container to workspace 3
bindsym $mod+Shift+mod3+n move container to workspace 4
bindsym $mod+Shift+mod3+r move container to workspace 5
bindsym $mod+Shift+mod3+t move container to workspace 6
bindsym $mod+Shift+mod3+h move container to workspace 7
bindsym $mod+Shift+mod3+g move container to workspace 8
bindsym $mod+Shift+mod3+f move container to workspace 9
bindsym $mod+Shift+mod3+space move container to workspace 10
# multiple monitors
bindsym $mod+Shift+H move workspace to output left
bindsym $mod+Shift+G move container to output left
bindsym $mod+Shift+F move container to output right
bindsym $mod+Shift+Q move workspace to output right
#
# 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+s splith
bindsym $mod+o splitv
# Switch the current container between different layout styles
bindsym $mod+i layout stacking
bindsym $mod+v layout tabbed
bindsym $mod+l layout toggle split
# Make the current focus fullscreen
bindsym $mod+e 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+u focus parent
# TODO move focus to the child container
#bindsym $mod+p focus child
#
# 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
# Resize mode
mode "resize" {
bindsym n resize shrink width 10 px or 10 ppt
bindsym r resize grow height 10 px or 10 ppt
bindsym t resize shrink height 10 px or 10 ppt
bindsym d resize grow width 10 px or 10 ppt
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
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym mod3+p mode "default"
bindsym Escape mode "default"
bindsym mod3+udiaeresis mode "default"
}
bindsym $mod+c mode "resize"
#
# Status Bar:
#
bar {
status_command i3status
position top
#colors {
# statusline #ffffff
# background #323232
# inactive_workspace #32323200 #32323200 #5c5c5c
#}
}
# Read sway-bar(5) for more information about this section.
# You may want this:
#
# include ~/.config/sway/conf.d/*
#
# Protip:
#
# include ~/.config/sway/`hostname`/*