-
-
Save plattfot/dd7451ab6b6912b50b53caed7fe4b913 to your computer and use it in GitHub Desktop.
Sway config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set $mod Mod4 | |
exec mako | |
exec swayidle -w \ | |
timeout 600 'swaymsg "output * dpms off"' \ | |
resume 'swaymsg "output * dpms on"' \ | |
timeout 300 'swaylock -f -c 000000' \ | |
before-sleep 'swaylock -f -c 000000' | |
exec ydotoold | |
include config.d/input.conf | |
include config.d/output.conf | |
include config.d/`hostname`/output.conf | |
include config.d/settings.conf | |
include config.d/keybindings.conf | |
include config.d/mode_launcher.conf | |
include config.d/`hostname`/keybindings.conf | |
include config.d/resize.conf | |
include config.d/bar.conf | |
# You may want this: | |
# | |
# include ~/.config/sway/conf.d/* | |
# | |
# Protip: | |
# | |
# include ~/.config/sway/`hostname`/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Read `man 5 sway-bar` for more information about this section. | |
bar { | |
swaybar_command waybar | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input * { | |
xkb_layout us,se | |
xkb_options grp:sclk_toggle,grp_led:scroll,:2,compose:ralt | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start a terminal | |
bindsym $mod+Shift+Return exec alacritty | |
# start a web browser | |
bindsym $mod+Return exec firefox | |
# kill focused window | |
bindsym $mod+Shift+c kill | |
# start dmenu (a program launcher) | |
bindsym $mod+p exec rofi -show drun | |
# start rofi menu for pass | |
bindsym $mod+o exec rofi-pass | |
# 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 | |
# alternatively, you can use the cursor keys: | |
bindsym $mod+Left focus left | |
bindsym $mod+Down focus down | |
bindsym $mod+Up focus up | |
bindsym $mod+Right focus right | |
# alternatively, you can use the cursor 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 | |
# 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 | |
# change container layout (stacked, tabbed, toggle split) | |
bindsym $mod+a layout tabbed | |
bindsym $mod+s layout stacking | |
bindsym $mod+d layout toggle split | |
# take a screen shot | |
#bindsym Print exec "/home/plattfot/Dropbox/scripts/screenshot.sh" | |
#bindsym $mod+Print exec import -window root /tmp/screenshot-$(date +%F_%H%M%S_%N).png | |
# 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+n focus parent | |
# focus the child container | |
bindsym $mod+m focus child | |
# Move focus to laptop display | |
bindsym $mod+Alt+Left focus output left | |
bindsym $mod+Shift+Alt+Left move container to output left | |
# Move focus to laptop display and move focus of wacom tablet to laptop display | |
bindsym $mod+Alt+Right focus output right | |
bindsym $mod+Shift+Alt+Right move container to output right | |
# 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 | |
# Switch to the previously focused workspace | |
bindsym $mod+b workspace back_and_forth | |
bindsym $mod+greater workspace next | |
bindsym $mod+less workspace prev | |
bindsym $mod+Shift+g mark --add "Mark" | |
bindsym $mod+Shift+e mark --add "Emacs" | |
bindsym $mod+Shift+w mark --add "Web" | |
bindsym $mod+g [con_mark="Mark"] focus | |
bindsym $mod+w [con_mark="Web"] focus | |
bindsym $mod+e [con_mark="Emacs"] focus | |
# 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 | |
# move focused workspace to other monitor | |
bindsym $mod+Ctrl+Left move workspace to output left | |
bindsym $mod+Ctrl+Right move workspace to output right | |
# Make the currently focused window a scratchpad | |
bindsym $mod+Shift+minus move scratchpad | |
# Show the first scratchpad window | |
bindsym $mod+minus scratchpad show | |
# Launch i3-input | |
bindsym $mod+i exec i3-input | |
# reload the configuration file | |
bindsym $mod+Shift+Z reload | |
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) | |
bindsym $mod+q restart | |
# exit i3 (logs you out of your X session) | |
bindsym $mod+Shift+Q 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'" | |
# Lock screen | |
bindsym $mod+Shift+s exec swaylock -f -c 000000 | |
# Volume | |
bindsym --locked XF86AudioRaiseVolume exec pulseaudio-ctl up 1 | |
bindsym --locked XF86AudioLowerVolume exec pulseaudio-ctl down 1 | |
bindsym --locked XF86AudioMute exec pulseaudio-ctl mute | |
# Audio control | |
bindsym --locked XF86AudioNext exec playerctl next | |
bindsym --locked XF86AudioPrev exec playerctl previous | |
bindsym --locked XF86AudioPlay exec playerctl play-pause | |
bindsym XF86Tools exec spotify | |
# Change keyboard layout, 78 = scroll lock | |
#bindcode 78 exec pkill -RTMIN+1 i3blocks | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Extra layer for launching programs | |
set $mode_launcher Launch: [e]macs [m]ail | |
bindsym $mod+Shift+p mode "$mode_launcher" | |
mode "$mode_launcher" { | |
# Start syncing emails | |
bindsym m exec systemctl --user start mbsync.timer; mode "default" | |
bindsym e exec emacs; mode "default" | |
bindsym Escape mode "default" | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
output * bg ~/.config/background fit #000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# resize window (you can also use the mouse for that) | |
mode "resize" { | |
# 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 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 | |
# same bindings, but for the arrow keys | |
bindsym Left resize shrink width 5 px or 5 ppt | |
bindsym Down resize grow height 5 px or 5 ppt | |
bindsym Up resize shrink height 5 px or 5 ppt | |
bindsym Right resize grow width 5 px or 5 ppt | |
# back to normal: Enter or Escape | |
bindsym Return mode "default" | |
bindsym Escape mode "default" | |
} | |
# Active resize mode | |
bindsym $mod+r mode "resize" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
# The font above is very space-efficient, that is, it looks good, sharp and | |
# clear in small sizes. However, if you need a lot of unicode glyphs or | |
# right-to-left text rendering, you should instead use pango for rendering and | |
# chose a FreeType font, such as: | |
font pango:DejaVu Sans Mono 10 | |
# Use Mouse+$mod to drag floating windows to their wanted position | |
floating_modifier $mod | |
# Layout | |
focus_follows_mouse no | |
default_border pixel 2 | |
default_floating_border normal | |
# Jump back to workspace | |
workspace_auto_back_and_forth yes | |
for_window [class="[Ff]irefox"] mark "Web" | |
for_window [class="[Ef]macs"] mark "Emacs" | |
for_window [class="[Ss]potify"] mark "Spotify" | |
for_window [class="mpv"] inhibit_idle visible | |
for_window [class="[Zz]oom"] inhibit_idle visible | |
for_window [class=".*"] inhibit_idle fullscreen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# shutdown computer | |
bindsym $mod+Shift+F4 exec "systemctl poweroff" | |
# restart computer | |
bindsym $mod+Shift+F3 exec "systemctl reboot" | |
# suspend computer | |
bindsym $mod+Shift+F2 exec "systemctl suspend" | |
# Extra layer for launching programs | |
set $toggle_outputs Toggle: [l]eft [r]ight | |
bindsym $mod+Shift+o mode "$toggle_outputs" | |
mode "$toggle_outputs" { | |
bindsym l output $left toggle; mode "default" | |
bindsym r output $right toggle; mode "default" | |
bindsym Escape mode "default" | |
} | |
# Extra layer for changing brightness | |
set $mode_brightness Brightness: [z]ero [n]ight [d]ay [b]right [m]ax | |
bindsym $mod+Shift+l mode "$mode_brightness" | |
mode "$mode_brightness" { | |
bindsym z exec /home/plattfot/bin/brightness --bus 7 --bus 8 -S 0; mode "default" | |
bindsym n exec /home/plattfot/bin/brightness --bus 7 --bus 8 -S 10; mode "default" | |
bindsym d exec /home/plattfot/bin/brightness --bus 7 --bus 8 -S 50; mode "default" | |
bindsym b exec /home/plattfot/bin/brightness --bus 7 --bus 8 -S 80; mode "default" | |
bindsym m exec /home/plattfot/bin/brightness --bus 7 --bus 8 -S 100; mode "default" | |
bindsym Escape mode "default" | |
} | |
bindsym XF86MonBrightnessUp exec /home/plattfot/bin/brightness --bus 7 --bus 8 -A 10; | |
bindsym XF86MonBrightnessDown exec /home/plattfot/bin/brightness --bus 7 --bus 8 -D 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#set $eizo 'Eizo Nanao Corporation HD2441W 28899107' | |
set $left 'Unknown ASUS VG289 0x00009D06' | |
set $right 'Unknown ASUS VG289 0x000085B4' | |
output $left bg ~/.config/background.eizo fit #000000 | |
output $left transform 90 | |
output $left pos 0 0 | |
output $left adaptive_sync on | |
output $right bg ~/.config/background fit #000000 | |
output $right pos 2160 500 | |
output $right adaptive_sync on | |
workspace 1 output $left | |
workspace 2 output $right |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment