Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/fuzzel/fuzzel.ini~esh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
[main]
dpi-aware=no
font=<%= $font_sans %>:size=<%= $font_size_medium %>
<% if [[ $DEPLOY_DISTRO == "arch" ]]; then -%>
use-bold=yes
<% fi -%>
width=72
icons-enabled=no
horizontal-pad=0
Expand Down
2 changes: 1 addition & 1 deletion config/scripts-desktop/spawn-terminal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ if [[ $TERMINAL == "alacritty" ]]; then
terminal_cmd=("alacritty")

if [[ "$floating" = true ]]; then
args+=("--class=floating")
args+=("--class=Alacritty.floating")
args+=("-o window.dimensions.columns=120")
args+=("-o window.dimensions.lines=32")
fi
Expand Down
148 changes: 148 additions & 0 deletions config/sway/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
#-------------------------------------------------------------------------------
# Sway configuration
#
# See the sway(5) and swaymsg(1) man pages for complete documentation.
#-------------------------------------------------------------------------------

# Variables
#-------------------------------------------------------------------------------

set $config_dir $HOME/.config
set $scripts_dir $HOME/.local/scripts

# Input configuration
#-------------------------------------------------------------------------------

# Focus follows cursor
focus_follows_mouse yes

# Keyboard repeat rate
input type:keyboard {
repeat_delay 300
repeat_rate 50
}

# Hide inactive cursor
seat * hide_cursor 3000

# Zowie EC2 sensitivity
input "1189:32769:BenQ_ZOWIE_BenQ_ZOWIE_Gaming_Mouse" {
accel_profile flat
pointer_accel -0.65
}

# Logitech G Pro X Superlight sensitivity
input "1133:50503:Logitech_USB_Receiver" {
accel_profile flat
pointer_accel 0.05
}

# Trackpad sensitivity
input "43256:6199:Bastard_Keyboards_Dilemma_Max_Mouse" {
accel_profile flat
pointer_accel -0.15
}

# Layout configuration
#-------------------------------------------------------------------------------

gaps inner 6
gaps outer -6

default_border pixel 3
default_floating_border pixel 3

smart_gaps on
smart_borders off

# Output configuration
#-------------------------------------------------------------------------------

include $config_dir/sway/outputs.conf

# Workspace configuration
#-------------------------------------------------------------------------------

include $config_dir/sway/workspace.conf

# Startup applications
#-------------------------------------------------------------------------------

# Adjust screen brightness
exec wlsunset -l 52.155472 -L 5.389358

# Clean home
exec $scripts_dir/clean-home.sh

# Theme configuration
#-------------------------------------------------------------------------------

include $config_dir/sway/theme.conf

# Apply wallpaper
exec waypaper --restore &

# Start waybar
exec pkill -x waybar
exec waybar &

# Window rules
#-------------------------------------------------------------------------------

# Floating windows
for_window [app_id="org.gnome.gitlab.somas.Apostrophe"] floating enable
for_window [app_id="blueman-manager"] floating enable
for_window [app_id=".*floating"] floating enable
for_window [app_id="gcr-prompter"] floating enable
for_window [app_id="org.gnome.Nautilus"] floating enable
for_window [app_id="nwg-look"] floating enable
for_window [app_id="org.gnome.seahorse.Application"] floating enable
for_window [app_id="com.transmissionbt.transmission.*"] floating enable
for_window [app_id="transmission-gtk"] floating enable
for_window [app_id="waypaper"] floating enable
for_window [app_id="xdg-desktop-portal-gtk"] floating enable
for_window [app_id="yad"] floating enable
for_window [app_id="nm-connection-editor"] floating enable

# Window sizes
for_window [app_id="blueman-manager"] resize set 800 600
for_window [app_id="org.gnome.Nautilus"] resize set 1024 960
for_window [app_id="nwg-look"] resize set 1024 960
for_window [app_id="org.qutebrowser.qutebrowser"] resize set 1600 1200

# Server-side decorations
for_window [app_id="Alacritty"] border pixel 3
for_window [app_id="org.gnome.gitlab.somas.Apostrophe"] border pixel 3
for_window [app_id="blueman-manager"] border pixel 3
for_window [app_id="chromium"] border pixel 3
for_window [app_id="gcr-viewer"] border pixel 3
for_window [app_id="gcr-prompter"] border pixel 3
for_window [app_id="com.mitchellh.ghostty.*"] border pixel 3
for_window [app_id="gtk-pipe-viewer"] border pixel 3
for_window [app_id="gimp"] border pixel 3
for_window [app_id="imv"] border pixel 3
for_window [app_id="marker"] border pixel 3
for_window [app_id="org.gnome.Nautilus"] border pixel 3
for_window [app_id="nm-connection-editor"] border pixel 3
for_window [app_id="nwg-look"] border pixel 3
for_window [app_id="org.pulseaudio.pavucontrol"] border pixel 3
for_window [app_id="org.gnome.seahorse.Application"] border pixel 3
for_window [app_id="org.gnome.SimpleScan"] border pixel 3
for_window [app_id="com.transmissionbt.transmission.*"] border pixel 3
for_window [app_id="transmission-gtk"] border pixel 3
for_window [app_id="waypaper"] border pixel 3
for_window [app_id="org.wezfurlong.wezterm.*"] border pixel 3
for_window [app_id="xdg-desktop-portal-gtk"] border pixel 3
for_window [app_id="yad"] border pixel 3
for_window [app_id="yad-settings"] border pixel 3
for_window [app_id="org.pwmt.zathura"] border pixel 3

# Key mappings
#-------------------------------------------------------------------------------

include $config_dir/sway/keymaps.conf

# Include system config
#-------------------------------------------------------------------------------

include /etc/sway/config.d/*
14 changes: 14 additions & 0 deletions config/sway/environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
#-------------------------------------------------------------------------------
# Sway environment
#-------------------------------------------------------------------------------

# Set cursor theme path.
export XCURSOR_PATH="/usr/share/icons"

# QT performance flag.
export QT_QPA_PLATFORM=wayland
export QT_SCALE_FACTOR_ROUNDING_POLICY=round

# XDG desktop portal integration.
export XDG_CURRENT_DESKTOP=sway
3 changes: 3 additions & 0 deletions config/sway/init
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

exec sway-run
3 changes: 3 additions & 0 deletions config/sway/init~sway
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

exec sway-run
153 changes: 153 additions & 0 deletions config/sway/keymaps.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
#-------------------------------------------------------------------------------
# Sway key mappings
#
# See sway-bindsym(5) for keysym documentation
#-------------------------------------------------------------------------------

# Mod key
#-------------------------------------------------------------------------------

set $mod Mod4

# System mappings
#-------------------------------------------------------------------------------

# Lock sway
bindsym $mod+Shift+z exec hyprlock

# Exit sway
bindsym $mod+Shift+w exit

# Reload sway configuration
bindsym $mod+Shift+r exec $config_dir/sway/refresh.sh

# Shortcut mappings
#-------------------------------------------------------------------------------

# Run menu
bindsym $mod+Return exec $LAUNCHER

# New terminal
bindsym $mod+t exec spawn-terminal.sh

# New floating terminal
bindsym $mod+g exec spawn-terminal.sh --floating

# New terminal in a directory
bindsym $mod+Shift+t exec open-terminal-cwd.sh

# Browser
bindsym $mod+b exec $BROWSER

# Browser session
bindsym $mod+Shift+b exec open-qutebrowser-session.sh

# Process manager
bindsym $mod+m exec spawn-terminal.sh --command btop

# Toggle waybar
bindsym $mod+r exec toggle-waybar.sh

# Dismiss all notifications
bindsym $mod+y exec makoctl dismiss -a

# Take screenshot of a selected rectangle
bindsym $mod+p exec screenshot-rectangle.sh
bindsym $mod+Shift+p exec screenshot-rectangle.sh --upload

# Window mappings
#-------------------------------------------------------------------------------

# Drag windows with mouse
floating_modifier $mod normal

# Toggle window float
bindsym $mod+Space floating toggle

# Center floating window
bindsym $mod+c move position center

# Toggle window fullscreen
bindsym $mod+f fullscreen toggle

# Close window
bindsym $mod+w kill

# Change focus
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+h focus left
bindsym $mod+l focus right

# Move the focused window up/down
bindsym $mod+Control+j move down
bindsym $mod+Control+k move up

# Move the focused window left/right
bindsym $mod+Control+h move left
bindsym $mod+Control+l move right

# Close window with middle mouse button
bindsym --whole-window $mod+button2 kill

# Resize (floating) window
bindsym $mod+Shift+d resize shrink height 100px
bindsym $mod+Shift+f resize grow height 100px
bindsym $mod+Shift+g resize grow width 200px
bindsym $mod+Shift+s resize shrink width 200px

# Move (floating) window
bindsym $mod+Control+d move up 100px
bindsym $mod+Control+f move down 100px
bindsym $mod+Control+g move right 200px
bindsym $mod+Control+s move left 200px

# Workspace mappings
#-------------------------------------------------------------------------------

# Cycle focused workspaces
bindsym $mod+Shift+h exec sway-workspace prev-on-output
bindsym $mod+Shift+l exec sway-workspace next-on-output

# Focus workspaces numerically (display-aware)
bindsym $mod+1 exec $config_dir/sway/sws.sh focus 1
bindsym $mod+2 exec $config_dir/sway/sws.sh focus 2
bindsym $mod+3 exec $config_dir/sway/sws.sh focus 3
bindsym $mod+4 exec $config_dir/sway/sws.sh focus 4
bindsym $mod+5 exec $config_dir/sway/sws.sh focus 5
bindsym $mod+6 exec $config_dir/sway/sws.sh focus 6
bindsym $mod+7 exec $config_dir/sway/sws.sh focus 7
bindsym $mod+8 exec $config_dir/sway/sws.sh focus 8
bindsym $mod+9 exec $config_dir/sway/sws.sh focus 9
bindsym $mod+0 exec $config_dir/sway/sws.sh focus 10

# Focus special workspaces
bindsym $mod+F1 exec $config_dir/sway/sws.sh focus home
bindsym $mod+F2 exec $config_dir/sway/sws.sh focus work
bindsym $mod+F3 exec $config_dir/sway/sws.sh focus todo
bindsym $mod+F4 exec $config_dir/sway/sws.sh focus spotify

# Send window to workspace (display-aware)
bindsym $mod+Control+1 exec $config_dir/sway/sws.sh move 1
bindsym $mod+Control+2 exec $config_dir/sway/sws.sh move 2
bindsym $mod+Control+3 exec $config_dir/sway/sws.sh move 3
bindsym $mod+Control+4 exec $config_dir/sway/sws.sh move 4
bindsym $mod+Control+5 exec $config_dir/sway/sws.sh move 5
bindsym $mod+Control+6 exec $config_dir/sway/sws.sh move 6
bindsym $mod+Control+7 exec $config_dir/sway/sws.sh move 7
bindsym $mod+Control+8 exec $config_dir/sway/sws.sh move 8
bindsym $mod+Control+9 exec $config_dir/sway/sws.sh move 9
bindsym $mod+Control+0 exec $config_dir/sway/sws.sh move 10

# Send to special workspaces
bindsym $mod+Control+F1 exec $config_dir/sway/sws.sh move home
bindsym $mod+Control+F2 exec $config_dir/sway/sws.sh move work
bindsym $mod+Control+F3 exec $config_dir/sway/sws.sh move todo
bindsym $mod+Control+F4 exec $config_dir/sway/sws.sh move spotify

# Layout mappings
#-------------------------------------------------------------------------------

# Adjust split ratio (resize focused container)
bindsym $mod+Shift+equal resize grow width 5 ppt
bindsym $mod+minus resize shrink width 5 ppt
11 changes: 11 additions & 0 deletions config/sway/outputs.conf~home-dual
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#-------------------------------------------------------------------------------
# Sway output configuration - Dual monitor setup
#
# Based on way-displays configuration:
# - DP-2: Left monitor, rotated 90° clockwise
# - DP-1: Right monitor, normal orientation
#-------------------------------------------------------------------------------

output DP-2 pos 0 0 transform 270

output DP-1 pos 1200 0
14 changes: 14 additions & 0 deletions config/sway/outputs.conf~home-triple
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#-------------------------------------------------------------------------------
# Sway output configuration - Triple monitor setup (supertubes/cyxwel)
#
# Based on way-displays configuration:
# - HDMI-A-6: Left monitor, rotated 90° clockwise
# - DP-3: Center monitor, 2560x1440@240Hz, scaled 1.125
# - DP-4: Right monitor, rotated 90° clockwise
#-------------------------------------------------------------------------------

output HDMI-A-6 pos 0 0 transform 270

output DP-3 pos 1200 0 scale 1.125 mode 2560x1440@240Hz

output DP-4 pos 3475 0 transform 270
11 changes: 11 additions & 0 deletions config/sway/outputs.conf~intelic
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#-------------------------------------------------------------------------------
# Sway output configuration - Intelic laptop setup (vortex)
#
# Based on way-displays configuration:
# - LG ULTRAWIDE: External monitor, 3440x1440@60Hz
# - eDP-1: Laptop display, 2560x1600@120Hz, scaled 1.5
#-------------------------------------------------------------------------------

output "LG Electronics LG ULTRAWIDE 405NTPC4A128" pos 0 0 mode 3440x1440@60Hz

output eDP-1 pos 3440 0 scale 1.5 mode 2560x1600@120Hz
8 changes: 8 additions & 0 deletions config/sway/refresh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
#-------------------------------------------------------------------------------
# Refresh the usual suspects
#-------------------------------------------------------------------------------

swaymsg reload

notify-send "Reloaded sway config."
Loading