forked from GH-forks/hyprfreeze
Compare commits
6 commits
Author | SHA1 | Date | |
---|---|---|---|
13a65ce1f0 | |||
50452aed8a | |||
|
4b0cc2fe32 | ||
5f1df7cb9d | |||
17973ef6fe | |||
e076267fd6 |
4 changed files with 51 additions and 4 deletions
34
.forgejo/workflows/create-release.yaml
Executable file
34
.forgejo/workflows/create-release.yaml
Executable file
|
@ -0,0 +1,34 @@
|
|||
name: Create release on tag push
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Create release
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Zip up the files
|
||||
run: zip -r coolant.zip *
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ">=1.20.1"
|
||||
|
||||
- name: Draft release
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
body_path: CHANGELOG.md
|
||||
files: |-
|
||||
coolant.zip
|
||||
draft: true
|
||||
api_key: "${{ secrets.RELEASE_TOKEN }}"
|
|
@ -1 +1,10 @@
|
|||
# 0.1.1 (2024-05-11)
|
||||
|
||||
## Fixed
|
||||
|
||||
* Detection logic is more sturdy now (change `SESSION`/`DESKTOP` to lowercase).
|
||||
* README.md no longer refers to `hyprfreeze` in the configuration section.
|
||||
|
||||
# 0.1.0 (2024-02-18)
|
||||
|
||||
initial release
|
||||
|
|
|
@ -58,9 +58,9 @@ ln -s $(pwd)/Coolant/coolant $HOME/.local/bin
|
|||
- JQ to parse json
|
||||
- pstree which is required to list child processes
|
||||
- (Optional) xprop on X11,
|
||||
[hyprprop](https://github.com/vilari-mickopf/hyprprop) (on Hyprland) or
|
||||
[swayprop](https://git.alternerd.tv/alterNERDtive/swayprop) (on Sway) to get
|
||||
the pid of a window by selecting it with your mouse.
|
||||
[hyprprop](https://github.com/vilari-mickopf/hyprprop) on Hyprland or
|
||||
[swayprop](https://git.alternerd.tv/alterNERDtive/swayprop) on Sway to get the
|
||||
pid of a window by selecting it with your mouse.
|
||||
- (Optional) Systemd for detecting session type / desktop via `loginctl`.
|
||||
|
||||
## Usage
|
||||
|
@ -71,7 +71,7 @@ Add a bind in your Hyprland or Sway config to pause the current active window:
|
|||
# ~/.config/hypr/hyprland.conf
|
||||
...
|
||||
# Toggle freeze on active window
|
||||
bind = , PAUSE, exec, hyprfreeze -a
|
||||
bind = , PAUSE, exec, coolant -a
|
||||
```
|
||||
|
||||
### Available flags
|
||||
|
|
4
coolant
4
coolant
|
@ -148,6 +148,10 @@ function detectEnvironment() {
|
|||
die "Could not determine desktop environment via loginctl, and \$XDG_SESSION_DESKTOP is not set." 130
|
||||
fi
|
||||
|
||||
# Enforce lowercase for consistent matching
|
||||
SESSION="${SESSION,,}"
|
||||
DESKTOP="${DESKTOP,,}"
|
||||
|
||||
debugPrint "Session: $SESSION"
|
||||
debugPrint "Desktop: $DESKTOP"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue