Giter VIP home page Giter VIP logo

spacebar's Introduction

A minimal status bar for macOS

Build Status Badge License Badge Changelog Badge

Nix Badge GitHub Project Badge Version Badge Discussions Badge Discussions Badge

About

spacebar is a minimal status bar for macOS. Ideal for use with tiling window managers like yabai.

spacebar demo

Installation

A package and service to install and manage spacebar is provided in two flavours: Homebrew & Nix.
There is also a precompiled binary archive available in the latest release assets.

Homebrew

spacebar can be installed using Homebrew from the cmacrae/formulae tap

brew install cmacrae/formulae/spacebar
brew services start spacebar

Nix

A package is generally available to Nix users on macOS in the various channels.
A Flake is also available in this repository and can be used like so:

{
  inputs.darwin.url = "github:lnl7/nix-darwin";
  inputs.spacebar.url = "github:cmacrae/spacebar/v1.4.0";

  outputs = { self, darwin, spacebar }: {
    darwinConfigurations.example = darwin.lib.darwinSystem {
      modules = [
        {
          nixpkgs.overlays = [
            spacebar.overlay
          ];
        }
      ];
    };
  };
}

Or try it out with nix run github:cmacrae/spacebar/v1.4.0!

spacebar can be configured and managed in a declarative manner using the services.spacebar module in nix-darwin

Accessibility Permissions

spacebar makes use of the macOS Accessibility APIs - after starting spacebar, you should be prompted to grant access.
Open System Preferences.app and navigate to Security & Privacy, then Privacy, then Accessibility. Click the lock icon at the bottom and enter your password to allow changes to the list. Check the box next to spacebar to allow accessibility permissions.

Configuration

spacebar is configured by setting config properties via its messaging socket. Not only does this mean you can try out config changes live, it also means spacebar's configuration file is simply a shell script - usually just a sequence of spacebar -m config <option> <value> statements.

spacebar's configuration file must executable and is looked for in the following locations (in this order) by default:

  • $XDG_CONFIG_HOME/spacebar/spacebarrc
  • $HOME/.config/spacebar/spacebarrc
  • $HOME/.spacebarrc

Getting started

To get started, create an empty configuration file and make it executable:

mkdir -p ~/.config/spacebar
touch ~/.config/spacebar/spacebarrc
chmod +x ~/.config/spacebar/spacebarrc

Here's a configuration taken from examples/:

#!/usr/bin/env sh

spacebar -m config position             top
spacebar -m config height               26
spacebar -m config title                on
spacebar -m config spaces               on
spacebar -m config clock                on
spacebar -m config power                on
spacebar -m config padding_left         20
spacebar -m config padding_right        20
spacebar -m config spacing_left         25
spacebar -m config spacing_right        15
spacebar -m config text_font            "Helvetica Neue:Bold:12.0"
spacebar -m config icon_font            "Font Awesome 5 Free:Solid:12.0"
spacebar -m config background_color     0xff202020
spacebar -m config foreground_color     0xffa8a8a8
spacebar -m config space_icon_color     0xff458588
spacebar -m config power_icon_color     0xffcd950c
spacebar -m config battery_icon_color   0xffd75f5f
spacebar -m config dnd_icon_color       0xffa8a8a8
spacebar -m config clock_icon_color     0xffa8a8a8
spacebar -m config power_icon_strip      
spacebar -m config space_icon_strip     I II III IV V VI VII VIII IX X
spacebar -m config space_icon           
spacebar -m config clock_icon           
spacebar -m config dnd_icon             
spacebar -m config clock_format         "%d/%m/%y %R"
spacebar -m config right_shell          on
spacebar -m config right_shell_icon     
spacebar -m config right_shell_command  "whoami"

echo "spacebar configuration loaded.."

Note: Ensure fonts are installed to use glyphs

For further configuration documentation, please see man spacebar

Declarative configuration with Nix

If you're using the services.spacebar module from nix-darwin, you can configure spacebar like so:

{
  services.spacebar.enable = true;
  services.spacebar.package = pkgs.spacebar;
  services.spacebar.config = {
    position                   = "top";
    display                    = "main";
    height                     = 26;
    title                      = "on";
    spaces                     = "on";
    clock                      = "on";
    power                      = "on";
    padding_left               = 20;
    padding_right              = 20;
    spacing_left               = 25;
    spacing_right              = 15;
    text_font                  = ''"Menlo:Regular:12.0"'';
    icon_font                  = ''"Font Awesome 5 Free:Solid:12.0"'';
    background_color           = "0xff202020";
    foreground_color           = "0xffa8a8a8";
    power_icon_color           = "0xffcd950c";
    battery_icon_color         = "0xffd75f5f";
    dnd_icon_color             = "0xffa8a8a8";
    clock_icon_color           = "0xffa8a8a8";
    power_icon_strip           = " ";
    space_icon                 = "•";
    space_icon_strip           = "1 2 3 4 5 6 7 8 9 10";
    spaces_for_all_displays    = "on";
    display_separator          = "on";
    display_separator_icon     = "";
    space_icon_color           = "0xff458588";
    space_icon_color_secondary = "0xff78c4d4";
    space_icon_color_tertiary  = "0xfffff9b0";
    clock_icon                 = "";
    dnd_icon                   = "";
    clock_format               = ''"%d/%m/%y %R"'';
    right_shell                = "on";
    right_shell_icon           = "";
    right_shell_command        = "whoami";
  };
}

Integration with yabai

yabai provides the external_bar config option. This can be used so yabai plays nice with spacebar.
Take a look at this excerpt from the yabai man page

  external_bar [<main|all|off>:<top_padding>:<bottom_padding>]
      Specify top and bottom padding for a potential custom bar that you may be running.
      main: Apply the given padding only to spaces located on the main display.
      all:  Apply the given padding to all spaces regardless of their display.
      off:  Do not apply any special padding.

So, if you like having spacebar at the bottom, you'd use yabai -m config external_bar all:0:26

You can also use the command spacebar -m config height with no argument to get the current height, which you could then use in conjunction with external_bar:

SPACEBAR_HEIGHT=$(spacebar -m config height)
yabai -m config external_bar all:0:$SPACEBAR_HEIGHT

Debug output and error reporting

In the case that something isn't working as you're expecting, please make sure to take a look in the output and error log. To enable debug output make sure that your configuration file contains spacebar -m config debug_output on or that spacebar is launched with the --verbose flag.

Homebrew

If you're using the Homebrew service, the log files can be found in the following directory:

# directory containing log files (HOMEBREW_PREFIX defaults to /usr/local unless you manually specified otherwise)
$HOMEBREW_PREFIX/var/log/spacebar/

# view the last lines of the error log 
tail -f /usr/local/var/log/spacebar/spacebar.err.log

# view the last lines of the debug log
tail -f /usr/local/var/log/spacebar/spacebar.out.log

Nix

If you're using the Nix service, you can set up debugging like so:

{
  services.spacebar.config.debug_output = "on";
  launchd.user.agents.spacebar.serviceConfig.StandardErrorPath = "/tmp/spacebar.err.log";
  launchd.user.agents.spacebar.serviceConfig.StandardOutPath = "/tmp/spacebar.out.log";
}

Upgrading

To upgrade the Homebrew package, run

brew services stop spacebar
brew upgrade spacebar
brew services start spacebar

If you're using the Nix package form the nixpkgs collection and keeping your channels up to date, package upgrades will roll in as you command.
If you're using the Nix Flake, you can update your input.spacebar.url to point to the latest release tag and update your lockfile.

Requirements and Caveats

Please read the below requirements carefully.
Make sure you fulfil all of them before filing an issue.

Requirement Note
Operating System macOS Catalina 10.15.0+ is supported.
Accessibility API spacebar must be given permission to utilize the Accessibility API and will request access upon launch. The application must be restarted after access has been granted.

Please also take note of the following caveats.

Caveat Note
Code Signing When building from source (or installing from HEAD), it is recommended to codesign the binary so it retains its accessibility and automation privileges when updated or rebuilt.
Mission Control In the Mission Control preferences pane in System Preferences, the setting "Automatically rearrange Spaces based on most recent use" should be disabled.

Releases and branches

Main work for this project is conducted on the master branch, and thus it should be considered unstable (expect bugs!).
There is no particular release cycle, just as and when features/fixes are ready :)

License and Attributions

spacebar is licensed under the MIT License, a short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.

Many thanks to @koekeishiya for creating yabai, and providing the codebase for an example status bar, from which this project was born.

Disclaimer

Use at your own discretion.
I take no responsibility if anything should happen to your machine while trying to install, test or otherwise use this software in any form.

spacebar's People

