update sway config for better resolution support and stuff
This commit is contained in:
parent
5b050656b1
commit
6088e82ff9
9 changed files with 48 additions and 3 deletions
sway
34
sway/automation.sh
Normal file
34
sway/automation.sh
Normal file
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/env bash
|
||||
# config file still must be done by hand to take into account rotation and stuff, but this makes the backgrounds images themselves
|
||||
# TODO: add config generation
|
||||
|
||||
generate() {
|
||||
magick background.png -resize ${1}x${2}! background-${1}x${2}.png
|
||||
magick composite -gravity center logo.png background-${1}x${2}.png result-${1}x${2}.png
|
||||
cp result-${1}x${2}.png ~/.config/sway/backgrounds/${1}x${2}.png
|
||||
rm background-*
|
||||
rm result-*
|
||||
}
|
||||
|
||||
outputs=$(swaymsg -t get_outputs)
|
||||
|
||||
i=0
|
||||
while [ "$(echo $outputs | jq -r .[$i])" != "null" ]; do
|
||||
width=$(echo $outputs | jq -r .[$i].modes.[0].width)
|
||||
height=$(echo $outputs | jq -r .[$i].modes.[0].height)
|
||||
generate $width $height
|
||||
generate $height $width
|
||||
((i++))
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
BIN
sway/backgrounds/1080x1920.png
Executable file
BIN
sway/backgrounds/1080x1920.png
Executable file
Binary file not shown.
After ![]() (image error) Size: 26 KiB |
BIN
sway/backgrounds/1440x2560.png
Executable file
BIN
sway/backgrounds/1440x2560.png
Executable file
Binary file not shown.
After ![]() (image error) Size: 32 KiB |
BIN
sway/backgrounds/1920x1080.png
Executable file
BIN
sway/backgrounds/1920x1080.png
Executable file
Binary file not shown.
After ![]() (image error) Size: 24 KiB |
BIN
sway/backgrounds/2560x1440.png
Executable file
BIN
sway/backgrounds/2560x1440.png
Executable file
Binary file not shown.
After ![]() (image error) Size: 29 KiB |
|
@ -25,7 +25,7 @@ for_window [window_role="pop-up"] floating enable
|
|||
for_window [window_role="task_dialog"] floating enable
|
||||
|
||||
# shutdown / restart / suspend...
|
||||
set $lockwall "swaylock -i ~/.config/sway/backgrounds/2560x1440.png"
|
||||
set $lockwall "swaylock -i ~/.config/sway/backgrounds/widthxheight.png"
|
||||
set $mode_system System (l) lock, (e) logout, (r) reboot, (s) shutdown
|
||||
|
||||
mode "$mode_system" {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
output "Acer Technologies EK271U E 14160766B3W01" mode 2560x1440@100hz adaptive_sync on
|
||||
output "Hewlett Packard HP ZR22w CN41250H24" transform 270
|
||||
output "AU Optronics 0x463D" mode 1920x1080@60hz
|
||||
|
||||
output "Acer Technologies EK271U E 14160766B3W01" bg ~/.config/sway/backgrounds/2560x1440.png fill
|
||||
output "Hewlett Packard HP ZR22w CN41250H24" bg ~/.config/sway/backgrounds/1080x1920.png fill
|
||||
|
||||
bindsym Mod4+o output "Acer Technologies EK271U E 14160766B3W01" toggle
|
||||
output "AU Optronics 0x463D" bg ~/.config/sway/backgrounds/1920x1080.png fill
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue