Skip to content

zemua/TurkeyDesktop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tested in Ubuntu 20.04 and Macos Big Sur 11.6

Keep in system tray

image

Main screen

image

Categorize processes as positive (sums points) or negative (uses points until reaching 0, then get blocked)

image

Processes categorized as "Depends" can be categorized into "positive" or "negative" by the window title

image

You can create positive groups and negative groups, that can contain certain apps that you choose

image

image

image

You can add time to this group from external apps using synchronized txts, like from the Android app

image

Then you can add conditions for each group, if the conditions are not met, positive groups would not sum points, and negative groups would get directly blocked

image

If some apps categorized as "depends" are tools that you use for work, you can prevent them from closing even if you have a tab open with a title that is negative, so you don't lose your work.

image

Among other options, choose the proportion of time you need to "work" in order to get 1 minute of "playing". For example default proportion 4 would require that you work 4 hours to get 1 hour of playing.

Select a lockdown time where any app would decrease points and negative apps would directly get closed, handy for going to sleep when you should.

Receive notifications when time is running out or you are approaching the lockdown time.

image

Run At Startup

To run it in Macos go to ~/Library/LaunchAgents create a file devs.mrp.turkeydesktop.plist inside this file copy this adapted to your personal case

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        	<string>devs.mrp.turkeydesktop</string>
	<key>ProgramArguments</key>
    	<array>
		<string>java</string>
		<string>-Dapple.awt.UIElement="true"</string>
		<string>-jar</string>
		<string>/Users/username/TurkeyDesktop/TurkeyDesktop-1.0-SNAPSHOT-jar-with-dependencies.jar</string>
	</array>
        <key>RunAtLoad</key>
        	<true/>
        <key>KeepAlive</key>
        	<true/>
    </dict>
</plist>

To run it in Ubuntu at startup

create a script .sh file with this content (you can do the same SDK_MAN stuff as above)

#!/bin/bash
java -jar ~/TurkeyDesktop-1.0-SNAPSHOT-jar-with-dependencies.jar

Give this script file permissions to run as an application Then search for "startup apps" application and add a new command

/home/username/initTurkey.sh

Ubuntu

For this to work in Ubuntu you need to install the following

sudo apt-get install xprintidle sudo apt-get install xdotool

xdotool works with X.org so if you have installed some recent version of Ubuntu you may probably be running Wayland and the program will not be able to detect the current window. Currently there are no substitutes for xdotool that work with Wayland, only partially https://github.com/atx/wtype and https://github.com/ReimuNotMoe/ydotool can perform some keyboard/mouse actions.

You can still choose to use X.org from the login screen in the configuration cog, details here: https://itsfoss.com/switch-xorg-wayland/

Mac

To disable the application from closing instantly in Mac when you have the window focused and press "command+q" you can use the following workaround: Go to System Preferences, then Keyboard. Select Shortcuts. On the left pane, find Accessibility. Now on the right pane enable Invert colors and then click on the shortcut box to reassign the shortcut to Cmd+Q This may also save you a lot of pain when you have several tabs open in your browser or your PDF reader for example.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages