From 0371e316fda9a28b450e409f7bcdacd877f2989a Mon Sep 17 00:00:00 2001 From: relikd Date: Thu, 21 Oct 2021 16:21:28 +0200 Subject: [PATCH] add alternative dots-icon --- README.md | 52 ++++++++++++++++++++++++------------------- img/status_icons.png | Bin 0 -> 1365 bytes src/main.swift | 30 +++++++++++++++++++++---- 3 files changed, 55 insertions(+), 27 deletions(-) create mode 100644 img/status_icons.png diff --git a/README.md b/README.md index 831f594..7681085 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,34 @@ Memmon remembers what your Mac forgets – A simple deamon that restores your window positions on external monitors. + +## Install + +1. You will need macOS 10.10 or newer. +2. Grant Memmon the Accessibility privilege. Go to "System Preference" > "Security & Privacy" > "Accessibility" and add Memmon to that list. Otherwise, you can't move other application windows around and the app has no purpose. +3. Thats it. The app runs in your status bar. + + +### Status Icon + +You can hide the status icon either via `defaults` or the same-titled menu entry. If you do so, the only way to quit the app is by killing the process (with Activity.app or `killall Memmon`). + +Memmon has exactly one app-setting, the status icon. You can manipulate the display of the icon, or hide the icon completely: + +```sh +# disable status icon completely +defaults write de.relikd.Memmon icon -int 0 +# Use window-dots-icon +defaults write de.relikd.Memmon icon -int 1 +# Use monitor-with-windows icon (default) +defaults write de.relikd.Memmon icon -int 2 +# re-enable status icon and use default icon +defaults delete de.relikd.Memmon icon +``` + +![status icons](img/status_icons.png) + + ## FAQ ### Why‽ @@ -23,33 +51,11 @@ Yes, for example [Mjolnir](https://github.com/mjolnirapp/mjolnir) or [Hammerspoo ### What is it good for? -First off, Memmon is just 130 lines of code – no dependencies. You can audit it in 5 minutes. Or just build it from scratch if you like (just run `make`). +First off, Memmon is just 140 lines of code – no dependencies. You can audit it in 5 minutes and build it from scratch – just run `make`. Secondly, it does one thing and one thing only: Save and restore window positions whenever your monitor setup changes. -## Install - -1. You will need macOS 10.10 or newer. -2. Grant Memmon the Accessibility privilege. Go to "System Preference" > "Security & Privacy" > "Accessibility" and add Memmon to that list. Otherwise, you can't move other application windows around and the app has no purpose. -3. Thats it. The app runs in your status bar. - ### Develop You can either run the `main.swift` file directly with `swift main.swift`, via Terminal `./main.swift` (`chmod 755 main.swift`), or create a new Xcode project. Select the Command-Line template and after creation replace the existing `main.swift` with the bundled one. - -To build the app run `make`. - - -### Hide Status Icon - -You can hide the status icon either via the same-titled menu entry. If you do so, the only way to quit the app is by killing the process (with Activity.app or `killall Memmon`). - -If you like to hide the icon directly on launch, use this app-setting: - -```sh -# disable status icon completely -defaults write de.relikd.Memmon invisible -bool True -# re-enable status icon -defaults delete de.relikd.Memmon invisible -``` diff --git a/img/status_icons.png b/img/status_icons.png new file mode 100644 index 0000000000000000000000000000000000000000..2e0f3508d0b0ec58e8f684f4d55a59f7276009af GIT binary patch literal 1365 zcmeAS@N?(olHy`uVBq!ia0y~yVANq?V3@|iz`(%ZXz+@Ufq_-V)5S5Qg7M9bjlC+0 z0&Wk*ITHn#H76WYxxiV%@Z;_F{@&i+?%&IcqV6sz{J!kfl8YVBx3urtm+HONad-Uo zjb_)5-HMRTPJVkKFFAKj@7LCd$9hj+Z3ygna&CCQL9c_p)4(F!+) zO;ca9G!$4SeLZk$k*Uyx)c4OKH)P7L(X(H}Gr`#5%I&WW{MQ&dEEy7`&R)J>d}o7| zK)Z=>z}GzfIUBeFmi%PMJNd=w@6VjL2=fB{tw}$e z`@OtVZ_`{Kzt;Kk`G3;Pwyy_gJ-=B$PgG-5c;nBd5vwH|^@?pBr|DmNF~8MR_(MTt zL(98v(*^ZHVf_wsHceyn`((=B zGsi{TEV$*f=H30Cqx);FA4on?vRP=(x7kxGLUop(6=Lx4E!r8m`dZfPUne(gzOw6$ zwfEbpPq&y}`|&iQ{?>MOJ@b7A43F`w_)z|CBvIn}3y!sh@byuv@_Nw*$?@QMTZU6c)-M?~; zWVUo<@b^NeyK4`-Wv5p#yzb00iIx67mA!f!sZsJnyg`bc$R^8b;|}e?FDxASzk*h2xngiul^nLbbq3QZk~U8 zQljjp^Jrf`dUc|utkc=Tdzz)M>z#K#+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