Skip to content

Instantly share code, notes, and snippets.

@Dulani
Created July 30, 2026 16:23
Show Gist options
  • Select an option

  • Save Dulani/9a69faeb00d54290ee96565c5b7bb18f to your computer and use it in GitHub Desktop.

Select an option

Save Dulani/9a69faeb00d54290ee96565c5b7bb18f to your computer and use it in GitHub Desktop.
Fedora Sway Custom Desktop Setup: Configs, Dynamic Composited Wallpaper, Dashboard Overlay & Validation
set $lock_timeout 3600
set $screen_timeout 60
# Key bindings for brightness control using `brightnessctl`.
# Displays a notification with the current value if /usr/bin/notify-send is available
#
# Brightness increase/decrease step can be customized by setting the `$brightness_step`
# variable to a numeric value before including the file.
#
# Requires: brightnessctl >= 0.5.1-11
# Recommends: libnotify
set $brightness_notification_cmd command -v notify-send >/dev/null && \
VALUE=$(brightnessctl --percentage get) && \
notify-send -e -h string:x-canonical-private-synchronous:brightness \
-h "int:value:$VALUE" -t 800 "Brightness: ${VALUE}%"
# Allow brightness controls even if the screen is locked
bindsym --locked XF86MonBrightnessDown exec \
'STEP="$brightness_step" && brightnessctl -q set ${STEP:-5}%- && $brightness_notification_cmd'
bindsym --locked XF86MonBrightnessUp exec \
'STEP="$brightness_step" && brightnessctl -q set +${STEP:-5}% && $brightness_notification_cmd'
# User-level swayidle configuration to run hyprlock
# Overrides system-wide /usr/share/sway/config.d/90-swayidle.conf
exec LT="$lock_timeout" ST="$screen_timeout" LT=${LT:-300} ST=${ST:-60} && \
swayidle -w \
timeout $LT 'hyprlock' \
timeout $((LT + ST)) 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'hyprlock' \
lock 'hyprlock' \
after-resume 'swaymsg "output * dpms on"'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sway Dashboard Overlay</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Outfit:wght@300;400;600&family=Syne:wght@600;800&display=swap" rel="stylesheet">
<style>
:root {
--bg-overlay: rgba(12, 12, 16, 0.65);
--bg-panel: rgba(18, 18, 24, 0.75);
--text-main: #f8f9fa;
--text-muted: #a1a1aa;
--accent-color: #cba6f7; /* Mauve */
--accent-glow: rgba(203, 166, 247, 0.3);
--border-color: rgba(255, 255, 255, 0.08);
--font-heading: 'Syne', sans-serif;
--font-body: 'Outfit', sans-serif;
--font-mono: 'JetBrains Mono', monospace;
--spacing-sm: 8px;
--spacing-md: 16px;
--spacing-lg: 24px;
--spacing-xl: 32px;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
background: transparent !important;
}
body {
width: 1920px;
height: 1080px;
overflow: hidden;
font-family: var(--font-body);
color: var(--text-main);
display: flex;
}
/* Layout Grid */
.dashboard-container {
display: grid;
grid-template-columns: 360px 1200px 360px;
width: 100%;
height: 100%;
background: transparent;
}
/* Center Area */
.center-area {
/* Transparent to show the background image clearly */
background: transparent;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: var(--spacing-xl);
}
/* Sidebars */
.sidebar {
background: var(--bg-panel);
backdrop-filter: blur(16px);
border-left: 1px solid var(--border-color);
border-right: 1px solid var(--border-color);
padding: var(--spacing-xl) var(--spacing-lg);
display: flex;
flex-direction: column;
gap: var(--spacing-xl);
overflow-y: auto;
box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}
.sidebar::-webkit-scrollbar {
width: 4px;
}
.sidebar::-webkit-scrollbar-track {
background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
background: var(--border-color);
border-radius: 4px;
}
/* Header */
.header {
text-align: center;
margin-bottom: var(--spacing-md);
position: relative;
}
.header::after {
content: '';
position: absolute;
bottom: -16px;
left: 50%;
transform: translateX(-50%);
width: 40px;
height: 2px;
background: var(--accent-color);
box-shadow: 0 0 10px var(--accent-glow);
}
.header h1 {
font-family: var(--font-heading);
font-size: 28px;
font-weight: 800;
letter-spacing: 1px;
text-transform: uppercase;
background: linear-gradient(135deg, #fff, var(--accent-color));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.header p {
font-size: 12px;
color: var(--text-muted);
margin-top: var(--spacing-sm);
}
/* Sections */
.section {
display: flex;
flex-direction: column;
gap: var(--spacing-md);
}
.section h2 {
font-family: var(--font-heading);
font-size: 16px;
font-weight: 600;
color: var(--accent-color);
text-transform: uppercase;
letter-spacing: 2px;
border-bottom: 1px solid var(--border-color);
padding-bottom: var(--spacing-sm);
}
/* Keybindings Table */
.keybind-list {
display: flex;
flex-direction: column;
gap: 12px;
}
.keybind-item {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 14px;
}
.keybind-desc {
color: var(--text-main);
font-weight: 300;
}
.keybind-keys {
display: flex;
align-items: center;
gap: 6px;
}
kbd {
font-family: var(--font-mono);
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 4px;
padding: 4px 8px;
font-size: 12px;
color: var(--accent-color);
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}
.mod-key {
color: #fff;
background: rgba(203, 166, 247, 0.15);
border-color: rgba(203, 166, 247, 0.3);
}
.plus {
color: var(--text-muted);
font-size: 12px;
}
/* Footer */
.footer {
margin-top: auto;
text-align: center;
font-size: 10px;
color: var(--text-muted);
opacity: 0.5;
}
/* Layout Recipes & Resize Mode specific styles */
.recipe-item {
display: flex;
align-items: center;
gap: 16px;
padding: 8px 0;
border-bottom: 1px solid rgba(255,255,255,0.05);
margin-bottom: 8px;
}
.recipe-visual {
width: 40px;
height: 28px;
display: flex;
gap: 2px;
}
.wire-main { flex: 1; background: #cba6f7; border-radius: 2px; opacity: 0.8; }
.wire-stack { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.wire-top, .wire-bottom { flex: 1; background: rgba(255,255,255,0.2); border-radius: 2px; }
.recipe-name { font-weight: 600; font-size: 13px; margin-bottom: 4px; color: var(--text-main); }
.recipe-sequence { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-muted); }
.recipe-sequence .arrow { margin: 0 4px; color: var(--text-muted); }
.mode-block {
background: rgba(0, 0, 0, 0.2);
border-left: 2px solid #E06C75;
border-radius: 0 4px 4px 0;
padding: 10px;
margin-top: 4px;
}
.mode-header { font-weight: 800; font-size: 11px; color: #E06C75; margin-bottom: 8px; letter-spacing: 1px; }
</style>
</head>
<body>
<div class="dashboard-container">
<!-- LEFT SIDEBAR -->
<div class="sidebar left-sidebar">
<div class="header">
<h1>Sway</h1>
<p>Window Manager Cheatsheet</p>
</div>
<div class="section">
<h2>Basics</h2>
<div class="keybind-list">
<div class="keybind-item">
<span class="keybind-desc">Open new terminal</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>Enter</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Focus left</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>h</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Focus down</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>j</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Focus up</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>k</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Focus right</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>l</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Focus parent</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>a</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Toggle focus mode</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>Space</kbd>
</div>
</div>
</div>
</div>
<div class="section">
<h2>Moving Windows</h2>
<div class="keybind-list">
<div class="keybind-item">
<span class="keybind-desc">Move left</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>Shift</kbd> <span class="plus">+</span> <kbd>h</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Move down</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>Shift</kbd> <span class="plus">+</span> <kbd>j</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Move up</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>Shift</kbd> <span class="plus">+</span> <kbd>k</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Move right</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>Shift</kbd> <span class="plus">+</span> <kbd>l</kbd>
</div>
</div>
</div>
</div>
<div class="section">
<h2>Workspaces</h2>
<div class="keybind-list">
<div class="keybind-item">
<span class="keybind-desc">Switch workspace</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>0-9</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Move window to workspace</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>Shift</kbd> <span class="plus">+</span> <kbd>0-9</kbd>
</div>
</div>
</div>
</div>
<div class="section">
<h2>Layout Recipes</h2>
<div class="recipe-item">
<div class="recipe-visual">
<div class="wire-main"></div>
<div class="wire-stack">
<div class="wire-top"></div>
<div class="wire-bottom"></div>
</div>
</div>
<div class="recipe-details">
<div class="recipe-name">Main + Stack (50/25/25)</div>
<div class="recipe-sequence">
<kbd>Mod</kbd>+<kbd>Enter</kbd> <span class="arrow">→</span>
<kbd>Mod</kbd>+<kbd>v</kbd> <span class="arrow">→</span>
<kbd>Mod</kbd>+<kbd>Enter</kbd>
</div>
</div>
</div>
</div>
</div>
<!-- CENTER AREA -->
<div class="center-area">
<!-- Transparent space for background image to shine through -->
</div>
<!-- RIGHT SIDEBAR -->
<div class="sidebar right-sidebar">
<div class="section">
<h2>Modifying Windows</h2>
<div class="keybind-list">
<div class="keybind-item">
<span class="keybind-desc">Toggle fullscreen</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>f</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Split vertically</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>v</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Split horizontally</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>b</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Enter Resize mode</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>r</kbd>
</div>
</div>
</div>
<div class="mode-block">
<div class="mode-header">RESIZE MODE CONTROLS</div>
<div class="keybind-list">
<div class="keybind-item">
<span class="keybind-desc" style="font-size:12px;">Shrink/Grow window</span>
<div class="keybind-keys">
<kbd>h</kbd> <kbd>j</kbd> <kbd>k</kbd> <kbd>l</kbd> <span style="font-size:10px; color:#a1a1aa;">or</span> <kbd>Arrows</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc" style="font-size:12px;">Exit mode</span>
<div class="keybind-keys">
<kbd>Esc</kbd> <span style="font-size:10px; color:#a1a1aa;">or</span> <kbd>Enter</kbd>
</div>
</div>
</div>
</div>
</div>
<div class="section">
<h2>Container Layout</h2>
<div class="keybind-list">
<div class="keybind-item">
<span class="keybind-desc">Default (toggle v/h)</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>e</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Stacking</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>s</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Tabbed</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>w</kbd>
</div>
</div>
</div>
</div>
<div class="section">
<h2>Floating</h2>
<div class="keybind-list">
<div class="keybind-item">
<span class="keybind-desc">Toggle floating</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>Shift</kbd> <span class="plus">+</span> <kbd>Space</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Drag floating</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>Mouse Drag</kbd>
</div>
</div>
</div>
</div>
<div class="section">
<h2>System & Apps</h2>
<div class="keybind-list">
<div class="keybind-item">
<span class="keybind-desc">App launcher (dmenu)</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>d</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Kill window</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>Shift</kbd> <span class="plus">+</span> <kbd>q</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Reload config</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>Shift</kbd> <span class="plus">+</span> <kbd>c</kbd>
</div>
</div>
<div class="keybind-item">
<span class="keybind-desc">Exit Sway</span>
<div class="keybind-keys">
<kbd class="mod-key">Mod</kbd> <span class="plus">+</span> <kbd>Shift</kbd> <span class="plus">+</span> <kbd>e</kbd>
</div>
</div>
</div>
</div>
<div class="footer">
<p>Based on official Sway documentation.</p>
</div>
</div>
</div>
</body>
</html>
#!/bin/bash
LOG_FILE="/tmp/rotate-wallpaper.log"
exec > >(tee -a "$LOG_FILE") 2>&1
echo "======================================"
echo "[$(date)] Starting wallpaper rotation"
# 1. Select random wallpaper
WALL="/tmp/current-unsplash-wallpaper.jpg"
echo "Attempting to fetch random wallpaper from internet..."
if curl -s -L -f "https://picsum.photos/1920/1080" -o "$WALL"; then
echo "Successfully downloaded wallpaper."
else
echo "WARNING: Failed to download wallpaper. Falling back to local directory."
if [ ! -d "$HOME/.config/wallpapers" ]; then
echo "ERROR: Wallpapers directory not found!"
exit 1
fi
WALL=$(find ~/.config/wallpapers -type f | shuf -n1)
if [ -z "$WALL" ]; then
echo "ERROR: No wallpapers found in ~/.config/wallpapers"
exit 1
fi
fi
echo "Selected wallpaper: $WALL"
# Debugging: Show the hash of the file being used to verify the composite is unique
echo "Wallpaper hash: $(md5sum "$WALL" | cut -d' ' -f1)"
# 2. Render the HTML to a temporary image (using X11 to prevent Wayland headless crash)
RAW_SCREENSHOT="/tmp/raw-dashboard.png"
TEMP_PROFILE=$(mktemp -d)
echo "Running firefox headless..."
XDG_SESSION_TYPE=x11 MOZ_ENABLE_WAYLAND=0 firefox --headless --profile "$TEMP_PROFILE" --screenshot "$RAW_SCREENSHOT" --window-size=1920,1080 file:///home/dulani/fedora_sway_spin/dashboard-overlay.html
rm -rf "$TEMP_PROFILE"
# 3. Punch a transparent hole in the middle (360px to 1560px) where the wallpaper goes
OVERLAY="$HOME/.config/sway/dashboard-rendered.png"
if [ -f "$RAW_SCREENSHOT" ]; then
echo "Creating overlay..."
magick "$RAW_SCREENSHOT" \( -size 1200x1080 xc:black \) -geometry +360+0 -compose DstOut -composite "$OVERLAY"
else
echo "WARNING: Failed to generate $RAW_SCREENSHOT"
fi
COMPOSITE_PNG="/tmp/sway-composite-bg.png"
# 4. Generate the composite image
echo "Compositing final image..."
if [ -f "$OVERLAY" ]; then
magick "$WALL" -resize 1920x1080^ -gravity center -extent 1920x1080 /tmp/bg-base.jpg || { echo "ERROR: bg-base generation failed"; exit 1; }
magick /tmp/bg-base.jpg "$OVERLAY" -background none -compose over -composite "$COMPOSITE_PNG" || { echo "ERROR: Final composite failed"; exit 1; }
else
echo "WARNING: Overlay missing, using raw wallpaper"
cp "$WALL" "$COMPOSITE_PNG"
fi
if [ ! -s "$COMPOSITE_PNG" ]; then
echo "ERROR: Composite PNG is empty or missing"
exit 1
fi
# Use swaymsg to set wallpaper on all outputs
swaymsg output "*" bg "$COMPOSITE_PNG" fill
echo "Wallpaper set successfully via swaymsg."
echo "[$(date)] Rotation complete!"
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
# Your preferred terminal emulator
# Recommends: foot
set $term foot
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
# Recommends: rofi-wayland
set $rofi_cmd rofi \
-terminal '$term'
# Shows a combined list of the applications with desktop files and
# executables from PATH.
# TODO: add window with the next release of rofi-wayland
set $menu $rofi_cmd -show combi -combi-modes drun#run -modes combi
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
# Requires: desktop-backgrounds-compat, swaybg, jxl-pixbuf-loader
# Set background via our rotation script
exec_always ~/.config/sway/scripts/rotate-wallpaper-once.sh
# output * bg /usr/share/backgrounds/default.jxl fill
#
# Example configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
### Idle configuration
#
# Example configuration:
#
# exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
# before-sleep 'swaylock -f -c 000000'
#
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
#
input "2:7:SynPS/2_Synaptics_TouchPad" {
tap enabled
dwt enabled
natural_scroll enabled
pointer_accel 0.5
scroll_method two_finger
click_method clickfinger
}
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+Shift+q kill
# Start your launcher
bindsym $mod+d exec $menu
# LLM command generator
bindsym $mod+Shift+p exec ~/.local/bin/llm-cmd
# LLM voice command generator
bindsym $mod+Shift+v exec ~/.local/bin/llm-voice-cmd
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow 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
#
# Workspaces:
#
# 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
# 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
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Include configs from 3 locations:
# - /usr/share/sway/config.d
# - /etc/sway/config.d
# - $XDG_CONFIG_HOME/sway/config.d ($HOME/.config/sway/config.d)
#
# If multiple directories contain the files with the same name, the later
# directory takes precedence; `$XDG_CONFIG_HOME/sway/config.d/20-swayidle.conf`
# will always be loaded instead of `/usr/share/sway/config.d/20-swayidle.conf`
# or `/etc/sway/config.d/20-swayidle.conf`
#
# This mechanism permits overriding our default configuration per-system
# (/etc) or per-user ($XDG_CONFIG_HOME) basis. Just create the file you
# want to modify/override in the higher-level directory.
#
# For example, to disable the default bar from Fedora configs, you'll need to
# $ echo -n > "$HOME/.config/sway/config.d/90-bar.conf"
#
# Note the quoting, the $() and the arguments quoting. All the parts are equally
# important to make the magic work. And if you want to learn the secret behind
# the trick, it's all in the `wordexp(3)`.
#
# Start the cliphist daemon
exec wl-paste --type text --watch cliphist store
exec wl-paste --type image --watch cliphist store
# Keybinding to open the history picker
bindsym $mod+c exec cliphist list | rofi -dmenu | cliphist decode | wl-copy
# Keybinding to clear clipboard history
bindsym $mod+Shift+x exec cliphist wipe
include '$(/usr/libexec/sway/layered-include "/usr/share/sway/config.d/*.conf" "/etc/sway/config.d/*.conf" "${XDG_CONFIG_HOME:-$HOME/.config}/sway/config.d/*.conf")'
#!/bin/bash
# Validate Sway and Wallpaper configuration
echo "=== SWAY & DESKTOP CONFIGURATION VALIDATION ==="
# 1. Check if rotate-wallpaper-once.sh is enabled in config
if grep -q "exec_always.*rotate-wallpaper-once.sh" ~/.config/sway/config; then
echo "✅ SUCCESS: Wallpaper autostart (exec_always rotate-wallpaper-once.sh) is active."
else
echo "❌ ERROR: Wallpaper autostart is disabled or commented out in ~/.config/sway/config!"
exit 1
fi
# 2. Check if the wallpaper rotation script is executable
if [ -x ~/.config/sway/scripts/rotate-wallpaper-once.sh ]; then
echo "✅ SUCCESS: rotate-wallpaper-once.sh is executable."
else
echo "❌ ERROR: rotate-wallpaper-once.sh is not executable or missing!"
exit 1
fi
# 3. Test if sway config is syntactically valid
if command -v sway >/dev/null 2>&1; then
if sway -C >/dev/null 2>&1; then
echo "✅ SUCCESS: Sway configuration syntax is valid."
else
echo "❌ ERROR: Sway configuration syntax check failed!"
sway -C
exit 1
fi
else
echo "⚠️ WARNING: sway binary not found."
fi
# 4. Check if required files exist
if [ -f /home/dulani/fedora_sway_spin/dashboard-overlay.html ]; then
echo "✅ SUCCESS: dashboard-overlay.html exists."
else
echo "❌ ERROR: dashboard-overlay.html is missing!"
exit 1
fi
echo "🎉 ALL DESKTOP SANITY CHECKS PASSED!"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment