Coder Social home page Coder Social logo

felixkratz / jankyborders Goto Github PK

View Code? Open in Web Editor NEW
627.0 627.0 18.0 3.28 MB

A lightweight window border system for macOS

License: GNU General Public License v3.0

Makefile 0.51% C 99.49%
border customization fast lightweight macos tiling-window-manager window-border yabai

jankyborders's People

Contributors

felixkratz avatar hackrmomo avatar koekeishiya avatar mizlan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jankyborders's Issues

Issue compiling as a Nix package

Hello,

I'm attempting to package JankyBorders for Nix but I'm running into a compile error as below:

this derivation will be built:
  /nix/store/h39fn5v0sn0py2r43j20wr6nqxvc94f6-JankyBorders-1.3.0.drv
building '/nix/store/h39fn5v0sn0py2r43j20wr6nqxvc94f6-JankyBorders-1.3.0.drv'...
unpacking sources
unpacking source archive /nix/store/a7ri5w5wvr427xgwlyh7ax2g41gq01s4-source
source root is source
patching sources
updateAutotoolsGnuConfigScriptsPhase
configuring
no configure script, doing nothing
building
build flags: SHELL=/nix/store/x1xxsh1gp6y389hyl40a0i74dkxiprl7-bash-5.2-p15/bin/bash
mkdir bin
clang -std=c99 -O3 -g src/main.c src/mach.c src/hashtable.c src/events.c src/windows.c src/border.c  -o bin/borders -framework AppKit -F/System/Library/PrivateFrameworks/ -framework SkyLight
Undefined symbols for architecture arm64:
  "_SLSWindowManagementBridgeSetDelegate", referenced from:
      _main in main-07b876.o
ld: symbol(s) not found for architecture arm64
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [makefile:5: all] Error 1
error: builder for '/nix/store/h39fn5v0sn0py2r43j20wr6nqxvc94f6-JankyBorders-1.3.0.drv' failed with exit code 2;
       last 10 log lines:
       > building
       > build flags: SHELL=/nix/store/x1xxsh1gp6y389hyl40a0i74dkxiprl7-bash-5.2-p15/bin/bash
       > mkdir bin
       > clang -std=c99 -O3 -g src/main.c src/mach.c src/hashtable.c src/events.c src/windows.c src/border.c  -o bin/borders -framework AppKit -F/System/Library/PrivateFrameworks/ -framework SkyLight
       > Undefined symbols for architecture arm64:
       >   "_SLSWindowManagementBridgeSetDelegate", referenced from:
       >       _main in main-07b876.o
       > ld: symbol(s) not found for architecture arm64
       > clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
       > make: *** [makefile:5: all] Error 1
       For full logs, run 'nix log /nix/store/h39fn5v0sn0py2r43j20wr6nqxvc94f6-JankyBorders-1.3.0.drv'.

I am able to build this on my host with the Makefile outside of Nix without issue. I'm curious if you have any suggestion on things to troubleshoot?

Windows affected by Stage Manager on macOS Sonoma continue rendering borders

I am on macOS Sonoma and using Stage Manager on macOS Sonoma, and I just installed JankyBorders earlier today. I have noticed that when a window is "minimized" (in the column on the left), the border is still in the space where the active window is. I will comment a screenshot once I'm back on my MacBook.

"Glowing" borders

image

Source: https://www.reddit.com/r/unixporn/comments/w9s22b/hyprland_noble/

image

Source: https://www.reddit.com/r/unixporn/comments/zqyrqi/hyprland_glowy/?rdt=34170

image

(Bright spots are actually animated and moves around the border)

Source: https://www.reddit.com/r/unixporn/comments/17kx85t/hyprland_tokyo_night_nixos/?rdt=55754

--

I think this could look good when customized properly. Probably more useful for the active window than inactive ones. The static effect could likely be implemented by tweaking the border window shadow properties.

Homebrew installation on Ventura

Hi,

Always loved colored window borders since started using yabai and was extremely upset after it was removed. Found this project and was happy that it will bring back to life my one of the most loved features.

Tried installing with brew and get: borders: An unsatisfied requirement failed this build.

Then tried dowloading a source code and building by myself and everything worked without any issues.

Since I don't see any issues running this project on Ventura is it posible to make installation possible via brew without OS restrictions or at least lower the limitation to Ventura?

Thanks in advance :)

Borders and Arc Browser PiP

I use Arc browser, which comes with a built in PiP window whenever you swap tabs on a running video feed.

When this feature is used with Borders, the border seem to wrap around much larger window than the PiP window itself, creating a visual glitch.

This used to cause issues with Yabai as well, but in v6.0.3 the issue was fixed (Yabai #1622)

The ideal behaviour is for Borders to ignore these windows natively similar to Yabai, alternatively offering a config based exclusion.

Note: in my set up Borders config is in the yabairc
borders active_color=0xffe1e3e4 inactive_color=0xff494d64 width=5.0 style=round &

🙏

Border appear on wrong display

I have experienced that the border will appear on the "correct" window but on the wrong display. I have noticed that from time to time, the border will appear on the wrong display.
Say I have two displays with two open windows each in a vertical split view. Display A, has A.l (left) and A.r (right) as windows, and display B, has B.l and B.r. Sometimes I experience that if B.l have focus A.l will have drawn border and vice versa.

Roadmap: TODOS

These are some TODOs that are up for grabs:

Done

  • Fix some quirks with certain window focus events not leading to the window border being highlighted/dehighlighted (e.g. if no window is focused (Finder is the front app in this case))
    Done 79aeed0
  • Add borders to all windows that where created before the borders was launched
    Done #5
  • Add a lock file to make it impossible to launch the process twice
    Done #12
  • Add a client-server communication to make changes to the border properties during runtime possible (i.e. like yabai or sketchybar)
    Done fad2f55
  • Windows coming back from native fullscreen have no border
    Done 1701aee
  • When a window is minimized on startup of borders, is does not receive a border when it is unminimized
    Done 1701aee

As all of these todos seem to be complete I will release an update later which should be stable for now and not contain any more quirks or bugs.

If you choose to work on any one of them, please create a PR to this repo such that all can benefit from your improvements.

bordersrc must be executable

Idk if I am just dumb but I was trying for a couple of days on and off and could not figure out why my bordersrc file was not working until I found out it must be executable. Is that obvious? Regardless, simply having this as a searchable issue should hopefully help someone. :)

Maybe add a little one-liner to readme? starting the service does not say anything...

All border drawn when changing spaces

