swayfx icon indicating copy to clipboard operation
swayfx copied to clipboard

Outer and top gap disables rounded corners

Open milgra opened this issue 2 years ago • 18 comments

Hi, I've compiled & installed swayfx on void linux, tried both the 0.1 release downloaded from github releases and the main branch of this repo and also the 0.2 branch from this repo and the extra features simply doesn't work. Do I have to use some special switch? Can I debug the special switches somehow?

sway -v output : sway version 0.2-4e45b96c (Jan 11 2023, branch 'main')

milgra avatar Jan 11 '23 21:01 milgra

Are you using the new config options?

ErikReider avatar Jan 11 '23 22:01 ErikReider

Yes, I'm using corner_radius 10 with no effect.

milgra avatar Jan 17 '23 13:01 milgra

Could you provide your config and more info about your setup (ie. specs, distro, etc...)?

ErikReider avatar Jan 17 '23 15:01 ErikReider

Base Void Linux ( with latest updates ) Kernel Version : 6.1.7_1 Nvidia/Intel Hybrid GPU using proprietary nvidia drivers

  • Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630] (prog-if 00 [VGA controller])
  • NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1) (prog-if 00 [VGA controller])

The build of this repo works fine I just don't have any special effects.

milgra avatar Jan 27 '23 09:01 milgra

You can try running it with -d from terminal to validate that config is read correctly and no errors occur.

head-gardener avatar Jan 27 '23 09:01 head-gardener

I did it, corner_radius is parsed correctly and I noticed something else : floating windows do get rounded corners but normal windows don't. Shadows are working on normal windows also.

milgra avatar Jan 31 '23 20:01 milgra

Does the default config work with the corner_radius option enabled? Do other config options work?

ErikReider avatar Jan 31 '23 21:01 ErikReider

I would assume explanation to be that corners aren't rounded when there are no gaps since a6f60ee. Does adding gaps solve the issue?

head-gardener avatar Feb 01 '23 01:02 head-gardener

There are no rounded corners on normal windows even with the default config :( I tried with different gap settings also, no luck, only floating windows have rounded corners. ( gaps work fine )

milgra avatar Feb 01 '23 11:02 milgra

I just had this issue on the latest commit (NixOS, pulled in as a flake) - but interestingly it resolved itself after about 10 minutes. Windows created now will have rounded corners but those created earlier still do not, even when in a tab group:

image

This occurs with smart_corner_radius both off and on, and a reload does not alter the older windows.

I still have the setup loaded with debug logging enabled. As I have both working and non-working windows up is there anything I can do to debug? (I'll leave this setup up for as long as I can)

I've taken a log of toggling floating on a working and non-working window, but the log portion is identical:

Corners working:

Mar 03 10:07:18 tyson swayfx[272322]: 00:38:52.582 [DEBUG] [sway/commands/bind.c:618] running command for binding: floating toggle
Mar 03 10:07:18 tyson swayfx[272322]: 00:38:52.582 [INFO] [sway/commands.c:271] Handling command 'floating toggle'
Mar 03 10:07:18 tyson swayfx[272322]: 00:38:52.583 [DEBUG] [sway/ipc-server.c:328] Sending window::floating event
Mar 03 10:07:18 tyson swayfx[272322]: 00:38:52.583 [DEBUG] [sway/tree/arrange.c:263] Usable area for ws: 2560x1036@0,0
Mar 03 10:07:18 tyson swayfx[272322]: 00:38:52.583 [DEBUG] [sway/tree/arrange.c:293] Arranging workspace '1' at 1034.000000, 10.000000
Mar 03 10:07:18 tyson swayfx[272322]: 00:38:52.583 [DEBUG] [sway/tree/arrange.c:77] Arranging 0x7ffe81038f00 horizontally
Mar 03 10:07:18 tyson swayfx[272322]: 00:38:52.583 [DEBUG] [sway/desktop/transaction.c:398] Transaction 0x2f35f30 committing with 7 instructions
Mar 03 10:07:18 tyson swayfx[272322]: 00:38:52.586 [DEBUG] [wlr] [types/wlr_text_input_v3.c:185] Text input commit received without focus
Mar 03 10:07:18 tyson swayfx[272322]: 00:38:52.586 [DEBUG] [sway/input/text_input.c:159] Text input committed update

Corners not working:

Mar 03 10:07:25 tyson swayfx[272322]: 00:38:59.198 [DEBUG] [sway/commands/bind.c:618] running command for binding: floating toggle
Mar 03 10:07:25 tyson swayfx[272322]: 00:38:59.199 [INFO] [sway/commands.c:271] Handling command 'floating toggle'
Mar 03 10:07:25 tyson swayfx[272322]: 00:38:59.200 [DEBUG] [sway/ipc-server.c:328] Sending window::floating event
Mar 03 10:07:25 tyson swayfx[272322]: 00:38:59.200 [DEBUG] [sway/tree/arrange.c:263] Usable area for ws: 2560x1036@0,0
Mar 03 10:07:25 tyson swayfx[272322]: 00:38:59.200 [DEBUG] [sway/tree/arrange.c:293] Arranging workspace '1' at 1034.000000, 10.000000
Mar 03 10:07:25 tyson swayfx[272322]: 00:38:59.200 [DEBUG] [sway/tree/arrange.c:77] Arranging 0x7ffe81038f00 horizontally
Mar 03 10:07:25 tyson swayfx[272322]: 00:38:59.200 [DEBUG] [sway/desktop/transaction.c:398] Transaction 0x2f16f80 committing with 7 instructions
Mar 03 10:07:25 tyson swayfx[272322]: 00:38:59.203 [DEBUG] [wlr] [types/wlr_text_input_v3.c:185] Text input commit received without focus
Mar 03 10:07:25 tyson swayfx[272322]: 00:38:59.203 [DEBUG] [sway/input/text_input.c:159] Text input committed update

JamesReynolds avatar Mar 03 '23 10:03 JamesReynolds

That's expected behaviour. Windows need to be re-opened due to the way decoration information is stored.

head-gardener avatar Mar 03 '23 10:03 head-gardener

That's expected behaviour. Windows need to be re-opened due to the way decoration information is stored.

Ah, I didn't realise that. That explains my issue, which sounds completely different to this issue.

JamesReynolds avatar Mar 03 '23 12:03 JamesReynolds

@milgra mind providing the config?

WillPower3309 avatar Apr 16 '23 03:04 WillPower3309

This is my config file :

# devices

input * {
      dwt enabled
      tap enabled
      natural_scroll enabled
      middle_emulation enabled
      repeat_rate 100
      repeat_delay 250
      # uncomment below to add other input sources
      xkb_layout "us,hu"
      xkb_variant ",101_qwerty_dot_nodead"
      xkb_options "grp:alt_space_toggle"
}

# constants

set $menu wofi --show run | xargs swaymsg exec --
set $browser google-chrome-stable
set $terminal foot
set $screenshot grim ~/Downloads/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png
set $screenclip slurp | grim -g - ~/Downloads/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png

# shortcuts

set $mod Mod4

bindsym $mod+Up focus up
bindsym $mod+Down focus down
bindsym $mod+Left focus left
bindsym $mod+Right focus right

bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Right move right

bindsym --no-repeat $mod+1 workspace number 1; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+2 workspace number 2; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+3 workspace number 3; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+4 workspace number 4; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+5 workspace number 5; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+6 workspace number 6; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+7 workspace number 7; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+8 workspace number 8; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+9 workspace number 9; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+0 workspace number 10; exec "echo 1 > /tmp/sov"

bindsym --no-repeat $mod+Ctrl+1 workspace number 11; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+Ctrl+2 workspace number 12; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+Ctrl+3 workspace number 13; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+Ctrl+4 workspace number 14; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+Ctrl+5 workspace number 15; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+Ctrl+6 workspace number 16; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+Ctrl+7 workspace number 17; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+Ctrl+8 workspace number 18; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+Ctrl+9 workspace number 19; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $mod+Ctrl+0 workspace number 20; exec "echo 1 > /tmp/sov"

bindsym --release $mod+1 exec "echo 0 > /tmp/sov"
bindsym --release $mod+2 exec "echo 0 > /tmp/sov"
bindsym --release $mod+3 exec "echo 0 > /tmp/sov"
bindsym --release $mod+4 exec "echo 0 > /tmp/sov"
bindsym --release $mod+5 exec "echo 0 > /tmp/sov"
bindsym --release $mod+6 exec "echo 0 > /tmp/sov"
bindsym --release $mod+7 exec "echo 0 > /tmp/sov"
bindsym --release $mod+8 exec "echo 0 > /tmp/sov"
bindsym --release $mod+9 exec "echo 0 > /tmp/sov"
bindsym --release $mod+0 exec "echo 0 > /tmp/sov"

bindsym --release $mod+Ctrl+1 exec "echo 0 > /tmp/sov"
bindsym --release $mod+Ctrl+2 exec "echo 0 > /tmp/sov"
bindsym --release $mod+Ctrl+3 exec "echo 0 > /tmp/sov"
bindsym --release $mod+Ctrl+4 exec "echo 0 > /tmp/sov"
bindsym --release $mod+Ctrl+5 exec "echo 0 > /tmp/sov"
bindsym --release $mod+Ctrl+6 exec "echo 0 > /tmp/sov"
bindsym --release $mod+Ctrl+7 exec "echo 0 > /tmp/sov"
bindsym --release $mod+Ctrl+8 exec "echo 0 > /tmp/sov"
bindsym --release $mod+Ctrl+9 exec "echo 0 > /tmp/sov"
bindsym --release $mod+Ctrl+0 exec "echo 0 > /tmp/sov"

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

bindsym $mod+b splith
bindsym $mod+v splitv
bindsym $mod+f fullscreen
bindsym $mod+Shift+space floating toggle
#bindsym $mod+space focus mode_toggle
bindsym $mod+a focus parent
bindsym $mod+r mode "resize"

mode "resize" {
    bindsym Left resize shrink width 10px
    bindsym Down resize grow height 10px
    bindsym Up resize shrink height 10px
    bindsym Right resize grow width 10px
    bindsym Return mode "default"
    bindsym Escape mode "default"
}

bindsym $mod+Shift+c reload
bindsym $mod+Shift+q kill
bindsym $mod+d exec $menu
bindsym $mod+Space exec $menu
bindsym $mod+Return exec $terminal
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'
bindsym $mod+Shift+Return exec $browser

bindsym XF86MonBrightnessDown exec brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > /tmp/wob
bindsym XF86MonBrightnessUp exec brightnessctl set +5% | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > /tmp/wob

bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% && pamixer --get-volume > /tmp/wob
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% && pamixer --get-volume > /tmp/wob

bindsym $mod+XF86AudioPlay exec "echo 1 > /tmp/vmp"
bindsym $mod+XF86AudioNext exec "echo 2 > /tmp/vmp"
bindsym $mod+XF86AudioPrev exec "echo 3 > /tmp/vmp"

bindsym --no-repeat $mod+Print exec $screenshot
bindsym --no-repeat $mod+Shift+Print exec $screenclip
bindsym --no-repeat $mod+p exec "echo 2 > /tmp/wcp"

floating_modifier $mod normal

# design

font pango:Terminus (TTF) Bold 12

client.focused          #2F2F2F #556064 #80FFF9 #1F1F1F
#client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948
#client.unfocused        #0F0F0F #2F3D44 #1ABC9C #454948
#client.urgent           #CB4B16 #FDF6E3 #1ABC9C #268BD2
#client.placeholder      #000000 #0c0c0c #ffffff #000000 
#client.background       #2B2C2B

output * bg ~/.config/sway/sunset.jpg stretch

default_border none
default_floating_border none

corner_radius 10
shadows on

gaps inner 5
gaps outer 0
gaps top -5

for_window [app_id="foot"] border pixel 1
for_window [app_id="iwgtk"] floating enable
for_window [app_id="blueman-manager"] floating enable
for_window [app_id="blueman-manager"] resize set 1000 600
for_window [app_id="pavucontrol"] floating enable
for_window [app_id="org.gnome.Nautilus"] floating enable
for_window [app_id="gnome-system-monitor"] floating enable; resize shrink down 100px; resize shrink up 100px
for_window [app_id="wdisplays"] floating enable
for_window [app_id="wdisplays"] resize set 1000 600
for_window [app_id="pavucontrol"] floating enable
for_window [app_id="pavucontrol"] resize set 1000 600
for_window [app_id="imv"] floating enable
for_window [app_id="pamac-manager"] floating enable
for_window [app_id="mmfm"] floating enable
for_window [app_id="vmp"] floating enable
for_window [app_id="ocp"] floating enable

# auto launch applications

exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec mako
exec waybar
exec swayidle -w \
         timeout 1200 'swaylock -f' \
         timeout 2400 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
         before-sleep 'swaylock -f'

exec rm -f /tmp/wob && mkfifo /tmp/wob && tail -f /tmp/wob | wob
exec rm -f /tmp/sov && mkfifo /tmp/sov && tail -f /tmp/sov | sov -t 200
exec rm -f /tmp/wcp && mkfifo /tmp/wcp && tail -f /tmp/wcp | wcp -f 300x190 -m 2 -a rt

# outputs

workspace 1 output eDP-1
workspace 2 output eDP-1
workspace 3 output eDP-1
workspace 4 output eDP-1
workspace 5 output eDP-1
workspace 6 output HDMI-A-1
workspace 7 output HDMI-A-1
workspace 8 output HDMI-A-1
workspace 9 output HDMI-A-1
workspace 10 output HDMI-A-1

# startup pipewire and xdg-desktop-portal for audio and screen sharing

exec ~/.pipewire.sh
exec brightnessctl set 50%

milgra avatar Apr 19 '23 11:04 milgra

Okay, finally I figured out : I have to use inner gaps only, having an outer and a top gap disables rounded corners on normal windows.

milgra avatar Apr 23 '23 14:04 milgra

Okay, finally I figured out : I have to use inner gaps only, having an outer and a top gap disables rounded corners on normal windows.

Good to know! I'll investigate the issue further

WillPower3309 avatar Apr 23 '23 21:04 WillPower3309

Can still be reproduced on swayfx 0.3.2 and NixOS unstable

TotalChaos05 avatar Oct 05 '23 06:10 TotalChaos05