Contributors

cmacrae avatar cxa avatar jraregris avatar moni-dz avatar somdoron 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  avatar  avatar  avatar  avatar  avatar  avatar

spacebar's Issues

Migrating from yabai

Sorry, it's not an "issue", but this is a straight-forward way to enable spacebar.


Get the example rc file:

$ mkdir ~/.config/spacebar
$ # this will overwrite your `spacebarrc` if you have one
$ curl -L https://raw.github.com/somdoron/spacebar/master/examples/spacebarrc > ~/.config/spacebar/spacebarrc

Get the latest spacebar:

$ # WE NEED THE HEAD VERSION (for now; see #6, #8)
$ brew install somdoron/formulae/spacebar --HEAD

Let yabai make space for spacebar:

$ echo '# make space for spacebar' >> ~/.config/yabai/yabairc
$ echo 'yabai -m config top_padding 26' >> ~/.config/yabai/yabairc

Now let's start:

$ brew services start spacebar

And confirm the request to use the Accesibility. We're ready!

[Request for consideration]: Project ownership

Hey @somdoron 👋

As I'm sure you've noticed, I've been contributing quite a bit and implementing features people are requesting.
I'm not sure what your free time/freedom to work on spacebar are like of course, but I'd like to float the idea of possibly transferring the project over to my GitHub.

I intend to continue working on spacebar and it'd be nice to be able to handle releases and would fit nicely with my Nix package maintenance.

Of course, I don't want to encroach, so I do hope you understand this is an open dialogue coming from a good place :)

Does not recognize options in configuration file

When I start via brew services start spacebar or manually it does not recognize the configuration file and loads the default configuration

➜ spacebar -c .config/spacebar/spacebarrc 
unknown command 'text_font' for domain 'config'
unknown command 'icon_font' for domain 'config'
unknown command 'background_color' for domain 'config'
unknown command 'foreground_color' for domain 'config'
unknown command 'space_icon_strip' for domain 'config'
unknown command 'power_icon_strip' for domain 'config'
unknown command 'space_icon' for domain 'config'
unknown command 'clock_icon' for domain 'config'
unknown command 'clock_format' for domain 'config'
spacebar configuration loaded..

The file has the following permissions :

➜ ls -ltr .config/spacebar/spacebarrc 
-rwxr-xr-x  1 kaos  staff  521 Apr 25 01:27 .config/spacebar/spacebarrc

possible typo in man page

I'd like to start by letting you know that this is a wonderful project, and I really appreciate the work that has gone into making this work. I think there might be a typo in the man page... man spacebar tells me, under "DESCRIPTION", that spacebar is a tiling window manager for macOS based on binary space partitioning. I wonder if this was copied from the yabai man page and not edited; I believe it should read instead something more like 'spacebar is a minimal status bar for macOS ideal for use with tiling window managers like yabai.' Thanks! (edit: thanks for the pull request, merging that should fix the issue!)

unknown command errors

For spacebar 1.2.1 and yabai-v3.3.7 getting following errors for tail -f /usr/local/var/log/spacebar/spacebar.err.log

unknown command 'right_shell_command' for domain 'config'
unknown command 'title' for domain 'config'
unknown command 'spaces' for domain 'config'
unknown command 'clock' for domain 'config'
unknown command 'power' for domain 'config'
unknown command 'padding_left' for domain 'config'
unknown command 'padding_right' for domain 'config'
unknown command 'right_shell' for domain 'config'
unknown command 'right_shell_icon' for domain 'config'
unknown command 'right_shell_command' for domain 'config'

Request: Run two instances

Now that we have the ability to do things like hide/show application titles and show shell output (thanks @cmacrae!) I'm interested in running two bars. One on top showing the traditional stuff and one on bottom showing more custom shell output.

I thought maybe I could run two instances but when I try to fire up a second instance I get a lock file error.

spacebar: could not acquire lock-file! abort..

That makes sense as I'm sure I'm trying to use it in a non-standard way. My question is could spacebar support this in the future?

[Feature Request] Transparent status bar

Would it be possible to have an option to be able to set the opacity of the status bar in the spacebarrc config file? Something like:

spacebar -m config bar_opacity 0.9

I managed to manually set the opacity in the bar_refresh function in bar.c by using CGContextSetAlpha like so:

image

It does work, however it requires the status bar to refresh itself first so upon first loading it will not set the opacity, but this was more of a trial to see if it worked.

