Skip to content

Commit 43b3f1e

Browse files
committed
Merge branch 'main' of https://github.com/Axenide/Ax-Shell
2 parents d807bca + 55225bf commit 43b3f1e

File tree

8 files changed

+655
-15
lines changed

8 files changed

+655
-15
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ curl -fsSL https://raw.githubusercontent.com/Axenide/Ax-Shell/main/install.sh |
8585
- `tesseract`
8686
- `tmux`
8787
- `uwsm`
88+
- `vte3`
8889
- `webp-pixbuf-loader`
8990
- `wl-clipboard`
9091
- `wlinhibit`
@@ -94,6 +95,7 @@ curl -fsSL https://raw.githubusercontent.com/Axenide/Ax-Shell/main/install.sh |
9495
- numpy
9596
- pillow
9697
- psutil
98+
- pywayland
9799
- requests
98100
- setproctitle
99101
- toml
@@ -121,6 +123,7 @@ curl -fsSL https://raw.githubusercontent.com/Axenide/Ax-Shell/main/install.sh |
121123
- [x] Dock
122124
- [x] Emoji Picker
123125
- [x] Kanban Board
126+
- [x] Network Manager
124127
- [x] Notifications
125128
- [x] OCR
126129
- [x] Pins
@@ -132,12 +135,13 @@ curl -fsSL https://raw.githubusercontent.com/Axenide/Ax-Shell/main/install.sh |
132135
- [x] System Tray
133136
- [x] Terminal
134137
- [x] Tmux Session Manager
138+
- [x] Update checker
135139
- [x] Vertical Layout
136140
- [x] Wallpaper Selector
137141
- [x] Workspaces Overview
138142
- [ ] Multi-monitor support
139143
- [ ] Multimodal AI Assistant
140-
- [ ] Network Manager
144+
- [ ] OSD
141145
- [ ] OTP Manager
142146

143147
---

install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ PACKAGES=(
3030
python-numpy
3131
python-pillow
3232
python-psutil
33+
python-pywayland
3334
python-requests
3435
python-setproctitle
3536
python-toml
@@ -41,9 +42,9 @@ PACKAGES=(
4142
ttf-nerd-fonts-symbols-mono
4243
unzip
4344
uwsm
45+
vte3
4446
webp-pixbuf-loader
4547
wl-clipboard
46-
wlinhibit
4748
)
4849

4950
# Prevent running as root

main.css

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,79 @@
3939
#kanban-header {
4040
background-color: alpha(black, 0.5);
4141
}
42+
43+
#update-window {
44+
background: linear-gradient(
45+
135deg,
46+
var(--primary) 0%,
47+
var(--primary) 1%,
48+
var(--shadow) 1%,
49+
var(--shadow) 2%,
50+
var(--outline) 2%,
51+
var(--outline) 3%,
52+
var(--shadow) 3%,
53+
var(--shadow) 4%,
54+
var(--surface-bright) 4%,
55+
var(--surface-bright) 5%,
56+
var(--shadow) 5%,
57+
var(--shadow) 6%,
58+
var(--surface) 6%,
59+
var(--surface) 7%,
60+
var(--shadow) 7%,
61+
var(--shadow) 8%,
62+
var(--shadow) 93%,
63+
var(--surface) 93%,
64+
var(--surface) 94%,
65+
var(--shadow) 94%,
66+
var(--shadow) 95%,
67+
var(--surface-bright) 95%,
68+
var(--surface-bright) 96%,
69+
var(--shadow) 96%,
70+
var(--shadow) 97%,
71+
var(--outline) 97%,
72+
var(--outline) 98%,
73+
var(--shadow) 98%,
74+
var(--shadow) 99%,
75+
var(--primary) 99%,
76+
var(--primary) 100%
77+
);
78+
border-radius: 0;
79+
}
80+
81+
#update-button {
82+
background-color: var(--primary);
83+
border-radius: 16px;
84+
padding: 8px 16px;
85+
font-weight: bold;
86+
transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
87+
}
88+
89+
#update-button:hover {
90+
background-color: var(--foreground);
91+
border-radius: 8px;
92+
}
93+
94+
#update-button:active {
95+
background-color: var(--primary);
96+
}
97+
98+
#update-button label {
99+
color: var(--shadow);
100+
}
101+
102+
#later-button {
103+
background-color: var(--surface-bright);
104+
border-radius: 16px;
105+
padding: 8px 16px;
106+
font-weight: bold;
107+
transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
108+
}
109+
110+
#later-button:hover {
111+
background-color: var(--outline);
112+
border-radius: 8px;
113+
}
114+
115+
#later-button:active {
116+
background-color: var(--surface-bright);
117+
}

