Skip to content

Commit

Permalink
Merge pull request #25 from Merrit/dev
Browse files Browse the repository at this point in the history
Linux version base features complete
  • Loading branch information
Merrit authored Feb 22, 2021
2 parents 542e782 + 420ea04 commit f225f31
Show file tree
Hide file tree
Showing 96 changed files with 724 additions and 1,446 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto eol=lf
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
15 changes: 15 additions & 0 deletions .github/workflows/build-linux-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Check Linux build succeeds on PR
'on': pull_request
jobs:
build_and_preview:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update -y
- run: sudo apt-get install -y ninja-build libgtk-3-dev libblkid-dev
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1.4.0
with:
channel: dev
- run: flutter config --enable-linux-desktop
- run: flutter pub get
- run: flutter build linux
96 changes: 61 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,50 @@
[<img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png" alt="Buy Me A Coffee" height="40px" width="145" >](https://www.buymeacoffee.com/Merritt)

_Nyrna is being rewritten from scratch in Dart / Flutter._

_Currently only a Linux version is available as alpha._

# Nyrna


**Nyrna allows the user to pause any game or application on their PC.**
**Suspend games and applications.**

Similar to the incredibly useful sleep/suspend function found in consoles like the Nintendo Switch and Sony PlayStation; suspend your game (and its resource usage) at any time, and resume whenever you wish - at the push of a button.

Nyrna can be used to suspend normal, non-game applications as well. For example:

- 3D renders
- video encoding
- software compilation

The reason for this project is to have a function on PC similar to the incredibly useful sleep/suspend function found in consoles like the Nintendo Switch and Sony PlayStation; suspend your game (and its resource usage) at any time, and resume whenever you wish - at the push of a button.
The CPU and GPU resources are being used by said task - maybe for hours - when
you would like to use the system for something else. With Nyrna you can suspend
that program,
freeing up the resources (excluding RAM) until the process is resumed,
without losing where you were - like the middle of a long job, or a gaming session
between save points.

That said this can be used to pause normal, non-game applications as well. For example: while doing a long 3D render, or maybe a video encoding job, the CPU and GPU resources are being hogged by said task - maybe for hours - when you would like to use the system for something else. With Nyrna you can pause that program, freeing up the CPU and GPU resources (not RAM) until the process is resumed, without losing where you were.
Nyrna works on Linux with X11
<!-- and Microsoft Windows (tested on Windows 10). -->

Nyrna works on Linux with X11 and Microsoft Windows (tested on Windows 10).

# Installing

[![Packaging status](https://repology.org/badge/vertical-allrepos/nyrna.svg)](https://repology.org/project/nyrna/versions)
<!--
// Commented out until packaging for 2.0 is clarified.
[![Packaging
status](https://repology.org/badge/vertical-allrepos/nyrna.svg)](https://repology.org/project/nyrna/versions)
## Arch / Manjaro
## Linux
### Arch / Manjaro
A package is available [in the AUR](https://aur.archlinux.org/packages/nyrna/).
- `yay nyrna`
## Gentoo
### Gentoo
A package is available as [nyrna](https://github.com/BlueManCZ/edgets/tree/master/x11-misc/nyrna) or [nyrna-bin](https://github.com/BlueManCZ/edgets/tree/master/x11-misc/nyrna-bin) in the [edgets overlay](https://github.com/BlueManCZ/edgets).
Expand All @@ -33,55 +55,59 @@ A package is available as [nyrna](https://github.com/BlueManCZ/edgets/tree/maste
Available in the [Chocolatey Community Packages repository.](https://chocolatey.org/packages/nyrna)
- `choco install nyrna`
-->


## Portable version (Linux / Windows)

_Linux Requirements_:
## Portable version

- `libappindicator3`
_Requirements_:

<!-- - `libappindicator3`
- `gtk+3.0`
- `zenity`
- `zenity` -->

- wmctrl
- xdotool

_Example_:

- Debian / Ubuntu: `sudo apt install libappindicator3-1 gtk+3.0 zenity`
- Debian / Ubuntu: `sudo apt install wmctrl xdotool`
- Arch / Manjaro: `sudo pacman -S wmctrl xdotool`

_Setup portable version_:

- Download Nyrna:
- [Linux](https://github.com/Merrit/nyrna/releases/latest/download/nyrna)
- [Windows](https://github.com/Merrit/nyrna/releases/latest/download/nyrna.exe)
- Place wherever you would like the application to live (eg: ~/Applications)
- _Linux only:_ Make sure it is set as executable
- Click to run - it will run in your system tray.
- Download [Nyrna](https://github.com/Merrit/nyrna/releases/latest/download/nyrna.tar.gz)
<!-- - [Linux](https://github.com/Merrit/nyrna/releases/latest/download/nyrna)
- [Windows](https://github.com/Merrit/nyrna/releases/latest/download/nyrna.exe) -->
- Extract and place the Nyrna folder wherever you would like the application to live (eg: ~/Applications)
- Ensure that the `nyrna` file is set as executable
- Start the `nyrna` file to run the program

# Usage
_Optional:_

- Press the `Pause` key on your keyboard to suspend the active, foreground application. Press again to resume the same application regardless of the current focus.
In settings is a button to add Nyrna to the system launcher.

![Demo of Nyrna running as a Tray Icon](images/demo_nyrna_tray.png)

- To change the hotkey: Right click tray icon -> `Change Hotkey`
# Usage

# Disclaimer
Click the tile for the application you wish to suspend / resume.

![Nyrna demo gif](images/nyrna_demo.gif)

I have not had any issues using Nyrna, however keep in mind it is possible something could go wrong with a suspend. So please remember to always save your work and games.
**Advanced:**

# In case of issue
Alternatively you can set a custom shortcut to launch Nyrna with the `--toggle`
or `-t` flag, then toggle the suspend state of the active window by pressing
that shortcut. (This currently does not work consistently if Nyrna is already open)

I haven't seen an issue like this, however if at any time the hotkey isn't working to resume, you can always manually find your process in task manager and resume or send signal SIGCONT / CONT:

![How to manually resume](images/demo_manual_resume.jpg)
# Disclaimer

# Development Plans
I have not had any issues using Nyrna, however keep in mind it is possible
something could go wrong with an application while suspended. So please remember to always save
your work and games.

- Suspend multiple applications at once
- Informative error dialog with issue reporting
- Settings screen
- Option to minimize before suspend
- Automatic check for updates
- AppImage for Linux
- ~~Chocolatey distribution for Windows~~

# FAQ

Expand Down
11 changes: 0 additions & 11 deletions android/.gitignore

This file was deleted.

59 changes: 0 additions & 59 deletions android/app/build.gradle

This file was deleted.

7 changes: 0 additions & 7 deletions android/app/src/debug/AndroidManifest.xml

This file was deleted.

41 changes: 0 additions & 41 deletions android/app/src/main/AndroidManifest.xml

This file was deleted.

6 changes: 0 additions & 6 deletions android/app/src/main/kotlin/com/example/nyrna/MainActivity.kt

This file was deleted.

12 changes: 0 additions & 12 deletions android/app/src/main/res/drawable-v21/launch_background.xml

This file was deleted.

12 changes: 0 additions & 12 deletions android/app/src/main/res/drawable/launch_background.xml

This file was deleted.

Binary file removed android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file not shown.
Binary file removed android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 0 additions & 18 deletions android/app/src/main/res/values-night/styles.xml

This file was deleted.

18 changes: 0 additions & 18 deletions android/app/src/main/res/values/styles.xml

This file was deleted.

7 changes: 0 additions & 7 deletions android/app/src/profile/AndroidManifest.xml

This file was deleted.

31 changes: 0 additions & 31 deletions android/build.gradle

This file was deleted.

Loading

0 comments on commit f225f31

Please sign in to comment.