I'm not very familiar with C, so I'm not too sure how the options are read in from the spacebarrc file and used within the code but hopefully this could be something not too hard to implement (I like having my windows in yabai slightly transparent so if the status bar could also match that then that would be really nice).

Move to GitHub Actions for CI

Should build using make and potentially upload the binary for releases.
Also, when a Nix flake has been added, should automate builds using this.

resize bar height

The simplest version of this request:

  • a setting to adjust bar height

A more complicated feature request:

  • automatically adjust bar height by font size (and, I guess, offer a command that reports this, so that yabai's top_padding can be adjusted to match)

Getting space_icon_strip sets it to empty.

I want to get the value of space_icon_strip, but when i call spacebar -m config space_icon_strip, I get no output, and all the space icons are set to *.

I expected it to output the value of space_icon_strip in the same way spacebar -m config space_icon outputs *.

Is this a bug, or am I misunderstanding the intended behavior?

Error: running as root

When running spacebar as brew service bar does not appear and output of
/usr/local/var/log/spacebar/spacebar.err.log is
spacebar: running as root is not allowed! abort..

On the other hand running it directly from terminal is fine.

spacebar can only show 2 space icons

hello, I have installed spacebar by

brew install somdoron/formulae/spacebar

and .config files as follows

#!/usr/bin/env sh

# Spacebar setting
# spacebar -m config status_bar                   on
spacebar -m config status_bar_text_font         "Helvetica Neue:Bold:12.0"
spacebar -m config status_bar_icon_font         "Font Awesome 5 Free:Solid:12.0"
spacebar -m config status_bar_background_color  0xf0202020
spacebar -m config status_bar_foreground_color  0xf0a8a8a8
spacebar -m config status_bar_space_icon_strip           
spacebar -m config status_bar_power_icon_strip   
spacebar -m config status_bar_space_icon        
spacebar -m config status_bar_clock_icon        
spacebar -m config status_bar_clock_format      "%A %d %B %R"

but I have only 2 space icons, how can I fix it?
have any idea for me? Thank you.
image

Multi font icon support

Hey,
using this awesome module (with nix 😍 ), I'd like to know if its possible atm to use multiple fonts for icon as so :

{
  icon_font = ''"Font Awesome 5 Free:Solid:12.0, Font Awesome 5 Brands:Courant:12.0"'';
}

or if there's another way to achieve that ?

space_icon_strip number show error

After I use the spacebar, it will always have an extra one in the number of display windows. Which one can help me solve this problem, thank you

spacebarrc :

image

show

image

image

space num is disagreement with num in bar

Xnip2020-11-19_09-47-19
Xnip2020-11-19_10-00-39

image

space num is disagreement with num in bar, and the max index num in bar is one larger than the number of real spaces. I want to know why?Is it my configuration problem?

Re-think documentation updates for upcoming features

As outlined in #60, it's pretty confusing that I update the example configs/documentation as I merge unreleased features into the master branch. This is the documentation users read when visiting the project and of course it details how to install spacebar via Homebrew/Nix, who's available version won't align with that documentation.

This makes for a bad user experience. Documentation/example changes should come with the relevant feature release.

Option to set inactive space icons

I know this may make the configuration a little messy, but personally I'd prefer to grey out the inactive spaces and have my current space as the foreground colour. I hacked it into my fork but now that you're back maybe a cleaner implementation is possible?

long window title will mess the right section

I stumbled across this issue when I shopped in Amazon. I found that if the window title is too long, it will occupy the room of the right part, i.e., the charging status and time section. I attached a screenshot below:

image

Thank you.

Space between 2 values

Hey,
I just started using spacebar, and I'm loving it! One thing I would really like is to space out the values like date, time, power etc. Right now, it looks very congested to me (see screenshot below). I tried going through the man page, but I couldn't find any entry for this. I even tried to make the icons as a string in quotes and including the space in that, but that messed up the spacing even more (see below).

Is there any possibility of setting the spacing on our own? Another feature I would like is setting the position of the values by the user - Like date and time on the left, battery on the right etc.

Without spacing in icons:
Screenshot 2020-08-05 at 8 31 56 AM

With spacing in icons (" "):
Screenshot 2020-08-05 at 8 35 10 AM

Bar disappears for some window title

macOS version: 10.15.6 (the latest)
spacebar: the latest master

I came across this issue when I browsed this website using Chrome, https://www.v2ex.com/t/691049#reply3. You could see that the bar disappears. But, if I open it using Safari, the bar works well. (Another example website: https://www.v2ex.com/t/691070#reply0)

image

Initially, I suspected that this issue happened for the window title containing Chinese words and is very long, however, I tested this website, https://www.v2ex.com/t/691061#reply19, and I found the bar didn't disappear (using Chrome). But, if I open this website using Safari, the bar disappears (interesting...hum...). That's weird. Another thing is that even though the bar works well for this website using Chrome, the bar only shows a few words and it actually still has many rooms for more words.

image

So far I found this issue only happens for the window title including Chinese words (I don't know whether or not the Chinese words cause this issue but it is very likely). I am not sure whether it would happen for some window title containing all English words.

What's more, for some long window title, the bar only shows one word, i.e., it is truncated right after the first word. For example, try this website, https://www.geeksforgeeks.org/must-do-coding-questions-for-companies-like-amazon-microsoft-adobe/. (only happens for Chrome, not Safari)

image

Furthermore, 100 characters are good for English words, i.e., it can contain many words, but for Chinese words, I think it is not enough as the second screenshot above shows, the bar only shows very few Chinese words.

Sorry for my long statement, and thank you very much.

Provide a release tarball

With the pipeline provided in #54, when we do the next release we should upload a release asset comprised of the binary, example spacebarrc, and documentation.

With this, we can provide a precompiled Homebrew package, for people wanting to use spacebar on their systems without the headers installed. It also makes for another option for users to install :)

Provide a Nix Flake

Nix Flakes provide a hermetic solution to building/providing software.
This is the future of Nix, so we should provide one :)

Spaces module not affected by font change

The status_bar_text_font variable is not applying to the spaces module.

To illustrate this issue, I set the font to 18

image

As you can see, all of the other text in the status bar is size 18 except for the number 1, 2 and 3 in the spaces module which stay the same size no matter what font size I set

Space information for all monitors on each monitor

First of all, thank you so much for this project!

Before I switched to spacebar I was using an ubersicht bar where my spaces widget looked like this:

image

This indicates:

  • Spaces 1, 2 and 3 are on monitor 1, and space 2 is the active space
  • - is a visual separator for monitors
  • Spaces 4 and 5 are on monitor 2, and space 5 is the active space
  • This widget will therefore look the same on all monitors

Any chance it would be possible to add a new option to specify if you want the spaces module to display spaces "per monitor" (like it is currently implemented) or "all" like my screenshot above?

Thanks again

Changing monitors *sometimes* makes spacebar disappear

Not sure how to diagnose this, but sometimes plugging into an external monitor, Spacebar doesn't render.

Looking at the logs, there doesn't seem to be any issue, and the service is still running.

Restarting the service fixes it (I was just looking to auto-restart the service on monitor change when I thought to raise an issue for it).

Transparency

Hi, is there an option to set transparency?

Kinds regards,
Micha

Shell output not refreshing

I'm trying out the latest changes from master and I have been able to display output from a shell script but it's static. I had assumed it would refresh on a regular interval. Here's the configuration I have:

spacebar -m config title                off
spacebar -m config center_shell_command "~/.config/spacebar/mpd"
spacebar -m config center_shell         on

This script uses mpc and echos a simple string showing my currently playing music.


On a somewhat related note. When I enable the above configuration my bar never renders completely. Most times my clock_icon is not visible. Occasionally my power_icon_strip will be missing. Whenever I start up spacebar the center shows the current app title and then changes to output from my shell script. Sometimes it doesn't make that transition (app title stays visible).

I've tried running with the --verbose flag but as far as I can tell all is well from that output.

