dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | Submodules | README

config (7032B) [raw]


      1 # Default config for sway
      2 #
      3 # Copy this to ~/.config/sway/config and edit it to your liking.
      4 #
      5 # Read `man 5 sway` for a complete reference.
      6 
      7 ### Variables
      8 #
      9 # Logo key. Use Mod1 for Alt.
     10 set $mod Mod4
     11 # Home row direction keys, like vim
     12 set $left h
     13 set $down j
     14 set $up k
     15 set $right l
     16 # Your preferred terminal emulator
     17 set $term alacritty
     18 # Your preferred application launcher
     19 # Note: pass the final command to swaymsg so that the resulting window can be opened
     20 # on the original workspace that the command was run on.
     21 set $menu dmenu_path | dmenu | xargs swaymsg exec --
     22 
     23 ### Output configuration
     24 #
     25 # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
     26 output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
     27 #
     28 # Example configuration:
     29 #
     30 #   output HDMI-A-1 resolution 1920x1080 position 1920,0
     31 #
     32 # You can get the names of your outputs by running: swaymsg -t get_outputs
     33 
     34 ### Idle configuration
     35 #
     36 # Example configuration:
     37 #
     38 # exec swayidle -w \
     39 #          timeout 300 'swaylock -f -c 000000' \
     40 #          timeout 600 'swaymsg "output * dpms off"' \
     41 #               resume 'swaymsg "output * dpms on"' \
     42 #          before-sleep 'swaylock -f -c 000000'
     43 #
     44 # This will lock your screen after 300 seconds of inactivity, then turn off
     45 # your displays after another 300 seconds, and turn your screens back on when
     46 # resumed. It will also lock your screen before your computer goes to sleep.
     47 
     48 ### Input configuration
     49 #
     50 # Example configuration:
     51 #
     52 #   input "2:14:SynPS/2_Synaptics_TouchPad" {
     53 #       dwt enabled
     54 #       tap enabled
     55 #       natural_scroll enabled
     56 #       middle_emulation enabled
     57 #   }
     58 #
     59 # You can get the names of your inputs by running: swaymsg -t get_inputs
     60 # Read `man 5 sway-input` for more information about this section.
     61 input "type:keyboard" {
     62 	xkb_options caps:ctrl_modifier
     63 }
     64 
     65 ### Key bindings
     66 #
     67 # Basics:
     68 #
     69     # Start a terminal
     70     bindsym $mod+Shift+Return exec $term
     71 
     72     # Kill focused window
     73     bindsym $mod+Shift+q kill
     74 
     75     # Start your launcher
     76     bindsym $mod+p exec $menu
     77 
     78     # lock the screen
     79     bindsym $mod+Semicolon exec swaylock -c 000100
     80 
     81     # toggle recently used
     82     bindsym $mod+Tab workspace back_and_forth
     83 
     84     # Drag floating windows by holding down $mod and left mouse button.
     85     # Resize them with right mouse button + $mod.
     86     # Despite the name, also works for non-floating windows.
     87     # Change normal to inverse to use left mouse button for resizing and right
     88     # mouse button for dragging.
     89     floating_modifier $mod normal
     90 
     91     # Reload the configuration file
     92     bindsym $mod+Shift+c reload
     93 
     94     # Exit sway (logs you out of your Wayland session)
     95     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'
     96 #
     97 # Moving around:
     98 #
     99     # Move your focus around
    100     bindsym $mod+$left focus left
    101     bindsym $mod+$down focus down
    102     bindsym $mod+$up focus up
    103     bindsym $mod+$right focus right
    104     # Or use $mod+[up|down|left|right]
    105     bindsym $mod+Left focus left
    106     bindsym $mod+Down focus down
    107     bindsym $mod+Up focus up
    108     bindsym $mod+Right focus right
    109 
    110     # Move the focused window with the same, but add Shift
    111     bindsym $mod+Shift+$left move left
    112     bindsym $mod+Shift+$down move down
    113     bindsym $mod+Shift+$up move up
    114     bindsym $mod+Shift+$right move right
    115     # Ditto, with arrow keys
    116     bindsym $mod+Shift+Left move left
    117     bindsym $mod+Shift+Down move down
    118     bindsym $mod+Shift+Up move up
    119     bindsym $mod+Shift+Right move right
    120 #
    121 # Workspaces:
    122 #
    123     # Switch to workspace
    124     bindsym $mod+1 workspace 1
    125     bindsym $mod+2 workspace 2
    126     bindsym $mod+3 workspace 3
    127     bindsym $mod+4 workspace 4
    128     bindsym $mod+5 workspace 5
    129     bindsym $mod+6 workspace 6
    130     bindsym $mod+7 workspace 7
    131     bindsym $mod+8 workspace 8
    132     bindsym $mod+9 workspace 9
    133     bindsym $mod+0 workspace 10
    134     # Move focused container to workspace
    135     bindsym $mod+Shift+1 move container to workspace 1
    136     bindsym $mod+Shift+2 move container to workspace 2
    137     bindsym $mod+Shift+3 move container to workspace 3
    138     bindsym $mod+Shift+4 move container to workspace 4
    139     bindsym $mod+Shift+5 move container to workspace 5
    140     bindsym $mod+Shift+6 move container to workspace 6
    141     bindsym $mod+Shift+7 move container to workspace 7
    142     bindsym $mod+Shift+8 move container to workspace 8
    143     bindsym $mod+Shift+9 move container to workspace 9
    144     bindsym $mod+Shift+0 move container to workspace 10
    145     # Note: workspaces can have any name you want, not just numbers.
    146     # We just use 1-10 as the default.
    147 #
    148 # Layout stuff:
    149 #
    150     # You can "split" the current object of your focus with
    151     # $mod+b or $mod+v, for horizontal and vertical splits
    152     # respectively.
    153     bindsym $mod+b splith
    154     bindsym $mod+v splitv
    155 
    156     # Switch the current container between different layout styles
    157     bindsym $mod+s layout stacking
    158     bindsym $mod+w layout tabbed
    159     bindsym $mod+e layout toggle split
    160 
    161     # Make the current focus fullscreen
    162     bindsym $mod+f fullscreen
    163 
    164     # Toggle the current focus between tiling and floating mode
    165     bindsym $mod+Shift+space floating toggle
    166 
    167     # Swap focus between the tiling area and the floating area
    168     bindsym $mod+space focus mode_toggle
    169 
    170     # Move focus to the parent container
    171     bindsym $mod+a focus parent
    172 #
    173 # Scratchpad:
    174 #
    175     # Sway has a "scratchpad", which is a bag of holding for windows.
    176     # You can send windows there and get them back later.
    177 
    178     # Move the currently focused window to the scratchpad
    179     bindsym $mod+Shift+minus move scratchpad
    180 
    181     # Show the next scratchpad window or hide the focused scratchpad window.
    182     # If there are multiple scratchpad windows, this command cycles through them.
    183     bindsym $mod+minus scratchpad show
    184 #
    185 # Resizing containers:
    186 #
    187 mode "resize" {
    188     # left will shrink the containers width
    189     # right will grow the containers width
    190     # up will shrink the containers height
    191     # down will grow the containers height
    192     bindsym $left resize shrink width 10px
    193     bindsym $down resize grow height 10px
    194     bindsym $up resize shrink height 10px
    195     bindsym $right resize grow width 10px
    196 
    197     # Ditto, with arrow keys
    198     bindsym Left resize shrink width 10px
    199     bindsym Down resize grow height 10px
    200     bindsym Up resize shrink height 10px
    201     bindsym Right resize grow width 10px
    202 
    203     # Return to default mode
    204     bindsym Return mode "default"
    205     bindsym Escape mode "default"
    206 }
    207 bindsym $mod+r mode "resize"
    208 
    209 #
    210 # Status Bar:
    211 #
    212 # Read `man 5 sway-bar` for more information about this section.
    213 bar {
    214     position top
    215 
    216     # When the status_command prints a new line to stdout, swaybar updates.
    217     # The default just shows the current date and time.
    218     status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done
    219 
    220     colors {
    221         statusline #ffffff
    222         background #323232
    223         inactive_workspace #32323200 #32323200 #5c5c5c
    224     }
    225 }
    226 
    227 include /etc/sway/config.d/*