Skip to content

Commit

Permalink
bruh this better work
Browse files Browse the repository at this point in the history
  • Loading branch information
ZachLTech committed Jul 14, 2024
1 parent 8305562 commit 92351ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/backend/src/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,10 @@ class AEVBackend {
this.logger.fail('There was an error restarting the VPN: ' + error);
console.log(error);
}
} else if (message === 'ags-restart') {
} else if (message === 'ags-stop') {
execSync(`killall ags`);
this.logger.success(`Successfully Restarted AGS Bar`);
} else if (message === 'ags-start') {
execSync(`hyprctl dispatch exec ags`);
this.logger.success(`Successfully Restarted AGS Bar`);
}
Expand Down
14 changes: 10 additions & 4 deletions src/frontend/pages/debug.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ let socket;
function restartVPN(){
socket.send("vpn-restart");
}
function restartAGS(){
socket.send("ags-restart");
function stopAGS(){
socket.send("ags-stop");
}
function startAGS(){
socket.send("ags-start");
}
</script>

Expand All @@ -42,8 +45,11 @@ let socket;
<button @click="restartVPN" class="text-3xl font-semibold ml-2 px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600 focus:outline-none">
Restart VPN
</button>
<button @click="restartAGS" class="text-3xl font-semibold ml-2 px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600 focus:outline-none">
Restart Nav
<button @click="stopAGS" class="text-3xl font-semibold ml-2 px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600 focus:outline-none">
Stop Nav
</button>
<button @click="startAGS" class="text-3xl font-semibold ml-2 px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600 focus:outline-none">
Start Nav
</button>
</div>
<div class="flex gap-4 justify-center items-center w-full h-[90%] px-16">
Expand Down

0 comments on commit 92351ef

Please sign in to comment.