Skip to content

Commit 5864a56

Browse files
author
Cam
authored
Add files via upload
1 parent a32267e commit 5864a56

File tree

3 files changed

+13
-49
lines changed

3 files changed

+13
-49
lines changed

install.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fi
3737

3838
if [ "$LOGINTYPE" = "Type=wayland" ]; then
3939
while true; do
40-
read -p "Naga for Wayland was installed, do you want to install for X11 too ? (recommended) y/n" yn
40+
read -p "Naga for Wayland is currently installing, do you want to install for X11 too ? (recommended) y/n" yn
4141
case $yn in
4242
[Yy]*)
4343
./src/_installX11.sh
@@ -49,7 +49,7 @@ if [ "$LOGINTYPE" = "Type=wayland" ]; then
4949
done
5050
else
5151
while true; do
52-
read -p "Naga for X11 was installed, do you want to install for Wayland too ? (recommended) y/n" yn
52+
read -p "Naga for X11 is currently installing, do you want to install for Wayland too ? (recommended) y/n" yn
5353
case $yn in
5454
[Yy]*)
5555
./src/_installWayland.sh
@@ -78,10 +78,6 @@ sleep 0.5
7878
sudo cat /etc/sudoers | grep -qxF "$USER ALL=(ALL) NOPASSWD:/bin/systemctl start naga" || printf "\n%s ALL=(ALL) NOPASSWD:/bin/systemctl start naga\n" "$USER" | sudo EDITOR='tee -a' visudo >/dev/null
7979

8080

81-
cp -rf ./src/[email protected] ~/.local/share/gnome-shell/extensions
82-
gnome-extensions enable [email protected]
83-
84-
8581
sudo cp -f src/naga.service /etc/systemd/system/
8682

8783
env | tee ~/.naga/envSetup >/dev/null

src/_installWayland.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
sudo apt install -y g++ nano pkexec procps wget gnome-shell-extension-prefs dbus-x11 curl
3+
sudo apt install -y g++ nano pkexec procps wget gnome-shell-extension-prefs dbus-x11 curl libdbus-1-dev
44

55
echo "Checking requirements..."
66

@@ -27,12 +27,17 @@ sudo mv ./src/nagaWayland /usr/local/bin/
2727
echo "Installing dotool :"
2828

2929
wget https://git.sr.ht/~geb/dotool/archive/90184107489abb7a440bf1f8df9b123acc8f9628.tar.gz -O dotool.tar.gz
30-
tar -xf dotool.tar.gz
31-
cd dotool-90184107489abb7a440bf1f8df9b123acc8f9628
30+
tar -xf dotool.tar.gz > /dev/null
31+
mv -f dotool-90184107489abb7a440bf1f8df9b123acc8f9628 dotool > /dev/null
32+
cd dotool
3233
sudo sh install.sh > /dev/null
33-
cd .. > /dev/null
34-
rm -rdf dotool-90184107489abb7a440bf1f8df9b123acc8f9628
35-
rm -f dotool.tar.gz
34+
cd ..
35+
#rm -rdf dotool
36+
rm -f dotool.tar.gz > /dev/null
37+
38+
39+
cp -rf ./src/[email protected] ~/.local/share/gnome-shell/extensions
40+
gnome-extensions enable [email protected]
3641

3742
_dir="/home/$USER/.naga"
3843
mkdir -p "$_dir"

src/[email protected]/extension.js

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ const { Gio } = imports.gi;
2929
const MR_DBUS_IFACE = `
3030
<node>
3131
<interface name="org.gnome.Shell.Extensions.WindowsExt">
32-
<method name="List">
33-
<arg type="s" direction="out" name="win"/>
34-
</method>
35-
<method name="FocusTitle">
36-
<arg type="s" direction="out" />
37-
</method>
38-
<method name="FocusPID">
39-
<arg type="s" direction="out" />
40-
</method>
4132
<method name="FocusClass">
4233
<arg type="s" direction="out" />
4334
</method>
@@ -55,34 +46,6 @@ class Extension {
5546
this._dbus.unexport();
5647
delete this._dbus;
5748
}
58-
List() {
59-
let win = global.get_window_actors()
60-
.map(a => a.meta_window)
61-
.map(w => ({ class: w.get_wm_class(), pid: w.get_pid(), id: w.get_id(), maximized: w.get_maximized(), focus: w.has_focus(), title: w.get_title() }));
62-
return JSON.stringify(win);
63-
}
64-
FocusTitle() {
65-
let win = global.get_window_actors()
66-
.map(a => a.meta_window)
67-
.map(w => ({ focus: w.has_focus(), title: w.get_title() }));
68-
for (let [_ignore , aWindow] of win.entries()) {
69-
let [focus,theTitle] = Object.entries(aWindow);
70-
if (focus[1] == true )
71-
return theTitle[1];
72-
}
73-
return "";
74-
}
75-
FocusPID() {
76-
let win = global.get_window_actors()
77-
.map(a => a.meta_window)
78-
.map(w => ({ focus: w.has_focus(), pid: w.get_pid() }));
79-
for (let [_ignore , aWindow] of win.entries()) {
80-
let [focus,thePID] = Object.entries(aWindow);
81-
if (focus[1] == true )
82-
return ""+thePID[1]; // Turn number into string
83-
}
84-
return "";
85-
}
8649
FocusClass() {
8750
let win = global.get_window_actors()
8851
.map(a => a.meta_window)

0 commit comments

Comments
 (0)