main.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
import os
2+
import subprocess
23

4+
import gi
5+
6+
gi.require_version('GLib', '2.0')
37
import setproctitle
48
from fabric import Application
59
from fabric.utils import exec_shell_command_async, get_relative_path
10+
from gi.repository import GLib
611

712
from config.data import (APP_NAME, APP_NAME_CAP, CACHE_DIR, CONFIG_FILE,
8-
DOCK_ICON_SIZE, VERTICAL)
13+
HOME_DIR)
914
from modules.bar import Bar
1015
from modules.corners import Corners
1116
from modules.dock import Dock
1217
from modules.notch import Notch
1318
from modules.notifications import NotificationPopup
19+
from modules.updater import run_updater
1420

1521
fonts_updated_file = f"{CACHE_DIR}/fonts_updated"
1622

1723
if __name__ == "__main__":
1824
setproctitle.setproctitle(APP_NAME)
1925

2026
if not os.path.isfile(CONFIG_FILE):
21-
# Corregir la ruta a config.py.
22-
# get_relative_path('config/config.py') asume que 'config' es un subdirectorio
23-
# del directorio donde está main.py (la raíz del proyecto).
2427
config_script_path = get_relative_path('config/config.py')
2528
exec_shell_command_async(f"python {config_script_path}")
2629

@@ -32,6 +35,10 @@
3235
# Load configuration
3336
from config.data import load_config
3437
config = load_config()
38+
39+
GLib.idle_add(run_updater)
40+
# Every hour
41+
GLib.timeout_add(3600000, run_updater)
3542

3643
corners = Corners()
3744
bar = Bar()

modules/buttons.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -370,28 +370,28 @@ def __init__(self):
370370
name="caffeine-button",
371371
h_expand=True,
372372
child=self.caffeine_box,
373-
on_clicked=self.toggle_wlinhibit,
373+
on_clicked=self.toggle_inhibit,
374374
)
375375
add_hover_cursor(self)
376376

377377
self.widgets = [self, self.caffeine_label, self.caffeine_status, self.caffeine_icon]
378-
self.check_wlinhibit()
378+
self.check_inhibit()
379379

380-
def toggle_wlinhibit(self, *args, external=False):
380+
def toggle_inhibit(self, *args, external=False):
381381
"""
382-
Toggle the 'wlinhibit' process:
382+
Toggle the 'ax-inhibit' process:
383383
- If running, kill it and mark as 'Disabled' (add 'disabled' class).
384384
- If not running, start it and mark as 'Enabled' (remove 'disabled' class).
385385
"""
386386

387387
try:
388-
subprocess.check_output(["pgrep", "wlinhibit"])
389-
exec_shell_command_async("pkill wlinhibit")
388+
subprocess.check_output(["pgrep", "ax-inhibit"])
389+
exec_shell_command_async("pkill ax-inhibit")
390390
self.caffeine_status.set_label("Disabled")
391391
for i in self.widgets:
392392
i.add_style_class("disabled")
393393
except subprocess.CalledProcessError:
394-
exec_shell_command_async("wlinhibit")
394+
exec_shell_command_async(f"python {data.HOME_DIR}/.config/{data.APP_NAME_CAP}/scripts/inhibit.py")
395395
self.caffeine_status.set_label("Enabled")
396396
for i in self.widgets:
397397
i.remove_style_class("disabled")
@@ -401,9 +401,9 @@ def toggle_wlinhibit(self, *args, external=False):
401401
message = "Disabled 💤" if self.caffeine_status.get_label() == "Disabled" else "Enabled ☀️"
402402
exec_shell_command_async(f"notify-send '☕ Caffeine' '{message}' -a '{data.APP_NAME_CAP}' -e")
403403

404-
def check_wlinhibit(self, *args):
404+
def check_inhibit(self, *args):
405405
try:
406-
subprocess.check_output(["pgrep", "wlinhibit"])
406+
subprocess.check_output(["pgrep", "ax-inhibit"])
407407
self.caffeine_status.set_label("Enabled")
408408
for i in self.widgets:
409409
i.remove_style_class("disabled")

0 commit comments

Comments
 (0)