Whenever I am changing spaces, but most noticeably when swiping between spaces (it's just to fast when using keybinds) JB draws border for all windows regardless of display during the switching process.
Normally looks like:
Screenshot 2023-12-16 at 11 43 46 AM
But specifically while changing spaces, it temporarily looks like:
Screenshot 2023-12-16 at 11 43 03 AM

It's especially evident when transitioning to/from an empty desktop or one with transparent windows, and there is another desktop split by yabai for two windows:
Screenshot 2023-12-16 at 11 48 11 AM
(The center line should not be there)

Any idea why?

Old windows seem to be unbordered

First of all, thank you for trying to fill the gap left by Yabai's border removal.

I added the following to my .yabairc:

borders active_color=0xffffffff inactive_color=0xff494d64 width=5.0 2>/dev/null 1>&2 &

I noticed something with windows created before yabai started.

image

The main window on the left was already created, and used to start yabai. Then once it was running, I created the windows on the right. When I use the command opt+k/j/l to move between windows, the two new windows seem to have the border correctly, but when I refocus on the older existing window, the border doesn't get added.

As you can see from the image above, the window on the left has the MacOS drop shadow, signifying that it is currently focused, but the white border is on the bottom right window.

No available formula

Hi, i'm trying to install JankyBorders from brew, but after brew install FelixKratz/formulae/borders this is the output:
Warning: No available formula or cask with the name "felixkratz/formulae/borders". Did you mean felixkratz/formulae/svim, felixkratz/formulae/fyabai or felixkratz/formulae/fnnn?
I will clone the repository to compile it manually, I just created this issues to report the problem

Border is moved to the active space

So I noticed this weird bug that I can reproduce reliably, where a border that is initialized for an existing window on a different space upon launch will for some reason be moved back to the first/active space upon a window focus change event, as long as no other events have occurred. Edit: On commit 96534dd

Basically, have two windows open on the active space, and have one window open on any alternate space.
Start borders and notice that you only get two borders drawn as expected. If you now switch focus to the other window in the same space, it suddenly drags the border belonging to the alternate space window and draws it on the active space.

If you create a new window first, and then focus a window, the bug does not occur.
I also verified that the border is actually moved properly after it is created by commenting out the responsible code in the add_borders_for_existing_windows function. When that move-call is removed, the border is drawn on the active space all the time (which one would expect).

weird

Slowdown when using for a while requiring a restart

Hi @FelixKratz

Thank you for all your work. It really is nice to have these features due to your hard work.

I have been experiencing slowdown issues while using JankyBorders and after uninstalling it last night my M2 Pro machine is running fast again. It seems like the same issue as in this issue, hence why borders were removed from Yabai v6:

koekeishiya/yabai#1775

Have you been experiencing this issue and is there a solution to it?

Thanks

Same application windows not changing border with yabai's focus follows mouse

When using focus_follows_mouse autofocus in yabai and trying to switch between two windows of the same application (ex Firefox, Alacritty) the border doesn't change by only moving the cursor, unless a click is performed on the focused window.

The bug doesn't happen when changing the focus between two windows that belong to different instances of the same application, for instance by opening two Alacritty windows with open -na Alacritty

Add to README intro

It enhances the user experience [...] without relying on the accessibility API

Could you add a little sentence-blurb here describing how the software does achieve its functionality? 😄

ty!

Blacklist not working on applications with a space

I'm trying to add "IntelliJ IDEA" to the blacklist but having no luck since I'm guessing the spaces are the problem. When I add "Safari" or "iTerm2" it works just as expected and prevents them from getting borders.

I tried using single quotes, as well as escaping the spaces with \ (ex: "blacklist="IntelliJ\ IDEA") but that didn't seem to work either.

Am I using it incorrectly?


bordersrc file 👇

#!/bin/bash

options=(
    style=round
    width=5.0
    hidpi=on
    active_color=0xffc678dd
    inactive_color=0xff414550
    blacklist="'IntelliJ IDEA'"
)

borders "${options[@]}"

Note:
I looked into the code and saw the window_in_list() function looks to be the one checking this by calling proc_name() but I'm not familiar with Objective-C to know how that works or how to test this

static bool window_in_list(struct table* list, pid_t pid) {
  static char pid_name_buffer[PROC_PIDPATHINFO_MAXSIZE];
  proc_name(pid, pid_name_buffer, sizeof(pid_name_buffer));
  if (table_find(list, pid_name_buffer)) return true;
  return false;
}

Different border color for some window types

Hello,
I was wondering if you could be interested in a feature that allows to specify the border color for different type of windows:

  • active
  • floating
  • fullscreen

When the window is focused, the border can change depending on the window type, with a config like this one:

options=(
    active_color="0xAABBCCDDEEFF"
    float_color="0xAABBCCDDEEFF"
    fullscreen_color="0xAABBCCDDEEFF"
)

borders "${options[@]}"

What do you think?

Borders stop updating when move to newly created space

ctrl + alt + shift - n : yabai -m space --create && \
                  index="$(yabai -m query --spaces --display | jq 'map(select(.))[-1].index')" && \
                  yabai -m window --space "${index}" && \
                  yabai -m space --focus "${index}" 

I have this in my skhd. After this command, the border for the given window stop updating (size and color)

Can't install in Sonoma 14.1.1

The make command and brew install fails. I'm on a M1 Macbook Pro.

╰─ make
clang -std=c99 -O3 -g src/main.c src/mach.c src/hashtable.c src/events.c src/windows.c src/border.c  -o bin/borders -framework AppKit -F/System/Library/PrivateFrameworks/ -framework SkyLight
In file included from src/main.c:2:
In file included from src/events.h:2:
src/extern.h:1:10: fatal error: 'CoreGraphics/CoreGraphics.h' file not found
#include <CoreGraphics/CoreGraphics.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
src/mach.c:1:10: fatal error: 'bootstrap.h' file not found
#include <bootstrap.h>
         ^~~~~~~~~~~~~
1 error generated.
src/hashtable.c:2:10: fatal error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~
1 error generated.
In file included from src/events.c:1:
In file included from src/events.h:2:
src/extern.h:1:10: fatal error: 'CoreGraphics/CoreGraphics.h' file not found
#include <CoreGraphics/CoreGraphics.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from src/windows.c:1:
src/windows.h:2:10: fatal error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~
1 error generated.
In file included from src/border.c:1:
In file included from src/border.h:2:
In file included from src/helpers.h:1:
src/extern.h:1:10: fatal error: 'CoreGraphics/CoreGraphics.h' file not found
#include <CoreGraphics/CoreGraphics.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [all] Error 1

Feature Request: Query current parameters

I don't know if this is easily added, but a way to query the current configuration (as a text dump) would be nice. E.g., I am currently writing a program which could be used to interactively change the borders configuration, such as + / - the width. But there is no good way to query the current width in order to write back a new width.

Potential updates to window_suitable function

I'd like to start by thanking you for this software. Really appreciate it.

While running JankyBorders, I noticed that some windows from the JetBrains suite are getting a border when ideally I think they would be ignored.

I cloned the codebase and searched around and found your window_suitable function. I'm really curious where you found documentation about these tags. I'd like to update the function to somehow ignore windows that are more "popup-esque" but I could not find any information about these tags on the internet.

I'd be happy to make the change myself if you could shed some light on these tags. If you're unable to provide information, I'll take some time to debug the attributes myself to see if there's any obvious flag that marks something as a popup window.

Here's a screenshot for reference:
CleanShot 2024-01-31 at 20 20 05

The "documentation" window on the right is technically focused at the time of taking this picture, but the border changing as the autocomplete window pops up and disappears while I'm typing can be quite jarring.

[Feature Request] Fill space beneath window

Is it possible to make JankyBorders not only draw borders around a window but also filling the rectangle space beneath it?

This enhancement would enable the option to apply a tint to the translucent parts of an active window, providing a more visually appealing (to some) alternative to the current wallpaper 'bleed-through' effect

Here's now

Screenshot 2024-01-12 at 21 11 38 Screenshot 2024-01-12 at 21 14 04

Here's how it could look

Screenshot 2024-01-12 at 21 12 47 Screenshot 2024-01-12 at 21 14 28

Customize Opacity

Add an option to customize the opacity of the border so that the "strength" of the colour can be modified.

In an older project Honer, there was an option to modify the opacity of the drawn window.

The project is implemented in obj-c, but still for the sake of ease, I have attached it here

https://github.com/puffnfresh/Honer.app/blob/090c5a27a13b3aab4ed9505e1dfd963862fb3e1d/Honer/OverlayWindow.m#L23

#import "OverlayWindow.h"

@implementation OverlayWindow

- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)style backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag
{
    self = [super initWithContentRect:NSZeroRect styleMask:NSBorderlessWindowMask backing:bufferingType defer:flag];
    
    if ( self ) {
        [self setOpaque:NO];
        [self setBackgroundColor:[NSColor clearColor]];
        [self setLevel:NSPopUpMenuWindowLevel];
        [self setIgnoresMouseEvents:YES];

        [self updateAlpha:nil];
    }
    
    return self;
}

- (IBAction)updateAlpha:(id)sender
{
    NSInteger transparency = [[NSUserDefaults standardUserDefaults] doubleForKey:@"transparency"];
    CGFloat alpha = 1.0 - (transparency * 0.1);
    [self setAlphaValue:alpha];

    [self orderFront:sender];
}

- (void)awakeFromNib
{
}

@end

Issues with Yabai Focus Follows Mouse

In my yabairc, i have the following:

yabai -m config focus_follows_mouse autofocus

So when I move my mouse onto a new window, it will focus that window. The border will not switch to that focused window unless I click on it after moving the mouse.

Borders at the end of my yabairc:

borders active_color=0xffcba6f7 inactive_color=0xff1e1e2e width=5.0 &

See attached screenshot, the left window is where I had moved my mouse, and the right window is showing the border

Screenshot 2023-12-11 at 4 09 16 PM

[Request] Option to have high res window borders

Hi,

I have noticed that the borders are a bit "blurry". I think there was an option in yabai when it had borders integrated that allowed us to select more high resolution rendering.

I have attached an image below that shows what I'm talking about.

Best regards.

bild

yabai autofocus does not activate border

Hello,
I am not sure if this is by design or not :)

I use yabai with focus_follows_mouse autofocus and if I have 2 windows in the same space and move the mouse from the active one to other, the border remain on the first window, while the focus changes. The same does not happen of course if I use focus_follows_mouse autoraise.

Would you be open to enable this functionality (I am not even sure its possible)?

No borders visible

Very excited to have come across JankyBorders. However, on my M1 Pro Mac running 14.4 Beta (23E5180j), borders doesn't do anything. No error message, no complains, but also no borders. Nothing in the brew service logs either.

Safari: border disappears on link hover

Just installed JankyBorders and noticed that the border around safari browser disappears as soon as I hover a link an a website.
Maybe this is because safari creates some kind of window for displaying the link target url in the bottom left corner?

High memory usage

On the latest version (and older ones as well), I noticed that according to btop, JankyBorders consumes almost 300MB of RAM, more than double what Emacs is using, and only less than Wezterm and Firefox. Is there anything inherent about the design of JB that results in such high memory consumption, or is this some sort of bug?

Crash Reports

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               borders [60623]
Path:                  /usr/local/Cellar/borders/1.2.4/bin/borders
Identifier:            borders
Version:               ???
Code Type:             X86-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2023-11-18 07:37:10.6155 +0800
OS Version:            macOS 14.1 (23B74)
Report Version:        12
Anonymous UUID:        CCBD164C-14A5-CDF8-F815-356A61B39788