❯ ./bin/spacebar --verbose
process_is_observable: loginwindow was marked as agent! ignoring..
...
process_is_observable: yabai was marked as background only! ignoring..
process_is_observable: spacebar was marked as background only! ignoring..
EVENT_HANDLER_DAEMON_MESSAGE: config text_font San Francisco Display:Medium:14.0
EVENT_HANDLER_DAEMON_MESSAGE: config icon_font FontAwesome:Regular:14.0
EVENT_HANDLER_DAEMON_MESSAGE: config background_color 0xff2E3440
EVENT_HANDLER_DAEMON_MESSAGE: config space_icon_color 0xff5e81ac
EVENT_HANDLER_DAEMON_MESSAGE: config foreground_color 0xffd8dee9
EVENT_HANDLER_DAEMON_MESSAGE: config power_icon_color 0xffd8dee9
EVENT_HANDLER_DAEMON_MESSAGE: config battery_icon_color 0xffd8dee9
EVENT_HANDLER_DAEMON_MESSAGE: config clock_icon_color 0xffd8dee9
EVENT_HANDLER_DAEMON_MESSAGE: config dnd_icon_color 0xffbf616a
EVENT_HANDLER_DAEMON_MESSAGE: config position top
EVENT_HANDLER_DAEMON_MESSAGE: config spacing_right 20
EVENT_HANDLER_DAEMON_MESSAGE: config title off
EVENT_HANDLER_DAEMON_MESSAGE: config center_shell_command ~/.config/spacebar/mpd
EVENT_HANDLER_DAEMON_MESSAGE: config center_shell on
EVENT_HANDLER_DAEMON_MESSAGE: config space_icon_strip       
EVENT_HANDLER_DAEMON_MESSAGE: config power_icon_strip  
EVENT_HANDLER_DAEMON_MESSAGE: config space_icon 
EVENT_HANDLER_DAEMON_MESSAGE: config clock_icon 

I realize that this implementation is brand new and there are likely kinks to work out. I thought it might be valuable to report back some real world experiences.

Just want to say "THANK YOU"

Thank you @cmacrae for taking over this project, an essential for our yabai users.
Thank you for such an active development to improve and perfect it in your spare time.
Thank you for your responsiveness to our requests.
Thank you for your great organization so that we can keep tracking of the progress of the development.
Thank you very much!

You can feel free to close this! :)

Thank you and are you gonna add more configuration options?

Dear developer,

Thank you so much for your effort in extracting the menu bar from yabai. So far I see we can configure the time format to show the date on the menu bar. I am wondering if you have a plan to add more configuration options? For example, to add some components showing the CPU/MEM/HD info, or the volume info which is probably the must-have component in the menu bar.

Also, could you please share your plans to develop this amazing and must-have project for yabai users?

Thank you very much. Stay safe and healthy.

Feature Request: Add Option for Date

The one thing that I've always missed while using the bar from yabai is having the current date visible (apparently I have a hard time remembering the date).

restarting spacebar when yabai restarts

I noticed that when I edit and save my spacebarrc, nothing updates. I had to restart spacebar with brew

brew services restart spacebar

Is there a way for you to restart spacbar along yabai when restarting yabai with this command?

launchctl kickstart -k "gui/${UID}/homebrew.mxcl.yabai"

A workaround that I found is to just kill spacebar in the yabai config file:

killall spacebar &>/dev/null

This will kill spacebar, but it will restart itself immediately, reloading the config file.

BTW: Abosolute great work on this project, hoping to see you take this further!

Option to hide the current application's title from a config value?

Would it be possible to hide the current application's title from a config value, maybe something like spacebar -m config title <on|off>?

Apologies as I would try to figure out how to implement and do a pull request, but I have no idea on how to work with C, although I will still try to implement it but I'd thought I'd make an Issue in case if someone who is more experienced in C would be down to implement it.

Bar position

I think it will be great to have the choice of selecting the position of the status bar. I will not expect left and right, but I think bottom can be helpful.

e.g. yabai -m config status_bar_position bottom

(cloned from koekeishiya/yabai#484)

Nix package now generally available

👋 Hope you don't mind an issue being opened for this, but I figured it was a good way to notify you and an easy way for people to discover if they were looking for Nix support:

I submitted a package for spacebar to the nixpkgs repository the other day. I'm happy to say, following the merge, it is now generally available on the nixpkgs-unstable channel 🎉

$ nix-channel --list
darwin https://github.com/LnL7/nix-darwin/archive/master.tar.gz
nixpkgs https://nixos.org/channels/nixpkgs-unstable

$ nix-env -qaP --description spacebar
nixpkgs.spacebar  spacebar-0.5.0  A status bar for yabai tiling window management

I've also submitted a service module to LnL7/nix-darwin. It lets you configure spacebar like so:

{
    services.spacebar.enable = true;
    services.spacebar.config = {
      clock_format     = "%R";
      space_icon_strip = "   ";
      text_font        = ''"Helvetica Neue:Bold:12.0"'';
      icon_font        = ''"FontAwesome:Regular:12.0"'';
      background_color = "0xff202020";
      foreground_color = "0xffa8a8a8";
      power_icon_strip = " ";
      space_icon       = "";
      clock_icon       = "";
    };
}

Please feel free to simply close this issue :) I just wanted to let you know.
I'd be happy to submit a PR updating the README, if that's something you'd want

