Comments (7)
I don't know why Monterey is different from Ventura and Sonoma (which both work fine). There is a defaults read-type <domain> <key>
command which gives the type (e.g. BOOL) of each <key>
in <domain>
. I guess you could do defaults read...
to get everything and then iterate over the keys, calling defaults read-type
on each and using the output to generate a fully qualified defaults write...
command for each key.
from itsycal.
Thanks for reporting.
What happens if you delete it and then download it from the website instead of Homebrew?
from itsycal.
That didn't do anything for me but the following script I threw together fixed the issue.
#!/bin/sh
pkill Itsycal &&
defaults delete com.mowglii.ItsycalApp &&
open -a Itsycal
It looks like it only happens when the defaults
utility is used to write to the ShowLocation
key. All the other keys are fine to modify it seems.
Running the test script below works perfectly fine to set my defaults. However if I uncomment the line setting ShowLocation it'll render the app in the aforementioned unusable state. This happens whether its set to 0 or 1, regardless of whether the defaults write command is even changing the value set by the gui.
#!/bin/sh
if pgrep Itsycal > /dev/null; then
pkill Itsycal
fi
if defaults domains | grep com.mowglii.ItsycalApp > /dev/null; then
defaults delete com.mowglii.ItsycalApp
fi
defaults write com.mowglii.ItsycalApp ClockFormat "E MMM d" &&
defaults write com.mowglii.ItsycalApp HideIcon 1 &&
defaults write com.mowglii.ItsycalApp SUEnableAutomaticChecks 0 &&
defaults write com.mowglii.ItsycalApp ShowEventDays 7 &&
defaults write com.mowglii.ItsycalApp SizePreference 2 &&
defaults write com.mowglii.ItsycalApp "NSStatusItem Preferred Position ItsycalStatusItem" 110 &&
# defaults write com.mowglii.ItsycalApp ShowLocation 1 &&
open -a Itsycal
I took it from previously closed issues that defaults
was the way to "export/backup" my config. Is this not supported?
from itsycal.
I tried your script with the ShowLocation
line both commented and uncommented (and also with both 0
and 1
), but I could not reproduce the behavior you're experiencing. I am wondering what other differences there may be between our systems. I ran it on Ventura as well as Sonoma.
from itsycal.
Both systems I've tried it on are running monterey 12.7
uname -a
# Darwin clayton-mbp 21.6.0 Darwin Kernel Version 21.6.0: Fri Sep 15 16:17:23 PDT 2023; root:xnu-8020.240.18.703.5~1/RELEASE_X86_64 x86_64 i386 Darwin
from itsycal.
Can you trying changing that line to this:
defaults write com.mowglii.ItsycalApp ShowLocation -bool YES &&
I was able to reproduce the behavior on Monterey and making the above change worked for me. I will have to investigate the reason why.
from itsycal.
Cool that works for me too.
Looks like it works anytime you enter it as a boolean through defaults:
defaults write com.mowglii.ItsycalApp ShowLocation -bool true
defaults write com.mowglii.ItsycalApp ShowLocation -bool false
defaults write com.mowglii.ItsycalApp ShowLocation -bool YES
defaults write com.mowglii.ItsycalApp ShowLocation -bool NO
I still have the problem though of importing my config 😅
I generally save any relevant bits from defaults read
to a file and then apply them with default import
for all my preferred apps.
Running read
gives me the following:
defaults read com.mowglii.ItsycalApp
# {
# ClockFormat = "E MMM d";
# HideIcon = 1;
# "NSStatusItem Preferred Position ItsycalStatusItem" = 90;
# "NSWindow Frame SUUpdateAlert" = "968 14 938 518 0 0 1920 1080 ";
# SUEnableAutomaticChecks = 0;
# SUHasLaunchedBefore = 1;
# SULastCheckTime = "2023-10-11 01:47:04 +0000";
# SUSkippedVersion = 2260;
# SelectedCalendars = (
# "F3E57387-3448-427D-ADD9-7C682C52778D",
# "E595BDF8-E722-4A11-AE67-6D01C8B4E353",
# "69FAB19A-D295-4804-BCF9-7D39F318C9EE",
# "A7DD60A0-BAA2-4F96-A41A-520E1C9A6693",
# "EF6A98AC-0449-4501-B7DC-4DB436EBA0AC",
# "71FCE555-7B32-4963-BD1A-40BA9557692D",
# "238CCD93-0198-47A4-BDA6-9896DA1A0C28",
# "ED57D1DC-54EC-4A4F-82FC-BA1274CE6AB0",
# "C649B892-45A1-4EB4-993E-400A8A5F83DF",
# "15FB96F8-BC99-4FC8-90BF-7FD8DD5459AB"
# );
# ShowEventDays = 7;
# ShowLocation = 0;
# SizePreference = 2;
# }
of which I save the following to a file:
cat Itsycal.plist
# {
# ClockFormat = "E MMM d";
# HideIcon = 1;
# SUEnableAutomaticChecks = 0;
# "NSStatusItem Preferred Position ItsycalStatusItem" = 90;
# ShowEventDays = 7;
# SizePreference = 2;
# }
Running defaults import com.mowglii.ItsycalApp Itsycal.plist
imports these just fine.
That being said the equivalent of writing a bool
in this file would be a 0 or 1, and importing the config when it contains either of those for ShowLocation reproduces the bug.
I've tried changing it to YES/NO/true/false and it seems that regardless of the value that's written the bug is reproduced.
from itsycal.
Related Issues (20)
- why my cal the custom date display error HOT 3
- [Feature Request] Hide completed events / Scroll to current event
- [Feature Request] Countdown to the next event
- [Feature Request] Add link to open location of an event in Google maps or similar
- [Feature Request] Reset to today when Itsycal is closed HOT 3
- Adding the ability for the icon to display the number of active events in the month
- [Feature req' / Issue] getting to the settings menu with the Dock icon. HOT 3
- Itsycal opened and nothing shows. HOT 2
- [Feature Request] Integration with reminders too, not just calendars HOT 1
- why there is an extra column on my cal HOT 1
- Losing settings on MacOS shutdown or restart HOT 3
- Edit existing event?
- [Feature Request] Dual Timezone Display
- The event details popup does not appear if the attendee does not have a name. HOT 2
- Submit "Go to date" by keyboard HOT 2
- [Feature Request] Beep schedule
- [Feature Request] Show empty day even there is no eventy
- 'Open Calendar' opens Calendar.app to the wrong event HOT 6
- [Feature Request] Countdown for current event
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from itsycal.