dotfiles

my shiny new dotfiles
git clone git://git.jakekoroman.com/dotfiles
Log | Files | Refs | README

config (7126B)


      1 ### Variables
      2 #
      3 # Logo key. Use Mod1 for Alt.
      4 set $mod Mod4
      5 
      6 # Home row direction keys, like vim
      7 set $left h
      8 set $down j
      9 set $up k
     10 set $right l
     11 
     12 # Your preferred terminal emulator
     13 set $term foot
     14 
     15 # Your preferred application launcher
     16 # Note: pass the final command to swaymsg so that the resulting window can be opened
     17 # on the original workspace that the command was run on.
     18 set $menu dmenu_path | bemenu | xargs swaymsg exec --
     19 
     20 include /etc/sway/config-vars.d/*
     21 
     22 include ./hardware-specific-config
     23 
     24 exec dbus-update-activation-environment WAYLAND_DISPLAY
     25 
     26 ### Key bindings
     27 #
     28 # Basics:
     29 #
     30     # Start a terminal
     31     bindsym $mod+Return exec $term
     32 
     33     # launch browser
     34     bindsym $mod+b exec firefox
     35 
     36     # bookmark script
     37     bindsym $mod+Shift+b exec bookmarks
     38 
     39     # ssh-client script
     40     bindsym $mod+Shift+Return exec sshmenu
     41 
     42     # rdp-client script
     43     bindsym $mod+Shift+r exec rdpmenu
     44 
     45     # emacs
     46     bindsym $mod+e exec emacs
     47 
     48     # email
     49     bindsym $mod+m exec foot -e neomutt
     50 
     51     # lf
     52     bindsym $mod+f exec foot -e lf
     53 
     54     # newsboat
     55     bindsym $mod+n exec foot -e newsboat
     56 
     57     # pavucontrol
     58     bindsym $mod+F1 exec pavucontrol
     59 
     60     # launch pcmanfm
     61     bindsym $mod+F2 exec pcmanfm
     62 
     63     # toggle audio loopback
     64     bindsym $mod+F12 exec audio_loopback
     65 
     66     # screenshot
     67     bindsym $mod+s exec grimshot copy area
     68     bindsym $mod+Shift+s exec grimshot save area - | swappy -f -
     69 
     70     # passmenu
     71     bindsym $mod+p exec passmenu-otp
     72 
     73     # lock screen
     74     bindsym $mod+Delete exec --no-startup-id "swaylock -f -c 181818"
     75 
     76     # Kill focused window
     77     bindsym $mod+Shift+c kill
     78 
     79     # Start your launcher
     80     bindsym $mod+d exec j4-dmenu-desktop --dmenu="bemenu -i" --term="foot"
     81     bindsym $mod+Shift+d exec $menu
     82 
     83     # Audio binds
     84     bindsym XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
     85     bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-
     86     bindsym XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+
     87 
     88     bindsym XF86AudioPlay exec playerctl play-pause
     89 
     90     # Brightness
     91     bindsym XF86MonBrightnessUp exec brightness up
     92     bindsym XF86MonBrightnessDown exec brightness down
     93 
     94     # Drag floating windows by holding down $mod and left mouse button.
     95     # Resize them with right mouse button + $mod.
     96     # Despite the name, also works for non-floating windows.
     97     # Change normal to inverse to use left mouse button for resizing and right
     98     # mouse button for dragging.
     99     floating_modifier $mod normal
    100 
    101     # toggle bar
    102     bindsym $mod+comma bar mode toggle
    103 
    104     # Reload the configuration file
    105     bindsym $mod+Control+r reload
    106 
    107     # Exit sway (logs you out of your Wayland session)
    108     bindsym $mod+Control+q 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'
    109 
    110 #
    111 # Moving around:
    112 #
    113     # Move your focus around
    114     bindsym $mod+$left focus left
    115     bindsym $mod+$down focus down
    116     bindsym $mod+$up focus up
    117     bindsym $mod+$right focus right
    118     # Or use $mod+[up|down|left|right]
    119     bindsym $mod+Left focus left
    120     bindsym $mod+Down focus down
    121     bindsym $mod+Up focus up
    122     bindsym $mod+Right focus right
    123 
    124     # Move the focused window with the same, but add Shift
    125     bindsym $mod+Shift+$left move left
    126     bindsym $mod+Shift+$down move down
    127     bindsym $mod+Shift+$up move up
    128     bindsym $mod+Shift+$right move right
    129     # Ditto, with arrow keys
    130     bindsym $mod+Shift+Left move left
    131     bindsym $mod+Shift+Down move down
    132     bindsym $mod+Shift+Up move up
    133     bindsym $mod+Shift+Right move right
    134 #
    135 # Workspaces:
    136 #
    137     # Switch to workspace
    138     bindsym $mod+1 workspace number 1
    139     bindsym $mod+2 workspace number 2
    140     bindsym $mod+3 workspace number 3
    141     bindsym $mod+4 workspace number 4
    142     bindsym $mod+5 workspace number 5
    143     bindsym $mod+6 workspace number 6
    144     bindsym $mod+7 workspace number 7
    145     bindsym $mod+8 workspace number 8
    146     bindsym $mod+9 workspace number 9
    147     bindsym $mod+0 workspace number 10
    148     # Move focused container to workspace
    149     bindsym $mod+Shift+1 move container to workspace number 1
    150     bindsym $mod+Shift+2 move container to workspace number 2
    151     bindsym $mod+Shift+3 move container to workspace number 3
    152     bindsym $mod+Shift+4 move container to workspace number 4
    153     bindsym $mod+Shift+5 move container to workspace number 5
    154     bindsym $mod+Shift+6 move container to workspace number 6
    155     bindsym $mod+Shift+7 move container to workspace number 7
    156     bindsym $mod+Shift+8 move container to workspace number 8
    157     bindsym $mod+Shift+9 move container to workspace number 9
    158     bindsym $mod+Shift+0 move container to workspace number 10
    159     # Note: workspaces can have any name you want, not just numbers.
    160     # We just use 1-10 as the default.
    161 #
    162 # Layout stuff:
    163 #
    164     # toggle split orientation
    165     bindsym $mod+v split t
    166 
    167     bindsym $mod+Tab layout toggle tabbed split
    168 
    169     workspace_layout tabbed
    170 
    171     # Make the current focus fullscreen
    172     bindsym $mod+Shift+f fullscreen
    173 
    174     # Toggle the current focus between tiling and floating mode
    175     bindsym $mod+Shift+space floating toggle
    176 
    177     # Swap focus between the tiling area and the floating area
    178     bindsym $mod+space focus mode_toggle
    179 
    180     # Move focus to the parent container
    181     bindsym $mod+a focus parent
    182 
    183     for_window [class="steam" title="Friends List"] floating enable
    184     for_window [instance="xfreerdp" title="FreeRDP: mhexch13"] floating enable
    185     for_window [instance="xfreerdp" title="FreeRDP: mhshare"] floating enable
    186     for_window [instance="xfreerdp" title="FreeRDP: mh-as2new"] floating enable
    187 #
    188 # Scratchpad:
    189 #
    190     # Sway has a "scratchpad", which is a bag of holding for windows.
    191     # You can send windows there and get them back later.
    192 
    193     # Move the currently focused window to the scratchpad
    194     bindsym $mod+Shift+minus move scratchpad
    195 
    196     # Show the next scratchpad window or hide the focused scratchpad window.
    197     # If there are multiple scratchpad windows, this command cycles through them.
    198     bindsym $mod+minus scratchpad show
    199 #
    200 # Resizing containers:
    201 #
    202 mode "resize" {
    203     # left will shrink the containers width
    204     # right will grow the containers width
    205     # up will shrink the containers height
    206     # down will grow the containers height
    207     bindsym $left resize shrink width 10px
    208     bindsym $down resize grow height 10px
    209     bindsym $up resize shrink height 10px
    210     bindsym $right resize grow width 10px
    211 
    212     # Ditto, with arrow keys
    213     bindsym Left resize shrink width 10px
    214     bindsym Down resize grow height 10px
    215     bindsym Up resize shrink height 10px
    216     bindsym Right resize grow width 10px
    217 
    218     # Return to default mode
    219     bindsym Return mode "default"
    220     bindsym Escape mode "default"
    221 }
    222 bindsym $mod+r mode "resize"
    223 
    224 #
    225 # Status Bar:
    226 #
    227 # Read `man 5 sway-bar` for more information about this section.
    228 bar {
    229     position bottom
    230     tray_output eDP-1
    231 
    232     # When the status_command prints a new line to stdout, swaybar updates.
    233     # The default just shows the current date and time.
    234     status_command i3status
    235 }
    236 
    237 include /etc/sway/config.d/*