Skip to content

Commit 9c1759b

Browse files
committed
Gnome shell 45 support added ✨
1 parent 082b279 commit 9c1759b

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"shell-version": [
66
"45"
77
],
8-
"version": 6,
8+
"version": 7,
99
"url": "https://github.com/rahulhaque/php-laravel-valet-gnome-shell-extension",
1010
"settings-schema": "org.gnome.shell.extensions.php-laravel-valet"
1111
}

stylesheet.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

utils.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import GLib from 'gi://GLib';
2-
import Bytes from 'gi://GLib/Bytes';
32

43
export function safeSpawn(cmd) {
54
try {
@@ -16,19 +15,19 @@ export function shellSpawn(cmd) {
1615

1716
export function phpVersion() {
1817
const res = safeSpawn('/bin/bash -c "php -v | grep -Po \'PHP\\s+\\d+.\\d+(?:(.\\d+))?\'"');
19-
if (res[3] == 0) return Bytes.toString(res[1]).replace(/\n$/, '');
18+
if (res[3] == 0) return String.fromCharCode(...res[1]).replace(/\n$/, '');
2019
return false;
2120
}
2221

2322
export function phpList() {
2423
const res = safeSpawn('ls /etc/php');
25-
if (res[3] == 0) return Bytes.toString(res[1]).split('\n').filter(item => !!item).reverse();
24+
if (res[3] == 0) return String.fromCharCode(...res[1]).split('\n').filter(item => !!item).reverse();
2625
return false;
2726
}
2827

2928
export function valetStatus() {
3029
const res = safeSpawn('/bin/bash -c "valet --version && valet status"');
31-
if (res[3] == 0) return Bytes.toString(res[1]).split('\n').filter(item => !!item);
30+
if (res[3] == 0) return String.fromCharCode(...res[1]).split('\n').filter(item => !!item);
3231
return false;
3332
}
3433

0 commit comments

Comments
 (0)