Time Awake Since Boot: 8300 seconds

System Integrity Protection: disabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   borders [60623]

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	    0x7ff80aef47ce __pthread_kill + 10
1   libsystem_pthread.dylib       	    0x7ff80af2cf30 pthread_kill + 262
2   libsystem_c.dylib             	    0x7ff80ae4ba49 abort + 126
3   libsystem_c.dylib             	    0x7ff80ae4ad30 __assert_rtn + 314
4   CoreGraphics                  	    0x7ff810f4692d _CGHandleAssert + 295
5   CoreGraphics                  	    0x7ff810aac736 CGPathAddRoundedRect + 375
6   borders                       	       0x10509d945 border_draw + 1797
7   borders                       	       0x10509c456 windows_window_create + 470
8   borders                       	       0x10509cfe2 windows_add_existing_windows + 626
9   borders                       	       0x10509b014 main + 276
10  dyld                          	    0x7ff80aba43a6 start + 1942

Thread 1:
0   libsystem_pthread.dylib       	    0x7ff80af28b88 start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib       	    0x7ff80af28b88 start_wqthread + 0


Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000000000006  rcx: 0x00007ff7bae64478  rdx: 0x0000000000000000
  rdi: 0x0000000000000103  rsi: 0x0000000000000006  rbp: 0x00007ff7bae644a0  rsp: 0x00007ff7bae64478
   r8: 0x000000000000002e   r9: 0x000000000000020d  r10: 0x0000000000000000  r11: 0x0000000000000246
  r12: 0x0000000000000103  r13: 0xffffffffffffffff  r14: 0x00007ff84e52eb40  r15: 0x0000000000000016
  rip: 0x00007ff80aef47ce  rfl: 0x0000000000000246  cr2: 0x0000000000000000
  
Logical CPU:     0
Error Code:      0x02000148 
Trap Number:     133


Binary Images:
       0x10509a000 -        0x10509dfff borders (*) <b095814e-c892-302b-b4c9-b3eda73f2d03> /usr/local/Cellar/borders/1.2.4/bin/borders
    0x7ff80aeec000 -     0x7ff80af26ff7 libsystem_kernel.dylib (*) <4df0d732-7fc4-3200-8176-f1804c63f2c8> /usr/lib/system/libsystem_kernel.dylib
    0x7ff80af27000 -     0x7ff80af32fff libsystem_pthread.dylib (*) <c64722b0-e96a-3fa5-96c3-b4beaf0c494a> /usr/lib/system/libsystem_pthread.dylib
    0x7ff80adcc000 -     0x7ff80ae53fff libsystem_c.dylib (*) <83c7b73c-86fe-32f9-85dd-f46fa2c1315b> /usr/lib/system/libsystem_c.dylib
    0x7ff8109c4000 -     0x7ff81117cfe4 com.apple.CoreGraphics (2.0) <e7b97149-20c4-3d88-a705-c4627e5aa689> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
    0x7ff80ab9e000 -     0x7ff80ac3a3df dyld (*) <d5406f23-6967-39c4-beb5-6ae3293c7753> /usr/lib/dyld
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 1
    thread_create: 1
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=425.1M resident=0K(0%) swapped_out_or_unallocated=425.1M(100%)
Writable regions: Total=705.9M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=705.9M(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        1 
CG backing stores                  140K        1 
ColorSync                           68K        3 
CoreGraphics                         8K        1 
Kernel Alloc Once                    8K        1 
MALLOC                           696.2M       29 
MALLOC guard page                   48K       12 
STACK GUARD                       56.0M        3 
Stack                             9232K        3 
VM_ALLOCATE                         24K        6 
__DATA                            16.2M      299 
__DATA_CONST                      14.8M      192 
__DATA_DIRTY                       638K      102 
__FONT_DATA                        2352        1 
__LINKEDIT                       180.5M        3 
__OBJC_RO                         70.8M        1 
__OBJC_RW                         2157K        2 
__TEXT                           244.6M      318 
dyld private memory                260K        2 
mapped file                         56K        1 
shared memory                      772K       15 
===========                     =======  ======= 
TOTAL                              1.3G      996 



-----------
Full Report
-----------

{"app_name":"borders","timestamp":"2023-11-18 07:37:14.00 +0800","app_version":"","slice_uuid":"b095814e-c892-302b-b4c9-b3eda73f2d03","build_version":"","platform":1,"share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 14.1 (23B74)","roots_installed":0,"incident_id":"FB7C25C8-08FC-4EC0-B539-F59ED492D095","name":"borders"}
{
  "uptime" : 8300,
  "procRole" : "Unspecified",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "iMacPro1,1",
  "coalitionID" : 687,
  "osVersion" : {
    "train" : "macOS 14.1",
    "build" : "23B74",
    "releaseType" : "User"
  },
  "captureTime" : "2023-11-18 07:37:10.6155 +0800",
  "codeSigningMonitor" : 0,
  "incident" : "FB7C25C8-08FC-4EC0-B539-F59ED492D095",
  "pid" : 60623,
  "cpuType" : "X86-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2023-11-18 07:37:10.5832 +0800",
  "procStartAbsTime" : 8345577042995,
  "procExitAbsTime" : 8345608824672,
  "procName" : "borders",
  "procPath" : "\/usr\/local\/Cellar\/borders\/1.2.4\/bin\/borders",
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "homebrew.mxcl.borders",
  "crashReporterKey" : "CCBD164C-14A5-CDF8-F815-356A61B39788",
  "throttleTimeout" : 10,
  "codeSigningID" : "borders-55554944b095814ec892302bb4c9b3eda73f2d03",
  "codeSigningTeamID" : "",
  "codeSigningFlags" : 570425345,
  "codeSigningValidationCategory" : 10,
  "codeSigningTrustLevel" : 4294967295,
  "sip" : "disabled",
  "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
  "termination" : {"flags":0,"code":6,"namespace":"SIGNAL","indicator":"Abort trap: 6","byProc":"borders","byPid":60623},
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":1,"thread_set_state":0,"task_for_pid":1},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":348144,"threadState":{"r13":{"value":18446744073709551615},"rax":{"value":0},"rflags":{"value":582},"cpu":{"value":0},"r14":{"value":140704442673984,"symbolLocation":0,"symbol":"_main_thread"},"rsi":{"value":6},"r8":{"value":46},"cr2":{"value":0},"rdx":{"value":0},"r10":{"value":0},"r9":{"value":525},"r15":{"value":22},"rbx":{"value":6},"trap":{"value":133},"err":{"value":33554760},"r11":{"value":582},"rip":{"value":140703312070606,"matchesCrashFrame":1},"rbp":{"value":140701969302688},"rsp":{"value":140701969302648},"r12":{"value":259},"rcx":{"value":140701969302648},"flavor":"x86_THREAD_STATE","rdi":{"value":259}},"queue":"com.apple.main-thread","frames":[{"imageOffset":34766,"symbol":"__pthread_kill","symbolLocation":10,"imageIndex":1},{"imageOffset":24368,"symbol":"pthread_kill","symbolLocation":262,"imageIndex":2},{"imageOffset":522825,"symbol":"abort","symbolLocation":126,"imageIndex":3},{"imageOffset":519472,"symbol":"__assert_rtn","symbolLocation":314,"imageIndex":3},{"imageOffset":5777709,"symbol":"_CGHandleAssert","symbolLocation":295,"imageIndex":4},{"imageOffset":952118,"symbol":"CGPathAddRoundedRect","symbolLocation":375,"imageIndex":4},{"imageOffset":14661,"symbol":"border_draw","symbolLocation":1797,"imageIndex":0},{"imageOffset":9302,"symbol":"windows_window_create","symbolLocation":470,"imageIndex":0},{"imageOffset":12258,"symbol":"windows_add_existing_windows","symbolLocation":626,"imageIndex":0},{"imageOffset":4116,"symbol":"main","symbolLocation":276,"imageIndex":0},{"imageOffset":25510,"symbol":"start","symbolLocation":1942,"imageIndex":5}]},{"id":348149,"frames":[{"imageOffset":7048,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":2}],"threadState":{"r13":{"value":0},"rax":{"value":33554800},"rflags":{"value":512},"cpu":{"value":0},"r14":{"value":1},"rsi":{"value":6403},"r8":{"value":409604},"cr2":{"value":0},"rdx":{"value":123145349881856},"r10":{"value":0},"r9":{"value":18446744073709551615},"r15":{"value":123145350404984},"rbx":{"value":123145350406144},"trap":{"value":133},"err":{"value":33554800},"r11":{"value":582},"rip":{"value":140703312284552},"rbp":{"value":0},"rsp":{"value":123145350406144},"r12":{"value":5193732},"rcx":{"value":0},"flavor":"x86_THREAD_STATE","rdi":{"value":123145350406144}}},{"id":348151,"frames":[{"imageOffset":7048,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":2}],"threadState":{"r13":{"value":0},"rax":{"value":33554800},"rflags":{"value":512},"cpu":{"value":0},"r14":{"value":1},"rsi":{"value":6147},"r8":{"value":409604},"cr2":{"value":0},"rdx":{"value":123145350418432},"r10":{"value":0},"r9":{"value":18446744073709551615},"r15":{"value":123145350941560},"rbx":{"value":123145350942720},"trap":{"value":133},"err":{"value":33554800},"r11":{"value":582},"rip":{"value":140703312284552},"rbp":{"value":0},"rsp":{"value":123145350942720},"r12":{"value":5128196},"rcx":{"value":0},"flavor":"x86_THREAD_STATE","rdi":{"value":123145350942720}}}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4379484160,
    "size" : 16384,
    "uuid" : "b095814e-c892-302b-b4c9-b3eda73f2d03",
    "path" : "\/usr\/local\/Cellar\/borders\/1.2.4\/bin\/borders",
    "name" : "borders"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703312035840,
    "size" : 241656,
    "uuid" : "4df0d732-7fc4-3200-8176-f1804c63f2c8",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703312277504,
    "size" : 49152,
    "uuid" : "c64722b0-e96a-3fa5-96c3-b4beaf0c494a",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703310856192,
    "size" : 557056,
    "uuid" : "83c7b73c-86fe-32f9-85dd-f46fa2c1315b",
    "path" : "\/usr\/lib\/system\/libsystem_c.dylib",
    "name" : "libsystem_c.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64h",
    "base" : 140703407292416,
    "CFBundleShortVersionString" : "2.0",
    "CFBundleIdentifier" : "com.apple.CoreGraphics",
    "size" : 8097765,
    "uuid" : "e7b97149-20c4-3d88-a705-c4627e5aa689",
    "path" : "\/System\/Library\/Frameworks\/CoreGraphics.framework\/Versions\/A\/CoreGraphics",
    "name" : "CoreGraphics",
    "CFBundleVersion" : "1774.1.12"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703308570624,
    "size" : 639968,
    "uuid" : "d5406f23-6967-39c4-beb5-6ae3293c7753",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  }
],
  "sharedCache" : {
  "base" : 140703307874304,
  "size" : 25769803776,
  "uuid" : "4412bf92-ed40-306d-9758-c8dc85ba325f"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=425.1M resident=0K(0%) swapped_out_or_unallocated=425.1M(100%)\nWritable regions: Total=705.9M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=705.9M(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nActivity Tracing                   256K        1 \nCG backing stores                  140K        1 \nColorSync                           68K        3 \nCoreGraphics                         8K        1 \nKernel Alloc Once                    8K        1 \nMALLOC                           696.2M       29 \nMALLOC guard page                   48K       12 \nSTACK GUARD                       56.0M        3 \nStack                             9232K        3 \nVM_ALLOCATE                         24K        6 \n__DATA                            16.2M      299 \n__DATA_CONST                      14.8M      192 \n__DATA_DIRTY                       638K      102 \n__FONT_DATA                        2352        1 \n__LINKEDIT                       180.5M        3 \n__OBJC_RO                         70.8M        1 \n__OBJC_RW                         2157K        2 \n__TEXT                           244.6M      318 \ndyld private memory                260K        2 \nmapped file                         56K        1 \nshared memory                      772K       15 \n===========                     =======  ======= \nTOTAL                              1.3G      996 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "logWritingSignature" : "afb190c97b1270b3cae38a32c806e292210fa5ef",
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "632e3f9c01482c74ed76392d",
      "factorPackIds" : {
        "SIRI_TEXT_TO_SPEECH" : "651f75fdfb457e489b2ffa72"
      },
      "deploymentId" : 240000315
    },
    {
      "rolloutId" : "61675b89201f677a9a4cbd65",
      "factorPackIds" : {
        "HEALTH_FEATURE_AVAILABILITY" : "64d14f3e1008ca2fac17a163"
      },
      "deploymentId" : 240000064
    }
  ],
  "experiments" : [

  ]
}
}


