Skip to content

Commit 53e4549

Browse files
committed
feat(Workspace): add missing settings and update design
1 parent 42a3061 commit 53e4549

30 files changed

+771
-60
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cosmic-settings/src/pages/desktop/workspaces.rs

Lines changed: 361 additions & 39 deletions
Large diffs are not rendered by default.

cosmic-settings/src/pages/input/mod.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::app;
1+
use crate::{app, utils::system_has_touchpad};
22
use cosmic::{
33
cosmic_config::{self, ConfigGet, ConfigSet},
44
Task,
@@ -200,22 +200,3 @@ impl page::AutoBind<crate::pages::Message> for Page {
200200
}
201201
}
202202
}
203-
204-
/// Uses `udev` to check if a touchpad device exists on the system.
205-
fn system_has_touchpad() -> bool {
206-
let Ok(mut enumerator) = udev::Enumerator::new() else {
207-
return false;
208-
};
209-
210-
let _res = enumerator.match_subsystem("input");
211-
212-
let Ok(mut devices) = enumerator.scan_devices() else {
213-
return false;
214-
};
215-
216-
devices.any(|device| {
217-
device
218-
.property_value("ID_INPUT_TOUCHPAD")
219-
.map_or(false, |value| value == "1")
220-
})
221-
}

cosmic-settings/src/utils.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,25 @@ pub fn map_stderr_output(result: io::Result<process::Output>) -> Result<(), Stri
5858
})
5959
}
6060

61+
/// Uses `udev` to check if a touchpad device exists on the system.
62+
pub fn system_has_touchpad() -> bool {
63+
let Ok(mut enumerator) = udev::Enumerator::new() else {
64+
return false;
65+
};
66+
67+
let _res = enumerator.match_subsystem("input");
68+
69+
let Ok(mut devices) = enumerator.scan_devices() else {
70+
return false;
71+
};
72+
73+
devices.any(|device| {
74+
device
75+
.property_value("ID_INPUT_TOUCHPAD")
76+
.map_or(false, |value| value == "1")
77+
})
78+
}
79+
6180
/// Creates a slab with predefined items
6281
#[macro_export]
6382
macro_rules! slab {

i18n/en/cosmic_settings.ftl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,21 @@ workspaces-overview-thumbnails = Workspace Overview Thumbnails
335335
workspaces-orientation = Workspaces Orientation
336336
.vertical = Vertical
337337
.horizontal = Horizontal
338+
.thumbnail-placement = Thumbnail placement
339+
.left = Left
340+
.right = Right
341+
.top = Top
342+
.bottom = Bottom
343+
.trackpad-gestures = Trackpad gestures
344+
.switch-workspace = Switch Workspace with Four-Finger
345+
.open-workspaces = Open Workspaces with Four-Finger
346+
.open-applications = Open Applications with Four-Finger
347+
.swipe-horizontal = Swipe Left/Right
348+
.swipe-vertical = Swipe Up/Down
349+
.swipe-up = Swipe Up
350+
.swipe-down = Swipe Down
351+
.swipe-left = Swipe Left
352+
.swipe-right = Swipe Right
338353
339354
hot-corner = Hot Corner
340355
.top-left-corner = Enable top-left hot corner for Workspaces

i18n/fr/cosmic_settings.ftl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,21 @@ workspaces-overview-thumbnails = Vignettes de l'aperçu des espaces de travail
302302
workspaces-orientation = Orientation des espaces de travail
303303
.vertical = Verticale
304304
.horizontal = Horizontale
305+
.thumbnail-placement = Positionnement des aperçus
306+
.left = Gauche
307+
.right = Droite
308+
.top = Haut
309+
.bottom = Bas
310+
.trackpad-gestures = Gestes sur le pavé tactile
311+
.switch-workspace = Changement de l'espace de travail avec quatre doigts
312+
.open-workspaces = Overture des espaces de travails avec quatre doigts
313+
.open-applications = Overture des applications avec quatre doigts
314+
.swipe-horizontal = Balayage à Gauche/Droite
315+
.swipe-vertical = Balayage en Haut/Bas
316+
.swipe-up = Balayage en Haut
317+
.swipe-down = Balayage en Bas
318+
.swipe-left = Balayage à Gauche
319+
.swipe-right = Balayage à Droite
305320
306321
hot-corner = Coin actif
307322
.top-left-corner = Activer le coin actif en haut à gauche pour les espaces de travail
Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)