Switching spaces

Displaying the spaces works great, would it be possible to make the numbers react on mouse clicks for switching spaces?

Unknown Domains

spacebar
unknown command 'text_font' for domain 'config'
unknown command 'icon_font' for domain 'config'
unknown command 'background_color' for domain 'config'
unknown command 'foreground_color' for domain 'config'
unknown command 'space_icon_strip' for domain 'config'
unknown command 'power_icon_strip' for domain 'config'
unknown command 'space_icon' for domain 'config'
unknown command 'clock_icon' for domain 'config'

Adapt to Big Sur

Hello,

macOS Big Sur has come out and I found the "Do not disturb" indicator doesn't work.

Another improvement I want to mention is that the refresh speed is very slow for creating or removing a workspace, and swap workspace. For example, if I create a new workspace, say the 4th workspace (I already have 3 workspaces), I have to wait a while before the number 4 is shown on the bar.

Thank you very much. 👊

More robust support for plugins/sections/blocks

The new shell config options are amazing, being able to add custom output means I can finally stop using Uebersicht so thank you!

I'd love to see the ability to stack multiple commands from the left and right sides rather than just a single command for each, this has tons of benefits. Each plugin/block would provide an icon, command and update interval (on click actions would be incredible too if that's even possible).

Updated Release?

My version (installed via brew) doesn't support the new clock format. Any chance we could get an updated release :)

I don't believe I have an updated XCode environment on this laptop otherwise I could try to rebuild myself.

Spacebar with nerfont

Hi,

Thank you for this project!
I wonder is it possible to make it work with nerd font? I don't get any icons in my bar, unfortunately.

Config:
Screenshot 2020-10-07 at 09 04 13

I didn't get any icons before either when i manually tried to install font-awesome.

Unrelated question

What are you using as a web browser in the provided screenshot, as well as removing the 'traffic lights' from the other windows

image

Add option to configure left and right spacing

It'd be nice to be able to configure the spacing between the left edge of the screen and the first space icon, and between the clock and the right edge of the screen.

Note that I'm not talking about spacebar -m config spacing_left and spacebar -m config spacing_right, those only control the spacing between the blocks, not the spacing between the first (last) block and the left (right) edge of the screen.

Plugins?

Not attempting to duplicate functionality from ubersicht or something else super bloated, but are there any plans on providing support for plugins?

For example, I would love to have Apple Music/Spotify currently playing title information displayed in my bar.

Underlines removal and configurable status line

  1. Is it possible to completely remove underlines in spacebar and highlight the active desktop number itself with a color? It's not a feature request, I'm just asking for a little coding guidance, 'cause I don't know C language at all. May be someone can indicate the necessary lines of source code that should be changed to achieve the desired result?

  2. It'll be neat to have a configurable central status line. It can be used not only for showing the current active process/window name, but also for music, calendar, command output and whatever else.

Homebrew Install on Big Sur 11.2 fails - "Calling ENV.02 is disabled!"

  • Installation on MacOS Big Sur with homebrew fails miserably, throwing message "MethodDeprecatedError: Calling ENV.O2 is disabled! There is no replacement."

Verbose logging from terminal (after downloading and verifying checksum without errors) below:

tar xof /Users/NNN/Library/Caches/Homebrew/downloads/32f3baf9c2018c7a6739719bc33f84473ac306ab6546f4902334e9162444bf9e--spacebar-1.2.1.tar.gz -C /private/tmp/d20210209-23847-11gukq3
cp -pR /private/tmp/d20210209-23847-11gukq3/spacebar-1.2.1/. /private/tmp/spacebar-20210209-23847-8kr4x8/spacebar-1.2.1
chmod -Rf +w /private/tmp/d20210209-23847-11gukq3
Error: An exception occurred within a child process:
MethodDeprecatedError: Calling ENV.O2 is disabled! There is no replacement.
Please report this issue to the cmacrae/formulae tap (not Homebrew/brew or Homebrew/core):
/usr/local/Homebrew/Library/Taps/cmacrae/homebrew-formulae/spacebar.rb:15

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.