Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add layouts page #39

Merged
merged 7 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
359 changes: 228 additions & 131 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ version = "0.1.1"
edition = "2021"

[dependencies]
anyhow = "1.0.82"
ashpd = "0.8.1"
dirs = "5.0.1"
env_logger = "0.11.5"
Expand All @@ -17,12 +16,16 @@ reqwest = { version = "0.12", features = ["json"] }
ron = "0.8.1"
rust-embed = "8.3.0"
paste = "1.0"
anyhow = "1.0.91"

[dependencies.libcosmic]
git = "https://github.com/pop-os/libcosmic.git"
default-features = false
features = ["multi-window", "tokio", "winit", "wgpu"]

[dependencies.cosmic-ext-config-templates]
git = "https://github.com/ryanabx/cosmic-ext-config-templates"

[dependencies.i18n-embed]
version = "0.14"
features = ["fluent-system", "desktop-requester"]
Expand Down
3 changes: 3 additions & 0 deletions i18n/en/cosmic_ext_tweaks.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ app-description = A tool to customize your COSMIC desktop experience.
home = Home
dock = Dock
panel = Panel
layouts = Layouts
color-schemes = Color schemes
color-schemes-error = Error loading color schemes
import-color-scheme = Import color scheme
delete-color-scheme = Delete color scheme
delete-layout = Delete layout
install-color-scheme = Install color scheme
find-color-schemes = Find color schemes
open-containing-folder = Open containing folder
Expand All @@ -33,6 +35,7 @@ spacing-description = Spacing is the space between the icons in the dock or pane
save = Save
cancel = Cancel
save-current-color-scheme = Save current color scheme
save-current-layout = Save current layout
color-scheme-name = Color scheme name

## About
Expand Down
1 change: 1 addition & 0 deletions res/icons/bundled/view-coverflow-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions res/layouts/cosmic.ron
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
Panel((
panel_config: (
config_list: [
(
name: "Panel",
anchor: Top,
anchor_gap: false,
layer: Top,
keyboard_interactivity: OnDemand,
size: XS,
output: All,
background: ThemeDefault,
plugins_wings: Some(([
"com.system76.CosmicPanelWorkspacesButton",
"com.system76.CosmicPanelAppButton",
], [
"com.system76.CosmicAppletInputSources",
"com.system76.CosmicAppletStatusArea",
"com.system76.CosmicAppletTiling",
"com.system76.CosmicAppletAudio",
"com.system76.CosmicAppletNetwork",
"com.system76.CosmicAppletBattery",
"com.system76.CosmicAppletNotifications",
"com.system76.CosmicAppletBluetooth",
"com.system76.CosmicAppletPower",
])),
plugins_center: Some([
"com.system76.CosmicAppletTime",
]),
expand_to_edges: true,
padding: 0,
spacing: 2,
border_radius: 0,
exclusive_zone: true,
autohide: None,
margin: 0,
opacity: 1.0,
),
(
name: "Dock",
anchor: Bottom,
anchor_gap: false,
layer: Top,
keyboard_interactivity: OnDemand,
size: L,
output: All,
background: ThemeDefault,
plugins_wings: None,
plugins_center: Some([
"com.system76.CosmicPanelLauncherButton",
"com.system76.CosmicPanelWorkspacesButton",
"com.system76.CosmicPanelAppButton",
"com.system76.CosmicAppList",
"com.system76.CosmicAppletMinimize",
]),
expand_to_edges: true,
padding: 0,
spacing: 4,
border_radius: 0,
exclusive_zone: true,
autohide: None,
margin: 0,
opacity: 1.0,
),
],
),
panel_config_version: 1,
panel_button_config: (
configs: {
"Dock": (
force_presentation: Some(Icon),
),
"Panel": (
force_presentation: None,
),
},
),
panel_button_config_version: 1,
))
71 changes: 71 additions & 0 deletions res/layouts/mac.ron
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
Panel((
panel_config: (
config_list: [
(
name: "Panel",
anchor: Top,
anchor_gap: false,
layer: Top,
keyboard_interactivity: OnDemand,
size: XS,
output: All,
background: ThemeDefault,
plugins_wings: Some(([
"com.system76.CosmicAppletPower",
], [
"com.system76.CosmicAppletStatusArea",
"com.system76.CosmicAppletBattery",
"com.system76.CosmicAppletNetwork",
"com.system76.CosmicPanelLauncherButton",
"com.system76.CosmicAppletNotifications",
"com.system76.CosmicAppletTime",
])),
plugins_center: Some([]),
expand_to_edges: true,
padding: 4,
spacing: 4,
border_radius: 0,
exclusive_zone: true,
autohide: None,
margin: 0,
opacity: 0.91,
),
(
name: "Dock",
anchor: Bottom,
anchor_gap: true,
layer: Top,
keyboard_interactivity: OnDemand,
size: S,
output: All,
background: ThemeDefault,
plugins_wings: Some(([], [])),
plugins_center: Some([
"com.system76.CosmicAppList",
"com.system76.CosmicPanelAppButton",
"com.system76.CosmicAppletMinimize",
]),
expand_to_edges: false,
padding: 6,
spacing: 4,
border_radius: 8,
exclusive_zone: true,
autohide: None,
margin: 4,
opacity: 1.0,
),
],
),
panel_config_version: 1,
panel_button_config: (
configs: {
"Panel": (
force_presentation: Some(Icon),
),
"Dock": (
force_presentation: Some(Icon),
),
},
),
panel_button_config_version: 1,
))
79 changes: 79 additions & 0 deletions res/layouts/ubuntu.ron
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
Panel((
panel_config: (
config_list: [
(
name: "Panel",
anchor: Top,
anchor_gap: false,
layer: Top,
keyboard_interactivity: OnDemand,
size: XS,
output: All,
background: ThemeDefault,
plugins_wings: Some(([
"com.system76.CosmicPanelWorkspacesButton",
"com.system76.CosmicPanelAppButton",
], [
"com.system76.CosmicAppletInputSources",
"com.system76.CosmicAppletStatusArea",
"com.system76.CosmicAppletTiling",
"com.system76.CosmicAppletAudio",
"com.system76.CosmicAppletNetwork",
"com.system76.CosmicAppletBattery",
"com.system76.CosmicAppletNotifications",
"com.system76.CosmicAppletBluetooth",
"com.system76.CosmicAppletPower",
])),
plugins_center: Some([
"com.system76.CosmicAppletTime",
]),
expand_to_edges: true,
padding: 0,
spacing: 2,
border_radius: 0,
exclusive_zone: true,
autohide: None,
margin: 0,
opacity: 1.0,
),
(
name: "Dock",
anchor: Left,
anchor_gap: false,
layer: Top,
keyboard_interactivity: OnDemand,
size: M,
output: All,
background: ThemeDefault,
plugins_wings: Some(([
"com.system76.CosmicPanelLauncherButton",
"com.system76.CosmicPanelWorkspacesButton",
"com.system76.CosmicPanelAppButton",
"com.system76.CosmicAppList",
"com.system76.CosmicAppletMinimize",
], [])),
plugins_center: Some([]),
expand_to_edges: true,
padding: 0,
spacing: 4,
border_radius: 0,
exclusive_zone: true,
autohide: None,
margin: 0,
opacity: 1.0,
),
],
),
panel_config_version: 1,
panel_button_config: (
configs: {
"Panel": (
force_presentation: None,
),
"Dock": (
force_presentation: Some(Icon),
),
},
),
panel_button_config_version: 1,
))
50 changes: 50 additions & 0 deletions res/layouts/windows.ron
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Panel((
panel_config: (
config_list: [
(
name: "Panel",
anchor: Bottom,
anchor_gap: false,
layer: Top,
keyboard_interactivity: OnDemand,
size: S,
output: All,
background: ThemeDefault,
plugins_wings: Some(([
"com.system76.CosmicAppletPower",
], [
"com.system76.CosmicAppletNetwork",
"com.system76.CosmicAppletAudio",
"com.system76.CosmicAppletBattery",
"com.system76.CosmicAppletTime",
"com.system76.CosmicAppletNotifications",
])),
plugins_center: Some([
"com.system76.CosmicPanelAppButton",
"com.system76.CosmicPanelLauncherButton",
"com.system76.CosmicAppList",
]),
expand_to_edges: true,
padding: 4,
spacing: 4,
border_radius: 0,
exclusive_zone: true,
autohide: None,
margin: 0,
opacity: 0.91,
),
],
),
panel_config_version: 1,
panel_button_config: (
configs: {
"Dock": (
force_presentation: Some(Icon),
),
"Panel": (
force_presentation: Some(Icon),
),
},
),
panel_button_config_version: 1,
))
Loading
Loading