forked from blue-build/legacy-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from nerdy0901/add-kwin-system76-scheduler
Add kwin system76 scheduler
- Loading branch information
Showing
4 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
DBUS_SERVICE="com.system76.Scheduler" | ||
DBUS_PATH="/com/system76/Scheduler" | ||
DBUS_INTERFACE="com.system76.Scheduler" | ||
DBUS_METHOD="SetForegroundProcess" | ||
dbus-monitor "destination=$DBUS_SERVICE,path=$DBUS_PATH,interface=$DBUS_INTERFACE,member=$DBUS_METHOD" | | ||
while true; do | ||
read method call time sender _ dest serial path interface member | ||
read type pid | ||
[ "$member" = "member=$DBUS_METHOD" ] && qdbus --system $DBUS_SERVICE $DBUS_PATH $DBUS_INTERFACE.$DBUS_METHOD $pid | ||
done |
8 changes: 8 additions & 0 deletions
8
config/files/usr/lib/systemd/user/com.system76.Scheduler.dbusproxy.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Unit] | ||
Description=Forward com.system76.Scheduler session DBus messages to the system bus | ||
|
||
[Service] | ||
ExecStart=/usr/bin/system76-scheduler-dbus-proxy | ||
|
||
[Install] | ||
WantedBy=default.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
config/scripts/install-kwin-system76-scheduler-integration.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Tell this script to exit if there are any errors. | ||
# You should have this in every custom script, to ensure that your completed | ||
# builds actually ran successfully without any errors! | ||
set -oue pipefail | ||
|
||
# Your code goes here. | ||
echo 'Install KWin Script for system76-scheduler Integration' | ||
|
||
git clone https://github.com/maxiberta/kwin-system76-scheduler-integration.git --depth 1 /tmp/kwin-system76-scheduler-integration | ||
kpackagetool5 --type=KWin/Script --global --install /tmp/kwin-system76-scheduler-integration | ||
rm -rf /tmp/kwin-system76-scheduler-integration | ||
systemctl --global enable com.system76.Scheduler.dbusproxy.service |