You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

384 lines
14 KiB

# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#xwayland disable
set $mod Mod4
set $alt Mod1
set $term foot
font Vulf Mono, FontAwesome 12
bindsym $mod+F7 exec --no-startup-id xset r rate 250 25 && xset b off && setxkbmap -option caps:escape
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec --no-startup-id foot
# kill focused window
bindsym $mod+q kill
# lock screen
bindsym $mod+$alt+s exec swaylock
#exec swayidle -w \
# timeout 600 'swaylock'
exec swayidle -w \
timeout 1200 'swaymsg "output * dpms off"'\
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock --screenshots --clock --indicator --indicator-radius 100 --indicator-thickness 7 --effect-blur 7x5 --effect-vignette 0.5:0.5 --ring-color bb00cc --key-hl-color 880033 --line-color 00000000 --inside-color 00000088 --separator-color 00000000 --grace 2 --fade-in 0.2'
# start rofi (a program launcher)
bindsym XF86LaunchA exec --no-startup-id rofi -show run
bindcode 225 exec --no-startup-id rofi -show run
#bindsym $mod+space exec --no-startup-id rofi -show run
for_window [app_id="^launcher$"] floating enable, sticky enable, resize set 30 ppt 60 ppt, border pixel 10
#set $menu exec alacritty --class=launcher -e sway-launcher-desktop
set $menu rofi -combi-modi drun\,run\,ssh\,emoji\,calc -show combi -modi combi\,run\,ssh\,emoji\,calc -sidebar-mode -show-icons -normal-window
#bindsym $mod+space exec $menu
#
# App launcher mode
#
# This mode let's you quickly lunch an app, bound to a hotkey or the $menu app
# launcher. Default mode switch is $mod+space.
# - pressing $mod+space twice quickly launches $menu
# - pressing $mod+space, then one of the app 'shortcuts' launches the app
# After any actions, the mode resets to default within $appmode_timeout seconds
set $appmode_timeout 1
mode "app" {
bindsym $mod+space exec $menu
bindsym --release $mod+space mode "default"
# Mnemonic: [b]rowser
bindsym b exec MOZ_ENABLE_WAYLAND=1 waterfox-g4
# Mnemonic: [f]ile explorer
bindsym f exec 'io.elementary.files'
# Mnemonic: [F]ile explorer, GUI
bindsym shift+f exec thunar
# Mnemonic: [m]usic
bindsym m exec $term -e bash -ci 'ncmpcpp'
# Mnemonic: [n]otes
bindsym n exec $term -e bash -ci 'notes'
# Mnemonic: [h]ome
bindsym h exec $term -e bash -ci 'home'
# Mnemonic: [o]pen. Opens a quick browser with ripgrep's result
bindsym o exec xdg-open "$(rg --files | rofi -normal-window -dmenu -i)"
# Mnemonic: [p]assword
bindsym p exec bwmenu --auto-lock 604800 -- -normal-window
# Mnemonic: [v]irtual machine
bindsym v exec env QT_QPA_PLATFORM=xcb virtualbox
# Mnemonic: [w]indows 10
bindsym w exec env QT_QPA_PLATFORM=xcb vboxmanage startvm Windows10
# Mnemonic: [a]rch linux
bindsym a exec env QT_QPA_PLATFORM=xcb vboxmanage startvm Arch
# Mnemonix: tmu[x]
bindsym x exec $term -e bash -ci 'tmux-session'
bindsym c exec vscodium --enable-features=UseOzonePlatform --ozone-platform=wayland
#bindsym c exec vscodium
bindsym s exec slack --enable-features=UseOzonePlatform --ozone-platform=wayland
#bindsym s exec slack
bindsym d exec discord
bindsym t exec fluffychat
bindsym Escape mode "default"
}
bindsym $mod+space exec swaymsg mode "app" && sleep $appmode_timeout && swaymsg mode "default"
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# 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
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move 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+d fullscreen
bindsym $mod+$alt+f fullscreen
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+t 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+$alt+space focus mode_toggle
# focus the parent container
bindsym $mod+p focus parent
# focus the child container
bindsym $mod+c focus child
# 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 restart
# 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'"
# 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
bindsym Mod1+Control+Right workspace next
bindsym Mod1+Control+Left workspace prev
workspace_auto_back_and_forth yes
bindsym $mod+z workspace back_and_forth
bindsym $mod+Shift+z move container to workspace back_and_forth
# 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 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
########################
## Custom Keybindings
########################
bindsym $mod+f exec --no-startup-id alacrity -e ranger
bindsym Print exec scrot -s -e 'mv $f ~/Downloads'
bindsym $mod+m move scratchpad
bindsym $mod+n scratchpad show
bindsym $mod+Shift+s sticky toggle
bindsym $mod+Shift+alt+Control+s screenshot
bindsym alt+Shift+Control+s notify-send "test"
# macros
bindsym Control+F4 exec /usr/local/bin/screenshot
bindsym Control+F5 exec /usr/bin/watson stop && exec notify-send "Clocked out!"
bindsym Control+F6 exec notify-send "F6"
bindsym Control+F7 exec notify-send "F7"
bindsym Control+F8 exec notify-send "F8"
bindsym Control+F9 exec notify-send "F9"
bindsym Control+F10 exec notify-send "F10"
bindsym Control+F11 exec notify-send "F11"
bindsym Control+F12 exec notify-send "F12"
# screenshare
bindsym $mod+x exec dmenuscreenshare.sh
#bindsym Control+k exec --no-startup-id echo "core.weechat */buffer_dmenu" >> $(find ~/.weechat -type p)
# Notifications
bindsym $mod+Control+Shift+space exec --no-startup-id makoctl dismiss -a
bindsym $mod+Control+space exec --no-startup-id makoctl dismiss
#########################
## Floating Windows
#########################
for_window [window_role = "pop-up"] floating enable
for_window [window_role = "bubble"] floating enable
for_window [window_role = "dialog"] floating enable
for_window [window_type = "dialog"] floating enable
for_window [window_role = "task_dialog"] floating enable
for_window [window_type = "menu"] floating enable
for_window [app_id = "floating"] floating enable
for_window [class="Android SDK Manager" instance="Android SDK Manager"] floating enable
for_window [class="Cb-exit" instance="cb-exit"] floating enable
for_window [class="Cb-exit" instance="cb-exit"] border none
for_window [class="^Pavucontrol$"] floating enable
for_window [instance="crx_gaedmjdfmmahhbjefcbgaolhhanlaolb"] floating enable
for_window [class="Google-chrome" instance="crx_nckgahadagoaajjgafhacjanaoiihapd"] floating enable
for_window [class="chrome_app_list"] floating enable
for_window [class="Plexamp"] floating enable
for_window [class="blueman-manager"] floating enable
for_window [class="^Bluetooth Devices"] floating enable
# https://github.com/ValveSoftware/steam-for-linux/issues/1040
for_window [class="^Steam$" title="^Friends$"] floating enable
for_window [class="^Steam$" title="Steam - News"] floating enable
for_window [class="^Steam$" title=".* - Chat"] floating enable
for_window [class="^Steam$" title="^Settings$"] floating enable
for_window [class="^Steam$" title=".* - event started"] floating enable
for_window [class="^Steam$" title=".* CD key"] floating enable
for_window [class="^Steam$" title="^Steam - Self Updater$"] floating enable
for_window [class="^Steam$" title="^Screenshot Uploader$"] floating enable
for_window [class="^Steam$" title="^Steam Guard - Computer Authorization Required$"] floating enable
for_window [title="^Steam Keyboard$"] floating enable
for_window [title="Qalculate!"] floating enable
for_window [title="Origin"] floating enable
for_window [title="Firefox Developer Edition - Sharing Indicator"] floating enable
for_window [class="Rofi"] floating enable
# Zoom
for_window [app_id="zoom"] floating enable
for_window [class="^Zoom$"] floating enable
for_window [class="zoom"] floating enable
for_window [class="zoom.real"] floating enable
for_window [class="^zoom$"] floating enable
for_window [app_id="zoom" title="Choose ONE of the audio conference options"] floating enable
for_window [app_id="zoom" title="zoom"] floating enable
for_window [app_id="zoom" title="Zoom Meeting"] floating disable
for_window [title="KJAX_loop.gif - mpv"] floating enable
# Tag xwayland windows with [X]
for_window [shell="xwayland"] title_format "<span>[X] %title゜</span>"
for_window [app_id = "avizo-service"] border pixel 0, sticky toggle
no_focus [app_id="avizo-service"]
###########################
## Assign Workspaces
##########################
assign [class="Slack"] 3
assign [class="Plexamp"] 3
assign [class="Discord"] 3
assign [class="Fluffychat"] 3
assign [class="Telegram"] 3
##########################
## Gaps
##########################
# new_window 1pixel
default_border pixel 0
#Hide border if 1 window
hide_edge_borders both
set $default_gaps_inner 15
set $default_gaps_outer 15
gaps inner $default_gaps_inner
gaps outer $default_gaps_outer
smart_gaps on
# 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 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 semicolon 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
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Resize Containers, Vim-style ($mod+Control+[hjkl])
bindsym $mod+Control+j resize grow height 5 px or 5 ppt
bindsym $mod+Control+k resize shrink height 5 px or 5 ppt
bindsym $mod+Control+l resize grow width 5 px or 5 ppt
bindsym $mod+Control+h resize shrink width 5 px or 5 ppt
bindsym $mod+Control+Up resize grow height 5 px or 5 ppt
bindsym $mod+Control+Down resize shrink height 5 px or 5 ppt
bindsym $mod+Control+Right resize grow width 5 px or 5 ppt
bindsym $mod+Control+Left resize shrink width 5 px or 5 ppt
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
swaybar_command waybar
}
# class border backgr. text indicator child_border
client.focused #FFFFFF #BF360C #fdf6e3 #FF0000 #FFFFFF
client.focused_inactive #073642 #FF9800 #93a1a1 #002b36 #073642
client.unfocused #002b36 #311B92 #586e75 #002b36 #002b36
client.urgent #dc322f #b71c1c #fdf6e3 #dc322f #dc322f
############################
## Displays
############################
#HOME
output HDMI-A-1 pos 0 0 res 3440x1440
output DP-1 pos 0 1440 res 3440x1440@59.999Hz
output DP-2 pos 0 1440 res 3440x1440@59.999Hz
# background images
#output * bg ~/Pictures/Wallpapers/calvin-hobbes-stars.jpg fill
output * bg ~/Pictures/Wallpapers/beach.jpg fill
#bindsym $mod+Shift+m exec --no-startup-id "sway output output DP-1 pos 2880 0 res 1920x1080 && sway ouput DP-2 res 1920x1080"
##############################
## Startup Things
##############################
#exec --no-startup-id pcmanfm -d
#exec --no-startup-id xset r rate 250 25
#exec --no-startup-id xset b off
#exec --no-startup-id setxkbmap -option caps:escape
#exec --no-startup-id nightshift -l 39.0315533:-94.4954291 -d
#exec --no-startup-id setxkbmap -model apple_laptop -layout us -variant dvp
exec --no-startup-id mako
exec --no-startup-id blueman-applet
exec autotiling
exec udiskie
exec wl-paste -t text --watch clipman store
exec avizo-service
#############################
## Media Keys
#############################
bindsym XF86AudioRaiseVolume exec volumectl raise
bindsym XF86AudioLowerVolume exec volumectl lower
bindsym XF86AudioMute exec volumectl mute
bindsym XF86MonBrightnessUp exec --no-startup-id "brightnessctl s +10%; brightnessctl -d gmux_backlight s +10%"
bindsym XF86MonBrightnessDown exec --no-startup-id "brightnessctl s 10%-; brightnessctl -d gmux_backlight s 10%-"
set $gnome-schema org.gnome.desktop.interface
exec_always {
gsettings set $gnome-schema gtk-theme 'Flat-Remix-GTK-Green-Darkest'
gsettings set $gnome-schema icon-theme 'Flat-Remix-Green-Dark'
}
# fix slow launch: exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
include /etc/sway/config.d/*