dotfiles

ref: ebdda171d992ee83085c72b932bb69421c54e917

sway/config


set $mod Mod4
set $hyper Mod4+Control+Shift+Mod1
set $term --no-startup-id gnome-terminal

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below. ISO 10646 = Unicode
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
font pango:Monoid 8

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# start a terminal
bindsym $mod+Return exec $term

# Open a new tab of an existing firefox instance
bindsym $mod+Shift+Delete exec firefox

bindsym $mod+Mod1+Return exec nautilus

bindsym $mod+n workspace next
bindsym $mod+Shift+n workspace prev

bindsym $mod+b workspace back_and_forth

# kill focused window
bindsym $mod+q kill

# start dmenu (a program launcher)
bindsym $mod+d exec rofi -show run

# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
bindsym $mod+Shift+d exec --no-startup-id i3-dmenu-desktop
bindsym $mod+Shift+l exec --no-startup-id swaylock -c 000000 -f

# alternatively, you can use the cursor keys:
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right

# split in horizontal orientation
bindsym $mod+Shift+h split h

# split in vertical orientation
bindsym $mod+v split v

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen

# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split

# toggle tiling / floating
bindsym $mod+Shift+space floating toggle

bindsym $mod+space exec "emacsclient -nc"

# focus the parent container
bindsym $mod+a focus parent

# focus the child container
#bindsym $mod+d focus child

# switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10


# hyper + right hand numpad on the ergodox
bindsym $hyper+m workspace number 1
bindsym $hyper+w workspace number 2
bindsym $hyper+v workspace number 3
bindsym $hyper+h workspace number 4
bindsym $hyper+t workspace number 5
bindsym $hyper+n workspace number 6
bindsym $hyper+g workspace number 7
bindsym $hyper+c workspace number 8
bindsym $hyper+r workspace number 9
bindsym $hyper+l workspace number 10

bindsym $hyper+d focus left
bindsym $hyper+s focus right

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10

# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r reload
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"

bindsym $mod+o move workspace to output left
bindsym $mod+p move workspace to output right

mode "resize" {
        # These bindings trigger as soon as you enter the resize mode

        bindsym j resize shrink width 5 px or 5 ppt
        bindsym k resize grow height 5 px or 5 ppt
        bindsym l resize shrink height 5 px or 5 ppt
        bindsym semicolon resize grow width 5 px or 5 ppt

        # back to normal: Enter or Escape
        bindsym Return mode "default"
        bindsym Escape mode "default"
}

# class                 border  backgr. text    indicator child_border
client.focused          #333333 #333333 #ffffff #2e9ef4   #285577
default_border none


bindsym $mod+r mode "resize"

bindsym $mod+i exec $term -e htop

bindsym Print exec ~/dotfiles/bin/take-screenshot
bindsym $hyper+u exec ~/dotfiles/bin/take-screenshot

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
        position top
        # swaybar_command waybar
        status_command i3status -c ~/.i3/i3status.conf | ~/.i3/i3status.py
        # status_command ~/bin/i3status-rs ~/dotfiles/i3/i3bar.toml
        font pango:Monoid 8

        # Explicitly disable the icon tray (network, dropbox, etc) because it
        # doesn't work with old icons yet, and just displays a red sad face
        tray_output none
}

bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+ unmute
bindsym XF86AudioLowerVolume exec amixer -q set Master 5%- unmute
bindsym Shift+XF86AudioRaiseVolume exec pactl set-sink-volume 0 150%
bindsym Shift+XF86AudioLowerVolume exec pactl set-sink-volume 0 50%
bindsym XF86AudioMute exec amixer -q set Master toggle

bindsym XF86MonBrightnessUp exec /bin/brightnessctl set +10%
bindsym XF86MonBrightnessDown exec /bin/brightnessctl set 10%-

focus_follows_mouse no

# In order for dropbox to work two things need to be installed:
#   1.  The ~/.dropbox-dist directory
#   2.  The dropbox.py script from the dropbox website
exec dropbox 'start'

# applets are useless because swaybar doesn't support old icons
# you can use nmcli instead
# exec nm-applet

# keyboard doesn't work with wayland because it contains x11-specific settings
# exec keyboard

# mako gives you notifications (it's a dunst replacement)
exec_always  mako

# For the built-in laptop keyboard, turn capslock into ctrl
input 1:1:AT_Translated_Set_2_keyboard {

  # ------ WARNING ------
  # Do not set this to "cs", it's a Russian keyboard
  # Use "cz" for the Czech keyboard
  #
  xkb_layout us
  xkb_options ctrl:nocaps
}

exec_always swayidle -w \
    timeout 600 'swaymsg "output * dpms off"' \
    resume 'swaymsg "output * dpms on"'