Skip to content
This repository has been archived by the owner on Apr 9, 2022. It is now read-only.

terminal needs to stay open for undot to work #1

Closed
DaveFlashNL opened this issue Dec 21, 2021 · 11 comments
Closed

terminal needs to stay open for undot to work #1

DaveFlashNL opened this issue Dec 21, 2021 · 11 comments

Comments

@DaveFlashNL
Copy link

DaveFlashNL commented Dec 21, 2021

it seems terminal needs to stay open/active, is there another way to run this? preferably using a menu bar app to turn the function on/off when a user wants?

other than that, it works brilliantly, stupid dot finally gone when I don't want it in full screen

haha... if I read the script right, the dot is not gone but undot merely moves its position outside of the screen real-estate :_) Amazing!

@JayBrown
Copy link

You could probably execute

while :
do
     /usr/local/bin/undot
     sleep 1
done

as a shell script, and run that shell script with a macOS LaunchAgent, setting the agent to: run at load & always keep alive.

@DaveFlashNL
Copy link
Author

ok

@DaveFlashNL
Copy link
Author

I've since built two AppleScript apps, one to start undot and one to stop it and the bash background process, I'm in the process of refining them, at which point I will for this repo and include those scripts and apps

@JayBrown
Copy link

You could also create a shell script for xbar: https://github.com/matryer/xbar … that way you'd have undot with menu bar functionality.

@nicolasdanelon
Copy link

Gosh bless you m#ther f$#ker! thanks!

@s4y s4y changed the title terminal needs to stay open for undo to work terminal needs to stay open for undot to work Dec 22, 2021
@Write
Copy link

Write commented Dec 22, 2021

I personally added this script in Preferences > Users > Login items

#!/bin/bash
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
nohup bash -c "while :; do $SCRIPT_DIR/undot/undot; sleep 1; done" </dev/null >/dev/null 2>&1 &

@taninke
Copy link

taninke commented Dec 24, 2021

I personally added this script in Preferences > Users > Login items

#!/bin/bash
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
nohup bash -c "while :; do $SCRIPT_DIR/undot/undot; sleep 1; done" </dev/null >/dev/null 2>&1 &

Stupid question, but how do I add a script to Login items?

@Write
Copy link

Write commented Dec 24, 2021

Create a file name yourscript.sh somewhere (I put mine in ~/Scripts), then in login items you can click the + arrow to add the shell script to be launch at login.
Don't forget to chmod +x yourscript.sh in a terminal to allow it to be executed.
Also sometimes .sh file are set to open with text editor by default, so you can also right-click yourscript.sh (or cmd + i), then click Get Info and set the file to actually be opened by the Terminal app.

The only downside to my script is that it'll show a terminal when first logging in after a boot for a very short time.

@shatteredsite
Copy link

shatteredsite commented Dec 25, 2021

I used the script with automator to create an app. Give the app accessibility privileges and set to startup on login. Works perfectly!

EDIT: Open app on startup doesn't work consistently for some reason. So I put the Automator app that runs the bash script in the dock and just open when I need to.

@s4y
Copy link
Owner

s4y commented Dec 26, 2021

I've made a few changes so that:

  1. Undot keeps running and hides the window right away.
  2. Undot is a real application, so you can add it to your login items.

Give it a shot and let me know how it works! I'm going to close this bug, but feel free to keep commenting, and I'll reopen it if it doesn't resolve the issue.

@s4y s4y closed this as completed Dec 26, 2021
@jamesf-hub
Copy link

thank you so much @s4y !!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants