Skip to content

Commit

Permalink
Release V2 - Pairkiller
Browse files Browse the repository at this point in the history
  • Loading branch information
dualtone-ben committed Nov 25, 2024
1 parent 0dc00e7 commit 8a03708
Show file tree
Hide file tree
Showing 8 changed files with 792 additions and 250 deletions.
130 changes: 79 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,99 @@
---

# Blitz for League ONLY

An Electron-based application that automatically starts the Blitz app when the League of Legends client or game is running and closes Blitz when they are not.

## Features

- Monitors the presence of both the `LeagueClient.exe` (the launcher) and `League of Legends.exe` (the game client).
- Automatically launches the Blitz app when either of the League processes is detected.
- Closes the Blitz app when neither of the League processes is active.
- System tray interface for easy toggling of monitoring and setting the Blitz executable path.
- Option to start the application on system boot.
# Pairkiller

<p align="center">
<img src="icon.png" width="128" height="128" alt="Pairkiller Logo">
</p>

<h3 align="center">A Powerful App Monitoring and Control System</h3>

<p align="center">
<a href="#key-features">Key Features</a> •
<a href="#installation">Installation</a> •
<a href="#how-to-use">How To Use</a> •
<a href="#configuration">Configuration</a> •
<a href="#download">Download</a>
</p>

## Key Features

* **Dynamic App Monitoring** - Monitor multiple applications and respond to their states
* **Flexible Group Configuration** - Create groups with different monitoring conditions
* **Smart Actions** - Multiple action types for controlled apps:
- Start when triggered
- Stop when triggered
- Sync with trigger (run alongside)
- Opposite of trigger (run inversely)
* **Reverse Logic** - Invert any group's behavior with a single click
* **System Tray Integration** - Runs quietly in your system tray
* **Auto-Updates** - Always stay up to date with the latest features
* **Cross Platform** - Windows support, with macOS and Linux coming soon

## Installation

### Downloading from Releases
Download the latest version from the [releases page](https://github.com/hybes/pairkiller/releases) and run the installer.

1. Go to the [Releases](https://github.com/Hybes/blitz-for-league-only/releases) section of the GitHub repository.
2. Download the latest release for your platform (Windows).
3. Install the application by following the on-screen instructions.
## How to Use

### Handling Windows SmartScreen
1. **Create a Group**
- Click "Add New Group"
- Give your group a name
- Choose monitoring condition (All or Any)
- Optionally enable reverse logic

When installing applications downloaded from the internet, Windows SmartScreen might show a warning. This is a security feature to help protect against unrecognized or malicious applications. To continue the installation:
2. **Add Monitored Apps**
- Click "Add App" in the Monitored Apps section
- Browse to select your application
- Repeat for all apps you want to monitor

1. Click on "More Info".
2. Select "Run Anyway".
3. Follow the installation prompts.
3. **Add Controlled Apps**
- Click "Add App" in the Controlled Apps section
- Browse to select your application
- Choose the desired action:
* Start when triggered
* Stop when triggered
* Sync with trigger
* Opposite of trigger

### Building from Source
4. **Save and Run**
- Click "Save & Close"
- The app will run in your system tray
- Right-click the tray icon for options

1. Clone the repository:
```
git clone https://github.com/Hybes/blitz-for-league-only.git
```
## Configuration

2. Navigate to the project directory:
```
cd blitz-for-league-only
```
### Group Settings
- **Name**: Identify your group
- **Condition**: Choose between:
* All apps must be running
* Any app must be running
- **Reverse Logic**: Invert the condition

3. Install the necessary dependencies:
```
npm install
```
### App Actions
- **Start when triggered**: Launches the app when condition is met
- **Stop when triggered**: Closes the app when condition is met
- **Sync with trigger**: Runs alongside monitored apps
- **Opposite of trigger**: Runs inverse to monitored apps

4. Build the application:
```
npm run build
```
## Development

5. The built application will be available in the `dist` folder.
```bash
# Clone this repository
git clone https://github.com/hybes/pairkiller

## Usage
# Install dependencies
npm install

1. Start the application. An icon will appear in the system tray.
2. Right-click on the system tray icon to access the options:
- **Toggle Monitoring**: Start or stop the automatic monitoring of the League processes.
- **Set Blitz Path**: If you have a custom installation path for Blitz, use this option to select the Blitz executable.
- **Start on Boot**: Enable or disable starting the application automatically when your system boots.
# Run the app
npm start

## Safety and Anti-virus
# Build the app
npm run build
```

The application performs simple monitoring tasks and doesn't engage in any behaviors that would typically trigger anti-virus software. However, always ensure that you download the application from the official GitHub repository or trusted sources.
## License

## Contributing
MIT

Contributions are welcome! Please fork the repository and create a pull request with your changes, or open an issue to discuss potential improvements or bug fixes.
## Credits

---
Created by [Ben Hybert](https://github.com/hybes)
16 changes: 9 additions & 7 deletions about.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,24 @@
<body class="h-full w-full flex flex-col justify-center items-center bg-stone-900 text-stone-100">
<div class="my-auto">
<div class="flex flex-col justify-center items-center mx-6">
<h2 class="w-full text-center p-4 font-semibold text-xl">Blitz for League Only</h2>
<h2 class="w-full text-center p-4 font-semibold text-xl">Pairkiller</h2>
<p class="text-md">Built by <span class="italic"><a class="external-link hover:underline" href="https://github.com/Hybes" target="_blank">Ben Hybert</a></span></p>
<p class="text-center my-6">I made this because Fraser plays all the other Blitz games, but doesn't want Blitz to be used in them.</p>
<div class="usage-collection">
<label for="usageCollectionToggle">Collect Anonymous Usage: </label>
<input type="checkbox" id="usageCollectionToggle" checked />
</div>
<p class="text-center my-6">I made this because Fraser plays all the Blitz games, but doesn't want Blitz to be used in any except League of Legends.</p>
</div>
<div class="footer-social-icons py-6 text-center">
<div class="footer-social-icons py-0 text-center">
<ul class="social-icons">
<li><a aria-label="Email" href="mailto:[email protected]" target="_blank" class="external-link social-icon hover:text-white"> <i class="fa fa-envelope"></i></a></li>
<li><a aria-label="Twitter Page" href="https://twitter.com/hybes" target="_blank" class="external-link social-icon hover:text-white"> <i class="fa fa-twitter"></i></a></li>
<li><a aria-label="Instagram Page" href="https://instagram.com/benhybert/" target="_blank" class="external-link social-icon hover:text-white"> <i class="fa fa-instagram"></i></a></li>
<li><a aria-label="Github Page" href="https://github.com/Hybes/" target="_blank" class="external-link social-icon hover:text-white"> <i class="fa fa-github"></i></a></li>
</ul>
</div>
<div class="mt-6 text-center">
<div class="usage-collection flex items-center justify-center space-x-2">
<label for="usageCollectionToggle">Help improve Pairkiller by sending anonymous usage data</label>
<input type="checkbox" id="usageCollectionToggle" class="w-4 h-4" />
</div>
</div>
<div id="version-info" class="flex justify-center items-center w-full">
<button id="checkForUpdatesButton" class="opacity-30 text-sm hover:opacity-80 text-center cursor-pointer">Check for updates</button>
</div>
Expand Down
32 changes: 15 additions & 17 deletions about.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,26 @@ document.addEventListener('DOMContentLoaded', (event) => {
const usageCollectionToggle = document.getElementById('usageCollectionToggle');
const { ipcRenderer } = require('electron');

document.addEventListener('click', (event) => {
let targetElement = event.target;
while (targetElement != null) {
if (targetElement.classList && targetElement.classList.contains('external-link') && targetElement.href) {
event.preventDefault();
ipcRenderer.send('open-link', targetElement.href);
return;
}
targetElement = targetElement.parentElement;
}
// Load initial config
ipcRenderer.invoke('get-config').then(config => {
usageCollectionToggle.checked = config.anonymousUsage;
});

// Event Listeners
usageCollectionToggle.addEventListener('change', () => {
ipcRenderer.send('toggle-usage-collection', usageCollectionToggle.checked);
});

document.getElementById('checkForUpdatesButton').addEventListener('click', () => {
ipcRenderer.send('check-for-updates');
});

ipcRenderer.invoke('get-usage-collection').then((value) => {
usageCollectionToggle.checked = value;
// Handle external links
document.querySelectorAll('.external-link').forEach(link => {
link.addEventListener('click', (e) => {
e.preventDefault();
ipcRenderer.send('open-link', e.target.closest('a').href);
});
});

ipcRenderer.on('update-status', (event, status, info) => {
Expand All @@ -45,8 +47,4 @@ document.addEventListener('DOMContentLoaded', (event) => {
alert(message); // Display the feedback message to the user
}
});

usageCollectionToggle.addEventListener('change', () => {
ipcRenderer.send('toggle-usage-collection', usageCollectionToggle.checked);
});
});
});
Binary file modified icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8a03708

Please sign in to comment.