dualmonitors
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dualmonitors [2026/10/24 12:38] – karcio | dualmonitors [2026/10/24 12:46] (current) – karcio | ||
|---|---|---|---|
| Line 12: | Line 12: | ||
| Laptop only — create ~/ | Laptop only — create ~/ | ||
| - | bash | ||
| < | < | ||
| Line 21: | Line 20: | ||
| Both monitors — create ~/ | Both monitors — create ~/ | ||
| - | bash | + | |
| < | < | ||
| #!/bin/sh | #!/bin/sh | ||
| + | |||
| + | # Enable both monitors | ||
| swaymsg ' | swaymsg ' | ||
| swaymsg ' | swaymsg ' | ||
| - | swaymsg ' | + | |
| + | # Laptop screen: right | ||
| + | swaymsg ' | ||
| + | |||
| + | # Samsung monitor: left | ||
| + | swaymsg ' | ||
| </ | </ | ||
| - | Replace the output names with yours. The 1920 position is just an example; adjust it to match your laptop screen' | + | |
| + | Replace the output names with yours. The 2560 position is just an example; adjust it to match your laptop screen' | ||
| Make both scripts executable: | Make both scripts executable: | ||
| - | bash | + | |
| < | < | ||
| chmod +x ~/ | chmod +x ~/ | ||
| </ | </ | ||
| Sway supports enabling and disabling individual outputs this way. | Sway supports enabling and disabling individual outputs this way. | ||
| - | GitHub | + | |
| - | - Ordered List Item3. | + | ==== Assign shortcuts |
| Add these lines to ~/ | Add these lines to ~/ | ||
| - | bash | + | |
| < | < | ||
| bindsym $mod+F5 exec ~/ | bindsym $mod+F5 exec ~/ | ||
| Line 46: | Line 53: | ||
| </ | </ | ||
| Reload Sway: | Reload Sway: | ||
| - | bash | + | |
| < | < | ||
| swaymsg reload | swaymsg reload | ||
| </ | </ | ||
| + | |||
| Now you can use: | Now you can use: | ||
| - | * | + | * **Super + F5** — laptop screen only |
| - | * | + | * **Super + F6** — laptop and external monitor |
dualmonitors.1792845498.txt.gz · Last modified: by karcio
