Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --smart-titles flag to hide_edge_borders #7889

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nim65s
Copy link

@nim65s nim65s commented Dec 29, 2023

Hi,

This extend the --i3 flag to hide title bars on any kind of container.

@nim65s
Copy link
Author

nim65s commented Dec 29, 2023

Well, actually, this doesn't exactly fix #7409, and only implement part of it. But I'll wait for reviews before changing things.

@nim65s nim65s mentioned this pull request Dec 29, 2023
@hashworks
Copy link

hashworks commented Jan 3, 2024

This is everything I expected from #7409, thanks! If someone wants to try it out on Arch Linux: Here is a sway-git build with this PR: https://fb.hash.works/gLwik/ (commit 0e37cc3, requires wlroots-git).

PKGBUILD diff
  diff --git a/PKGBUILD b/PKGBUILD
  index 77411ef..40d724c 100644
  --- a/PKGBUILD
  +++ b/PKGBUILD
  @@ -1,7 +1,7 @@
   # Maintainer: GreyXor <greyxor@protonmail.com>
   # Contributor: Drew DeVault <sir@cmpwn.com>
   pkgname=sway-git
  -pkgver=1.6.rc2.r584.g0aceff74
  +pkgver=1.6.rc2.r587.g7e69a707
   pkgrel=1
   pkgdesc='Tiling Wayland compositor and replacement for the i3 window manager (git development version)'
   arch=('x86_64')
  @@ -47,9 +47,11 @@ optdepends=(
   provides=("${pkgname%-git}")
   conflicts=("${pkgname%-git}")
   source=("${pkgname}::git+${url}.git"
  +"https://patch-diff.githubusercontent.com/raw/swaywm/sway/pull/7889.patch"
   "50-systemd-user.conf"
   "sway-portals.conf")
   b2sums=('SKIP'
  +        'SKIP'
           '71f45f9abb4e9f98a52177b227aa30ab27d02c9eef8a31400460e71c72b6d40ec396581f0b1703d4cec655aaba704077212882f643c6efb6cda951ea69b5383d'
           'eeaa6bdfae0fa6c0445d7d02209ef9142d529f1770fd8d9d614772c276ffa7461247523399164fed70ad39b25af9a91fcf8afa23af5c193c898c44487956de7f')
   
  @@ -59,6 +61,12 @@ pkgver() {
     git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
   }
   
  +prepare() {
  +  cd "$pkgname"
  +
  +  git apply ../7889.patch
  +}
  +
   build() {
     arch-meson "$pkgname" build -D sd-bus-provider=libsystemd
     meson compile -C build

@nim65s I think the --title flag is a bit ambiguous, maybe --lone-title would be better?

@hashworks
Copy link

I think I found a bug.

When one creates a single window, it works as expected, no title bar is shown:
image

Switching to vertical split mode and creating another window works fine as well, the title bars appear:
image

However, switching one side to horizontal mode removes the title bar on that side:
image

When another window is created the title bars re-appear:
image

Removing the latter window removes the title bar again:
image

@nim65s
Copy link
Author

nim65s commented Jan 3, 2024

Thanks for the bug report ! I'll work on it.

Meanwhile, for the PKGBUILD, I guess it will be easier to work directly on my fork when I'll add more commits :)

diff --git a/PKGBUILD b/PKGBUILD
index 77411ef..1fc73af 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -46,7 +46,7 @@ optdepends=(
 )
 provides=("${pkgname%-git}")
 conflicts=("${pkgname%-git}")
-source=("${pkgname}::git+${url}.git"
+source=("${pkgname}::git+${url/swaywm/nim65s}"
 "50-systemd-user.conf"
 "sway-portals.conf")
 b2sums=('SKIP'

@nim65s nim65s changed the title add --title flag to hide_edge_borders, fix #7409 add --smart-titles flag to hide_edge_borders, fix #7409 Jan 4, 2024
@nim65s
Copy link
Author

nim65s commented Jan 4, 2024

@hashworks : I think I fixed the bad behaviour you described. Could you double-check it ?
Also, I agree with the naming, but I think "smart" is used in the docs and the conf, while "lone" is in the code, so I switched the option to --smart-titles for consistency.

@hashworks
Copy link

Thanks, looks like that fixed it.

nim65s added a commit to nim65s/dotfiles that referenced this pull request Jan 7, 2024
to hide the title bar on workspaces with one child, fix swaywm#7409
@svalaskevicius
Copy link

thanks! I've cherry-picked this to my local running version after almost starting to implement the same :)

so far this is working great!

(trying sway after years of xmonad and the titlebar has been staring at me for a few weeks now)

@emersion emersion added enhancement New feature or incremental improvement window-management Configuring and arranging toplevels labels Jan 26, 2024
@emersion emersion changed the title add --smart-titles flag to hide_edge_borders, fix #7409 add --smart-titles flag to hide_edge_borders Feb 29, 2024
@nim65s
Copy link
Author

nim65s commented Mar 18, 2024

This can be rebased on 1.9 (ref. https://github.com/nim65s/sway/tree/1-9-smart), but not on master since #6844.
Working on this further is then currently blocked by #8072

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or incremental improvement window-management Configuring and arranging toplevels
Development

Successfully merging this pull request may close these issues.

None yet

4 participants