[Feature Request] Double borders

Hey there,
thanks for making all of these great programs and being so cool about feature request and bugfixes! Would it be possible to get double borders where the colours and sizes are adjustable independently from one another? I'd love to get something like this or this on macOS!

Can't install (with brew) on older than Sonoma

I got the following when trying to install via brew on an M1 MBPro on macOS Ventura 13.6.1:

$ brew install borders

borders: This software does not run on macOS versions older than Sonoma.
Error: borders: An unsatisfied requirement failed this build.

So I built the binary manually and it works completely fine. Posting so requirements for the brew formulae are relaxed, at least for Ventura which is quite recent.

Also, this works very well, I was missing borders from yabai. Thank you!

Tracing performance

Firstly, thank you for taking the initiative in creating these kinds of applications.

I have some old border code laying around that uses most of the private events that you do in this project, and I noticed a fair bit of difference in the delay when moving a window around the screen. I've attached two gifs; the first is my throwaway proof of concept and the other is commit 110b01c

old poc:
throwaway

this project:
jankborders

I haven't really looked at the code in detail, so can't really tell why there is that much of a difference.

My old throwaway project also uses SLSRegisterNotifyProc(global_handler, 806, NULL); to respond to window move events to re-align the border.

Config via Configuration file?

Is there a way to configure the binary via file?
If i want to start it via brew services, i don't know how to pass configuration to the binary.

