2020-09-14 10:18:35 +02:00
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Variables
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
set $mod Mod4
|
2020-09-19 18:02:15 +02:00
|
|
|
|
set $mod2 Mod1
|
|
|
|
|
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
2020-09-16 21:26:46 +02:00
|
|
|
|
set $color_bg_focused #2F343F
|
|
|
|
|
set $color_bg_unfocused #383C4A
|
|
|
|
|
set $color_fg_unfocused #D3DAE3
|
|
|
|
|
set $color_fg_focused #FFFFFF
|
|
|
|
|
set $color_indicator #4DADD4
|
|
|
|
|
set $color_warn #F27835
|
|
|
|
|
set $color_error #FC4138
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
2020-09-19 13:41:22 +02:00
|
|
|
|
set $font_family Roboto
|
|
|
|
|
set $font_size 14
|
|
|
|
|
set $gtk_font_size 11
|
|
|
|
|
set $font $font_family $font_size
|
2020-09-19 13:11:50 +02:00
|
|
|
|
set $background $HOME/.backgrounds/mountain.jpg
|
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Device specific include
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# This needs to set the following variables and additionally can override any of the above variables:
|
|
|
|
|
# $primary_monitor_identifier - Identifier of the primary monitor
|
|
|
|
|
# $primary_monitor_resolution - Resolution for the primary monitor
|
|
|
|
|
# $primary_monitor_scale - Scale factor for thr primary monitor
|
|
|
|
|
# $secondary_monitor_x_offset - X offset for the secondary monitor
|
|
|
|
|
# $audio_out - Name of the audio drain to be controlled by shortcuts
|
|
|
|
|
# $audio_in - Name of the audio source to be controlled by shortcuts
|
|
|
|
|
|
|
|
|
|
include config.local
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
2020-09-14 12:40:03 +02:00
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Inputs
|
|
|
|
|
# ------------------------------------------------------------------------------
|
2020-09-14 10:18:35 +02:00
|
|
|
|
input * {
|
2020-09-14 12:40:03 +02:00
|
|
|
|
xkb_layout "de,us"
|
|
|
|
|
xkb_variant "nodeadkeys,"
|
|
|
|
|
xkb_options grp:win_space_toggle
|
2020-09-14 10:18:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
2020-09-15 12:37:21 +02:00
|
|
|
|
input 9011:26214:ydotoold_virtual_device {
|
|
|
|
|
xkb_layout "us"
|
|
|
|
|
xkb_variant ""
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-14 12:40:03 +02:00
|
|
|
|
input 9456:311:Metadot_-_Das_Keyboard_Das_Keyboard_Model_S xkb_model "pc105"
|
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Outputs
|
|
|
|
|
# ------------------------------------------------------------------------------
|
2020-09-16 17:41:37 +02:00
|
|
|
|
output $primary_monitor_identifier pos 0 0 res $primary_monitor_resolution scale $primary_monitor_scale
|
|
|
|
|
output DP-3 pos $secondary_monitor_x_offset 0 res 1920x1200
|
2020-09-14 15:53:25 +02:00
|
|
|
|
|
2020-09-19 13:11:50 +02:00
|
|
|
|
output * bg $background fill
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
2020-09-16 17:41:37 +02:00
|
|
|
|
bindswitch --reload --locked lid:on output $primary_monitor_identifier disable
|
|
|
|
|
bindswitch --reload --locked lid:off output $primary_monitor_identifier enable
|
2020-09-14 15:53:25 +02:00
|
|
|
|
|
2020-09-14 10:18:35 +02:00
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Font
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
font pango:$font
|
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Launcher
|
|
|
|
|
# ------------------------------------------------------------------------------
|
2020-09-19 18:02:15 +02:00
|
|
|
|
bindsym $mod+d exec rofi -show drun
|
|
|
|
|
bindsym $mod+x exec rofi -show run
|
|
|
|
|
bindsym $mod+o exec rofi-pass
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Window management
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# terminate the active window
|
|
|
|
|
bindsym $mod+Shift+q kill
|
|
|
|
|
|
|
|
|
|
# floating modifier
|
|
|
|
|
floating_modifier $mod
|
|
|
|
|
|
|
|
|
|
# change focus
|
|
|
|
|
bindsym $mod+j focus left
|
|
|
|
|
bindsym $mod+k focus down
|
|
|
|
|
bindsym $mod+l focus up
|
|
|
|
|
bindsym $mod+odiaeresis focus right
|
|
|
|
|
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+j move left
|
|
|
|
|
bindsym $mod+Shift+k move down
|
|
|
|
|
bindsym $mod+Shift+l move up
|
|
|
|
|
bindsym $mod+Shift+odiaeresis move right
|
|
|
|
|
bindsym $mod+Shift+Left move left
|
|
|
|
|
bindsym $mod+Shift+Down move down
|
|
|
|
|
bindsym $mod+Shift+Up move up
|
|
|
|
|
bindsym $mod+Shift+Right move right
|
|
|
|
|
|
|
|
|
|
# split in horizontal orientation
|
|
|
|
|
bindsym $mod+h split h
|
|
|
|
|
|
|
|
|
|
# split in vertical orientation
|
|
|
|
|
bindsym $mod+v split v
|
|
|
|
|
|
|
|
|
|
# enter fullscreen mode for the focused container
|
|
|
|
|
bindsym $mod+f fullscreen toggle
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
# change focus between tiling / floating windows
|
|
|
|
|
bindsym $mod+space focus mode_toggle
|
|
|
|
|
|
|
|
|
|
# focus the parent container
|
|
|
|
|
bindsym $mod+a focus parent
|
|
|
|
|
|
|
|
|
|
# focus the child container
|
2020-09-17 17:48:06 +02:00
|
|
|
|
bindsym $mod+y focus child
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
|
|
# resize window (you can also use the mouse for that)
|
2020-09-17 17:27:29 +02:00
|
|
|
|
mode resize {
|
2020-09-14 10:18:35 +02:00
|
|
|
|
# These bindings trigger as soon as you enter the resize mode
|
|
|
|
|
|
|
|
|
|
# Pressing left will shrink the window’s width.
|
|
|
|
|
# Pressing right will grow the window’s width.
|
|
|
|
|
# Pressing up will shrink the window’s height.
|
|
|
|
|
# Pressing down will grow the window’s height.
|
|
|
|
|
bindsym j resize shrink width 10 px or 10 ppt
|
|
|
|
|
bindsym k resize grow height 10 px or 10 ppt
|
|
|
|
|
bindsym l resize shrink height 10 px or 10 ppt
|
|
|
|
|
bindsym odiaeresis resize grow width 10 px or 10 ppt
|
|
|
|
|
|
|
|
|
|
# same bindings, but for the arrow keys
|
|
|
|
|
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
|
2020-09-17 17:27:29 +02:00
|
|
|
|
bindsym Return mode default
|
|
|
|
|
bindsym Escape mode default
|
|
|
|
|
bindsym $mod+r mode default
|
2020-09-14 10:18:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
2020-09-17 17:27:29 +02:00
|
|
|
|
bindsym $mod+r mode resize
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Workspaces
|
|
|
|
|
# ------------------------------------------------------------------------------
|
2020-09-15 05:33:42 +02:00
|
|
|
|
set $workspace1 "1:"
|
|
|
|
|
set $workspace2 "2:"
|
|
|
|
|
set $workspace3 "3:"
|
|
|
|
|
set $workspace4 "4:"
|
|
|
|
|
set $workspace5 "5:"
|
|
|
|
|
set $workspace6 "6:"
|
|
|
|
|
set $workspace7 "7:…"
|
2020-09-19 01:03:44 +02:00
|
|
|
|
set $workspace8 "8"
|
|
|
|
|
set $workspace9 "9"
|
|
|
|
|
set $workspace10 "10"
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
|
|
# switch to workspace
|
|
|
|
|
bindsym $mod+1 workspace $workspace1
|
|
|
|
|
bindsym $mod+2 workspace $workspace2
|
|
|
|
|
bindsym $mod+3 workspace $workspace3
|
|
|
|
|
bindsym $mod+4 workspace $workspace4
|
|
|
|
|
bindsym $mod+5 workspace $workspace5
|
|
|
|
|
bindsym $mod+6 workspace $workspace6
|
|
|
|
|
bindsym $mod+7 workspace $workspace7
|
2020-09-19 01:03:44 +02:00
|
|
|
|
bindsym $mod+8 workspace $workspace8
|
|
|
|
|
bindsym $mod+9 workspace $workspace9
|
|
|
|
|
bindsym $mod+0 workspace $workspace10
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
|
|
# move focused container to workspace
|
|
|
|
|
bindsym $mod+Shift+1 move container to workspace $workspace1
|
|
|
|
|
bindsym $mod+Shift+2 move container to workspace $workspace2
|
|
|
|
|
bindsym $mod+Shift+3 move container to workspace $workspace3
|
|
|
|
|
bindsym $mod+Shift+4 move container to workspace $workspace4
|
|
|
|
|
bindsym $mod+Shift+5 move container to workspace $workspace5
|
|
|
|
|
bindsym $mod+Shift+6 move container to workspace $workspace6
|
|
|
|
|
bindsym $mod+Shift+7 move container to workspace $workspace7
|
2020-09-19 01:03:44 +02:00
|
|
|
|
bindsym $mod+Shift+8 move container to workspace $workspace8
|
|
|
|
|
bindsym $mod+Shift+9 move container to workspace $workspace9
|
|
|
|
|
bindsym $mod+Shift+0 move container to workspace $workspace10
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
|
|
# move current workspace to output
|
2020-09-19 18:02:15 +02:00
|
|
|
|
bindsym $mod+$mod2+Right move workspace to output right
|
|
|
|
|
bindsym $mod+$mod2+Left move workspace to output left
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
2020-09-14 11:40:38 +02:00
|
|
|
|
# sway management
|
2020-09-14 10:18:35 +02:00
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# reload the configuration file
|
|
|
|
|
bindsym $mod+Shift+c reload
|
|
|
|
|
|
2020-09-14 11:40:38 +02:00
|
|
|
|
# exit sway (logs you out of your Wayland session)
|
|
|
|
|
bindsym $mod+Shift+e exec "swaynag -f 'pango:$font' -t warning -m 'sway beenden?' -b 'Ja' 'swaymsg exit'"
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Program shortcuts
|
|
|
|
|
# ------------------------------------------------------------------------------
|
2020-09-19 18:02:15 +02:00
|
|
|
|
bindsym $mod+Return exec termite
|
|
|
|
|
bindsym $mod+c exec firefox
|
|
|
|
|
bindsym $mod+t exec thunderbird
|
|
|
|
|
bindsym $mod+g exec code
|
|
|
|
|
bindsym XF86Explorer exec thunar
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Audio shortcuts
|
|
|
|
|
# ------------------------------------------------------------------------------
|
2020-09-19 18:02:15 +02:00
|
|
|
|
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume $audio_out +5%
|
|
|
|
|
bindsym XF86AudioLowerVolume exec pactl set-sink-volume $audio_out -5%
|
|
|
|
|
bindsym XF86AudioMute exec pactl set-sink-mute $audio_out toggle
|
|
|
|
|
bindsym XF86AudioMicMute exec pactl set-source-mute $audio_in toggle
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Video shortcuts
|
|
|
|
|
# ------------------------------------------------------------------------------
|
2020-09-19 18:02:15 +02:00
|
|
|
|
bindsym XF86MonBrightnessUp exec xbacklight +10
|
|
|
|
|
bindsym XF86MonBrightnessDown exec xbacklight -10
|
2020-09-15 05:33:42 +02:00
|
|
|
|
|
2020-09-14 10:18:35 +02:00
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Assignment of progrmans to workspaces
|
|
|
|
|
# ------------------------------------------------------------------------------
|
2020-09-14 15:53:25 +02:00
|
|
|
|
assign [app_id="^termite$"] $workspace1
|
|
|
|
|
assign [class="^code-oss$"] $workspace2
|
|
|
|
|
assign [class="^jetbrains-idea$"] $workspace2
|
|
|
|
|
assign [class="^firefox$"] $workspace3
|
2020-09-14 10:18:35 +02:00
|
|
|
|
assign [class="^Thunderbird$"] $workspace4
|
2020-09-14 15:53:25 +02:00
|
|
|
|
assign [app_id="^thunar$"] $workspace5
|
2020-09-19 01:03:44 +02:00
|
|
|
|
assign [class="^Slack$"] $workspace8
|
|
|
|
|
assign [class="^Microsoft Teams - Preview$"] $workspace9
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
2020-09-19 18:02:15 +02:00
|
|
|
|
# Screenshot shortcuts
|
2020-09-14 10:18:35 +02:00
|
|
|
|
# ------------------------------------------------------------------------------
|
2020-09-19 18:02:15 +02:00
|
|
|
|
bindsym Print exec $HOME/.local/bin/swaygrim --focused-output
|
|
|
|
|
bindsym Shift+Print exec $HOME/.local/bin/swaygrim --focused-window
|
|
|
|
|
bindsym $mod+Print exec $HOME/.local/bin/swaygrim --output
|
|
|
|
|
bindsym $mod+Shift+Print exec $HOME/.local/bin/swaygrim --window
|
|
|
|
|
bindsym $mod2+Print exec $HOME/.local/bin/swaygrim --manual
|
|
|
|
|
bindsym $mod+$mod2+Print exec $HOME/.local/bin/swaygrim --all
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Lockscreen
|
|
|
|
|
# ------------------------------------------------------------------------------
|
2020-09-19 18:02:15 +02:00
|
|
|
|
exec swayidle -w \
|
2020-09-14 15:53:25 +02:00
|
|
|
|
timeout 300 'swaylock -f' \
|
|
|
|
|
timeout 600 'swaymsg "output * dpms off"' \
|
|
|
|
|
resume 'swaymsg "output * dpms on"' \
|
|
|
|
|
before-sleep 'swaylock -f'
|
|
|
|
|
|
2020-09-19 18:02:15 +02:00
|
|
|
|
bindsym control+$mod2+l exec swaylock
|
2020-09-14 15:53:25 +02:00
|
|
|
|
|
2020-09-14 10:18:35 +02:00
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Window theming
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# border background text indicator
|
|
|
|
|
client.focused $color_bg_focused $color_bg_focused $color_fg_focused $color_bg_focused
|
|
|
|
|
client.focused_inactive $color_bg_unfocused $color_bg_unfocused $color_fg_unfocused $color_bg_unfocused
|
|
|
|
|
client.unfocused $color_bg_unfocused $color_bg_unfocused $color_fg_unfocused $color_bg_unfocused
|
2020-09-16 21:26:46 +02:00
|
|
|
|
client.urgent $color_bg_unfocused $color_warn $color_fg_focused $color_bg_unfocused
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
|
|
# do not display edge borders
|
2020-09-19 18:02:15 +02:00
|
|
|
|
#hide_edge_borders both
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
|
|
# do not display a titlebar in tiled layout
|
2020-09-19 18:02:15 +02:00
|
|
|
|
default_border none
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
|
|
# gaps
|
|
|
|
|
gaps inner 10
|
|
|
|
|
# gaps outer -5
|
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Workspace bar
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
bar {
|
2020-09-15 05:33:42 +02:00
|
|
|
|
swaybar_command waybar
|
2020-09-14 10:18:35 +02:00
|
|
|
|
}
|
2020-09-16 16:26:09 +02:00
|
|
|
|
|
2020-09-17 02:09:58 +02:00
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Applets
|
|
|
|
|
# ------------------------------------------------------------------------------
|
2020-09-19 18:02:15 +02:00
|
|
|
|
exec nm-applet --indicator
|
2020-09-16 16:26:09 +02:00
|
|
|
|
|
2020-09-17 02:09:58 +02:00
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Notification daemon
|
|
|
|
|
# ------------------------------------------------------------------------------
|
2020-09-19 18:02:15 +02:00
|
|
|
|
exec /usr/bin/mako
|
2020-09-16 16:26:09 +02:00
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# GTK3
|
|
|
|
|
# ------------------------------------------------------------------------------
|
2020-09-17 02:09:58 +02:00
|
|
|
|
set $gnome-schema org.gnome.desktop.interface
|
2020-09-16 16:26:09 +02:00
|
|
|
|
exec_always {
|
|
|
|
|
gsettings set $gnome-schema gtk-theme 'Arc-Darker'
|
|
|
|
|
gsettings set $gnome-schema icon-theme 'Moka'
|
|
|
|
|
gsettings set $gnome-schema cursor-theme 'Adwaita'
|
2020-09-19 13:41:22 +02:00
|
|
|
|
gsettings set $gnome-schema font-name '$font_family $gtk_font_size'
|
2020-09-16 16:26:09 +02:00
|
|
|
|
}
|