cocainate
A cross-platform caffeinate alternative that keeps your screen on.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.6%) to scientific vocabulary
Keywords
Repository
A cross-platform caffeinate alternative that keeps your screen on.
Basic Info
- Host: GitHub
- Owner: AppleGamer22
- License: gpl-3.0
- Language: Go
- Default Branch: master
- Homepage: https://pkg.go.dev/github.com/AppleGamer22/cocainate
- Size: 699 KB
Statistics
- Stars: 24
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 18
Topics
Metadata Files
README.md
cocainate
Description
cocainate is a cross-platform CLI utility for keeping the screen awake until stopped, or for a specified duration.
Why This Name?
The program's functionality and name are inspired by macOS's caffeinate utility that prevents the system from entering sleep mode.
This name is simply a stupid ~~pun~~, therefore I do not condone and do not promote drug use, for more information: Wikipedia.
Installation
Nix Flakes
nix
{
inputs = {
# or your preferred NixOS channel
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
applegamer22.url = "github:AppleGamer22/nur";
};
outputs = { nixpkgs }: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
specialArgs = {
pkgs = import nixpkgs {
# ...
overlays = [
(final: prev: {
# ...
ag22 = applegamer22.packages."<your_system>";
})
];
};
};
modules = [
# or in a separate Nix file
({ pkgs, ... }: {
programs.nix-ld.enable = true;
environment.systemPackages = with pkgs; [
ag22.cocainate
];
})
# ...
];
};
};
}
Arch Linux Distributions
macOS
- Homebrew Tap:
bash brew install AppleGamer22/tap/cocainate
Windows (working progress)
winget:bash winget install AppleGamer22.cocainate### Othergo:- Does not ship with:
- a manual page
- pre-built shell completion scripts
go install github.com/AppleGamer22/cocainate
- Does not ship with:
Functionality
Root -d/--duration Flag
This is an optional flag that accepts a duration string (see Go's time.ParseDuration for more details). If this flag is not provided, the program will run until manually stopped.
Acceptable Time Units
- nanoseconds:
ns - microseconds:
usorµs - milliseconds:
ms - seconds:
s - minutes:
m - hours:
h
Examples
- 10 hours:
-d 10h - 1 hour, 10 minutes and 10 seconds:
-d 1h10m10s - 1 microsecond:
-d 1us
If the -p flag is provided, the -d flag's value is used as process polling interval.
Root -p/--pid Flag
This is an optional flag that accepts a process ID (PID). If a valid PID is provided, the program will wait until that process is terminated. The delay between the termination of the provided process and the termination of screensaver inhibitation depends on the -d flag (which must be provided).
version Sub-command
-v/--verbose Flag
- If this flag is provided, the following details are printed to the screen:
- semantic version number
- commit hash
- Go compiler version
- processor architecture & operating system
- Otherwise, only the semantic version number is printed.
Dependencies
Linux
- D-Bus
- One of the following desktop environments:
- KDE 4 or later
- GNOME 3.10 or later
- Any other desktop environment that implements
org.freedesktop.ScreenSaver<!-- * MATE --> <!-- ### macOS
- D-Bus (optional) ### Windows -->
Common Contributor Routines
Testing
Running the following command will run go test on the commands and session sub-modules:
bash
make test
Building From Source
Development
- Using the following
makecommand will save acocainatebinary with the last version tag and the latest git commit hash:bash make debug
Release
- Using the following GoReleaser command with a version
gittag and a cleangitstate:bash goreleaser build --clean - All release artificats will stored in the
distchild directory in the codebase's root directory:- compressed package archives with:
- a
cocainatebinary - manual page
- shell completion scripts
- a
- checksums
- change log
- compressed package archives with:
Copyright
cocainate is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
cocainate is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Owner
- Name: Omri Bornstein
- Login: AppleGamer22
- Kind: user
- Location: Melbourne, Australia
- Website: https://applegamer22.github.io
- Repositories: 9
- Profile: https://github.com/AppleGamer22
Software Engineer, Gopher, TeXnician | Enthusiastic About Open-Source Software and Software Supply Chains
Citation (CITATION.cff)
# yaml-language-server: $schema=https://citation-file-format.github.io/1.2.0/schema.json
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Bornstein
given-names: Omri
title: cocainate
version: 1.0.0
date-released: 2022-03-12
url: https://github.com/AppleGamer22/cocainate
GitHub Events
Total
- Release event: 3
- Watch event: 5
- Delete event: 37
- Issue comment event: 7
- Push event: 45
- Pull request event: 81
- Create event: 41
Last Year
- Release event: 3
- Watch event: 5
- Delete event: 37
- Issue comment event: 7
- Push event: 45
- Pull request event: 81
- Create event: 41
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 71
- Average time to close issues: N/A
- Average time to close pull requests: about 13 hours
- Total issue authors: 0
- Total pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.15
- Merged pull requests: 68
- Bot issues: 0
- Bot pull requests: 62
Past Year
- Issues: 0
- Pull requests: 23
- Average time to close issues: N/A
- Average time to close pull requests: about 13 hours
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.3
- Merged pull requests: 22
- Bot issues: 0
- Bot pull requests: 23
Top Authors
Issue Authors
- dependabot[bot] (1)
Pull Request Authors
- dependabot[bot] (126)
- AppleGamer22 (9)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
- Total downloads: unknown
-
Total dependent packages: 1
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 72
proxy.golang.org: github.com/AppleGamer22/cocainate
- Homepage: https://github.com/AppleGamer22/cocainate
- Documentation: https://pkg.go.dev/github.com/AppleGamer22/cocainate#section-documentation
- License: GPL-3.0
-
Latest release: v1.1.4
published over 1 year ago
Rankings
proxy.golang.org: github.com/applegamer22/cocainate
- Documentation: https://pkg.go.dev/github.com/applegamer22/cocainate#section-documentation
- License: gpl-3.0
-
Latest release: v1.1.4
published over 1 year ago
Rankings
Dependencies
- github.com/davecgh/go-spew v1.1.1
- github.com/go-ole/go-ole v1.2.6
- github.com/godbus/dbus/v5 v5.1.0
- github.com/inconshreveable/mousetrap v1.0.0
- github.com/pmezard/go-difflib v1.0.0
- github.com/shirou/gopsutil v3.21.11+incompatible
- github.com/spf13/cobra v1.5.0
- github.com/spf13/pflag v1.0.5
- github.com/stretchr/testify v1.8.0
- github.com/tklauser/go-sysconf v0.3.10
- github.com/tklauser/numcpus v0.5.0
- github.com/yusufpapurcu/wmi v1.2.2
- golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a
- gopkg.in/yaml.v3 v3.0.1
- github.com/cpuguy83/go-md2man/v2 v2.0.2
- github.com/davecgh/go-spew v1.1.0
- github.com/davecgh/go-spew v1.1.1
- github.com/go-ole/go-ole v1.2.6
- github.com/godbus/dbus/v5 v5.1.0
- github.com/inconshreveable/mousetrap v1.0.0
- github.com/pmezard/go-difflib v1.0.0
- github.com/russross/blackfriday/v2 v2.1.0
- github.com/shirou/gopsutil v3.21.11+incompatible
- github.com/spf13/cobra v1.5.0
- github.com/spf13/pflag v1.0.5
- github.com/stretchr/objx v0.1.0
- github.com/stretchr/objx v0.4.0
- github.com/stretchr/testify v1.7.1
- github.com/stretchr/testify v1.8.0
- github.com/tklauser/go-sysconf v0.3.10
- github.com/tklauser/numcpus v0.4.0
- github.com/tklauser/numcpus v0.5.0
- github.com/yusufpapurcu/wmi v1.2.2
- golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3
- golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27
- golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6
- golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a
- gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
- gopkg.in/yaml.v2 v2.4.0
- gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
- gopkg.in/yaml.v3 v3.0.1
- actions/checkout v3.3.0 composite
- actions/dependency-review-action v3 composite
- actions/checkout v3.3.0 composite
- actions/setup-go v3.5.0 composite
- anchore/sbom-action/download-syft v0.13.3 composite
- goreleaser/goreleaser-action v4 composite
- actions/setup-go v3.5.0 composite
- actions/checkout v3.3.0 composite
- actions/setup-go v3.5.0 composite
- kdeneon/plasma latest build