Of if this is possible, maybe you could says something about it in the readme?

Cheers
Felix

Aborts immediately on start, Intel Mac OS Sonoma 14.1

First off, thanks so much for taking on this project.

Please let me know what additional details would be useful to troubleshoot. I'm running on an Intel Mac, Sonoma 14.1 with SIP enabled. borders immediately crashes/aborts on start.

The only message I see is:

borders active_color=0xffe1e3e4 inactive_color=0xff494d64 width=5.0
[1]    58275 abort      borders active_color=0xffe1e3e4 inactive_color=0xff494d64 width=5.0

[Docs] Do not know how to deactivate or update active color after enable using yabai

Thank you very much for this plugin, I see it's so cool but I'm facing some issues, can you please check it?

After enable for yabai followed by the command in the docs:
active_color=0xffe1e3e4 inactive_color=0xff494d64 width=5.0 2>/dev/null 1>&2 &

I do not know how to set to another color, try to set again like the command below but it not work:
active_color=0xffe1e3e4 inactive_color=0xff494d64 width=5.0 2>/dev/null 1>&2 &

Also if I want to disable it I just don't know how to do it event running the command: brew uninstall borders
Can you please update the README.md also the docs for the man command, thank you!

MacOS shadow appears above border

The MacOS shadow is appearing above the border which results in a much darker border color. Is there a way to force the border to appear above the shadow?

I'd love to disable the shadows with Yabai, but I cannot disable SIP on my computer.

Feature Request: "Allow list"

I was wondering if there is an interest in having an "invert" of the blacklist.
For example, by default, borders will not be drawn for any application, and users will have to opt in to have borders drawn individually.

Thank you for this great piece of software @FelixKratz!

Render on top of application

Hi, thanks for the work on this project. I started my own borders tool since yabai dropped the feature but this one is far superior.

One thing I miss from my own tool, that I'd like to request is to have an option to allow borders render on top of the application. This is great for square borders as with a slightly thicker border you can have the illusion of square windows.

Here's an old screenshot that demonstrates what I mean:

image

[Request] Gradient

Hi Felix, thanks for making JankyBorders. I was curious if you'd be interested in looking into adding the option of gradient borders, e.g., top right corner is yellow and transitions to green at bottom left corner, or something along those lines.

If you believe that is outside the scope of JankyBorders, I can try to implement it myself (following this), though I would need to familiarize myself with the codebase.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.