Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
meisenzahl committed Jan 24, 2021
0 parents commit 5010b6c
Show file tree
Hide file tree
Showing 41 changed files with 3,218 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# EditorConfig <http://EditorConfig.org>
root = true

# elementary defaults
[*]
charset = utf-8
end_of_line = lf
indent_size = tab
indent_style = space
insert_final_newline = true
max_line_length = 80
tab_width = 4
trim_trailing_whitespace = true

[{*.xml,*.xml.in,*.yml}]
tab_width = 2
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

container:
image: elementary/docker:stable

steps:
- uses: actions/checkout@v1
- name: Install Dependencies
run: |
apt update
apt install -y libgranite-dev libgtk-3-dev meson valac
- name: Build
env:
DESTDIR: out
run: |
meson build
ninja -C build
ninja -C build install
lint:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: elementary/actions/vala-lint@master
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*~
build
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---

language: node_js

node_js:
- 10.17.0

sudo: required

services:
- docker

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libstdc++-5-dev

install:
- npm i -g @elementaryos/houston

script:
- houston ci
674 changes: 674 additions & 0 deletions COPYING

Large diffs are not rendered by default.

94 changes: 94 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<div align="center">
<span align="center"> <img width="80" height="80" class="center" src="data/icons/128/com.github.manexim.insomnia.svg" alt="Icon"></span>
<h1 align="center">Insomnia</h1>
<h3 align="center">Prevent the display from being turned off or the device from going into sleep mode</h3>
<p align="center">Designed for <a href="https://elementary.io">elementary OS</a></p>
</div>

<p align="center">
<a href="https://appcenter.elementary.io/com.github.manexim.insomnia" target="_blank">
<img src="https://appcenter.elementary.io/badge.svg">
</a>
</p>

<p align="center">
<a href="https://travis-ci.org/manexim/insomnia">
<img src="https://img.shields.io/travis/manexim/insomnia.svg">
</a>
<a href="https://github.com/manexim/insomnia/releases/">
<img src="https://img.shields.io/github/release/manexim/insomnia.svg">
</a>
<a href="https://github.com/manexim/insomnia/blob/master/COPYING">
<img src="https://img.shields.io/github/license/manexim/insomnia.svg">
</a>
</p>

<p align="center">
<img src="data/screenshots/000.png">
<table>
<tr>
<td>
<img src="data/screenshots/001.png">
</td>
<td>
<img src="data/screenshots/002.png">
</td>
</tr>
</table>
</p>

## Installation

### Dependencies

These dependencies must be present before building:

- `libgranite-dev`
- `libgtk-3-dev`
- `meson`
- `valac`

### Building

```
git clone https://github.com/manexim/insomnia.git && cd insomnia
meson build --prefix=/usr
cd build
ninja
sudo ninja install
com.github.manexim.insomnia
```

### Deconstruct

```
sudo ninja uninstall
```

## Contributing

If you want to contribute to Insomnia and make it better, your help is very welcome.

### How to make a clean pull request

- Create a personal fork of this project on GitHub.
- Clone the fork on your local machine. Your remote repo on GitHub is called `origin`.
- Create a new branch to work on. Branch from `master`!
- Implement/fix your feature.
- Push your branch to your fork on GitHub, the remote `origin`.
- From your fork open a pull request in the correct branch. Target the `master` branch!

And last but not least: Always write your commit messages in the present tense.
Your commit message should describe what the commit, when applied, does to the code – not what you did to the code.

## Special thanks

### Translators

| Name | Language |
| ----------------------------------------------- | ---------- |
| [meisenzahl](https://github.com/meisenzahl) | German 🇩🇪 |

## License

This project is licensed under the GNU General Public License v3.0 - see the [COPYING](COPYING) file for details.
78 changes: 78 additions & 0 deletions data/com.github.manexim.insomnia.appdata.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2019 Manexim -->
<component type="desktop">
<id>com.github.manexim.insomnia</id>
<metadata_license>CC0</metadata_license>
<project_license>GPL-3.0+</project_license>
<name>Insomnia</name>
<summary>Prevent the display from being turned off or the device from going into sleep mode</summary>
<description>
<p>Insomnia helps to keep your device awake, without needing to adjust your system power settings.</p>
</description>
<categories>
<category>System</category>
</categories>
<provides>
<binary>com.github.manexim.insomnia</binary>
</provides>
​<releases>
<release date="2021-01-23" version="1.0.0">
<description>
<p>Initial release</p>
</description>
</release>
</releases>
<screenshots>
<screenshot type="default">
<caption></caption>
<image>https://raw.githubusercontent.com/manexim/insomnia/master/data/screenshots/000.png</image>
</screenshot>
<screenshot>
<caption></caption>
<image>https://raw.githubusercontent.com/manexim/insomnia/master/data/screenshots/001.png</image>
</screenshot>
<screenshot>
<caption></caption>
<image>https://raw.githubusercontent.com/manexim/insomnia/master/data/screenshots/002.png</image>
</screenshot>
</screenshots>
<developer_name>Manexim</developer_name>
<url type="homepage">https://github.com/manexim</url>
<url type="bugtracker">https://github.com/manexim/insomnia/issues</url>
<custom>
<!-- elementary AppCenter specific values -->
<value key="x-appcenter-color-primary">#fafafa</value>
<value key="x-appcenter-color-primary-text">#333</value>
<!-- Suggested price in USD; just a suggestion, NOT a minimum. -->
<value key="x-appcenter-suggested-price">5</value>
</custom>
<content_rating type="oars-1.1">
<content_attribute id="violence-cartoon">none</content_attribute>
<content_attribute id="violence-fantasy">none</content_attribute>
<content_attribute id="violence-realistic">none</content_attribute>
<content_attribute id="violence-bloodshed">none</content_attribute>
<content_attribute id="violence-sexual">none</content_attribute>
<content_attribute id="violence-desecration">none</content_attribute>
<content_attribute id="violence-slavery">none</content_attribute>
<content_attribute id="violence-worship">none</content_attribute>
<content_attribute id="drugs-alcohol">none</content_attribute>
<content_attribute id="drugs-narcotics">none</content_attribute>
<content_attribute id="drugs-tobacco">none</content_attribute>
<content_attribute id="sex-nudity">none</content_attribute>
<content_attribute id="sex-themes">none</content_attribute>
<content_attribute id="sex-homosexuality">none</content_attribute>
<content_attribute id="sex-prostitution">none</content_attribute>
<content_attribute id="sex-adultery">none</content_attribute>
<content_attribute id="sex-appearance">none</content_attribute>
<content_attribute id="language-profanity">none</content_attribute>
<content_attribute id="language-humor">none</content_attribute>
<content_attribute id="language-discrimination">none</content_attribute>
<content_attribute id="social-chat">none</content_attribute>
<content_attribute id="social-info">mild</content_attribute>
<content_attribute id="social-audio">none</content_attribute>
<content_attribute id="social-location">none</content_attribute>
<content_attribute id="social-contacts">none</content_attribute>
<content_attribute id="money-purchasing">none</content_attribute>
<content_attribute id="money-gambling">none</content_attribute>
</content_rating>
</component>
46 changes: 46 additions & 0 deletions data/com.github.manexim.insomnia.desktop.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[Desktop Entry]
Type=Application
Name=Insomnia
Comment=Prevent the display from being turned off or the device from going into sleep mode
Exec=com.github.manexim.insomnia
Icon=com.github.manexim.insomnia
Terminal=false
Categories=GNOME;GTK;
X-GNOME-UsesNotifications=false
Actions=0;300;600;900;1800;2700;3600;7200;-1;

[Desktop Action 0]
Name=Follow system power settings
Exec=com.github.manexim.insomnia 0

[Desktop Action 300]
Name=Prevent the display from being turned off or the device from going into sleep mode for 5 min
Exec=com.github.manexim.insomnia 300

[Desktop Action 600]
Name=Prevent the display from being turned off or the device from going into sleep mode for 10 min
Exec=com.github.manexim.insomnia 600

[Desktop Action 900]
Name=Prevent the display from being turned off or the device from going into sleep mode for 15 min
Exec=com.github.manexim.insomnia 900

[Desktop Action 1800]
Name=Prevent the display from being turned off or the device from going into sleep mode for 30 min
Exec=com.github.manexim.insomnia 1800

[Desktop Action 2700]
Name=Prevent the display from being turned off or the device from going into sleep mode for 45 min
Exec=com.github.manexim.insomnia 2700

[Desktop Action 3600]
Name=Prevent the display from being turned off or the device from going into sleep mode for 1 hour
Exec=com.github.manexim.insomnia 3600

[Desktop Action 7200]
Name=Prevent the display from being turned off or the device from going into sleep mode for 2 hours
Exec=com.github.manexim.insomnia 7200

[Desktop Action -1]
Name=Prevent the display from being turned off or the device from going into sleep mode
Exec=com.github.manexim.insomnia -1
Loading

0 comments on commit 5010b6c

Please sign in to comment.