This is the settings app for Pop!_OS's new COSMIC desktop.

Overview

cosmic-settings

This is the settings app for Pop!_OS's new COSMIC desktop. It is currently WIP and not ready for use, although if you want to run it and play around with the GUI, feel free!

Building

COSMIC Settings is built using Rust. It targets the latest stable version of Rust, and requires that GTK 4 be installed.

Install Pre-Requisites

# Install build tools and GTK-4
$ sudo apt install -y build-essential libgtk-4-dev
# Install Rust toolchain manager and Rust
# Note: you should always use rustup, as your package manager likely packages an older version!
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Make the Rust toolchain available in the current environment
$ source $HOME/.cargo/env

Build

For a quick build, use cargo build (or cargo run to go straight to running it).

For an optimized release build, use cargo build --release (or cargo run --release to go straight to running it).

App Styling

Currently, the settings app is styled using SCSS files, as seen in the scss directory.

All .scss files in the directory (excluding those that start with _) are combined and compiled using the grass crate at build-time, and the resulting CSS is used to style the app.

License

COSMIC Settings is free software: you can redistribute it and/or modify it under the terms of version 3 of the GNU General Public License as published by the Free Software Foundation.

COSMIC Settings is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Comments
  • Use the view macro for better readability

    Use the view macro for better readability

    Out of curiosity, I had a look at the code and noticed a lot of the code like this: https://github.com/pop-os/cosmic-settings/blob/master/src/ui/section.rs#L17

    Even when using cascade it doesn't look very nice (at least to me) and the structure of the UI is somewhat hidden. With Relm4's view macro (that's even independent from Relm4 itself with the upcoming release), the code I've linked (line 17 to 37) would look roughly like this:

    view! {
        row = ListBoxSelectionRow::new(S::NAME.into()) {
            add_css_class: "nav-element",
            set_margin_all: 8,
            set_child: entry_box = Some(&gtk4::Box) {
                set_orientation: Orientation::Horizontal,
                set_spacing: 8,
                set_margin_all: 10,
                append: icon = &Image::from_icon_name(Some(S::ICON)) {},
                append: label = Label {
                    set_label: S::NAME
                }
            }
        }
    }	
    
    opened by AaronErhardt 5
  • Reduced search bar motion. Search button focuses cursor.

    Reduced search bar motion. Search button focuses cursor.

    • Search button no longer shifts to the right when clicked
    • Navigation bar is slightly taller, no longer changing height when the search bar is hidden/revealed.
    • Clicking the search button now focuses the cursor in the text box, saving precious milliseconds.
    opened by rosettet 1
  • WiFi scanning improvements

    WiFi scanning improvements

    Something like this should work effectively for handling GTK events in Rust without the need for much reference counting.

    • Uses an event loop in a glib::MainContext::default() spawned local future for handling events to the WiFi widget and managing all WiFi-related state.
    • Sends events using a tokio::sync::mpsc::UnboundedSender so it doesn't block widget signals
    • AP info stored in a SlotMap so they can be referenced by an ID across events.
    • Added dummy dialog to respond to configure signals
    • Convenience function task::spawn_local for spawning tasks locally on GLib.
    • task::spawn for spawning tasks in the background on Tokio.
    enhancement 
    opened by mmstick 0
  • Is the use of `css-classes` intentional?

    Is the use of `css-classes` intentional?

    https://github.com/pop-os/cosmic-settings/blob/b3ebe0f61b4095dfb8e75c52d0feffb3c6da636d/src/widgets/search_bar.rs#L63

    In GTK4, css-classes wipes out all other CSS classes on a widget when set, including the default ones. Depending on the widget this can completely break styling unless your styling substitutes it properly. Is this intentional?

    If not, you should be using add_css_class()/remove_css_class().

    opened by BrainBlasted 1
  • Cosmic Settings External Plugins

    Cosmic Settings External Plugins

    There should be some way to load external settings menus and such for the settings menus.

    Several possible approaches:

    1. embedded compositor. most complex option, but also the most versatile - each settings menu could be an individual executable, similar to the applets
    2. shared library - could just dlopen+dlsym (libloading) a function that returns a GtkBox or something and some metadata about like where it goes in the menu and stuff. (see: abi_stable)
    3. just build modules into the executable itself? least flexible, but the most "Rust-y" option.
    opened by Absolucy 0
Owner
Pop!_OS
An Operating System by System76
Pop!_OS
SquareDB - A new database

SquareDB The idea behind this was to create a new database, focusing on the data structures and algorithms behind it. I am also really interested in l

Goren Barak 7 Oct 20, 2023
example of a full stack web app (backend and frontend) wrtiten in Rust

rust-fullstack-example An example of creating a full stack web application (backend and frontend) using Rust. Backend Go to ./backend and start the se

mario 41 Dec 16, 2022
Learning Rust: Sample App

mars_calc The App runs on rust takes inpit weight in kg of earth and returns the weight on mars My first rust App Ownership Rules First, let’s take a

Koti Syamala 0 Dec 24, 2021
Jotsy is a self-hosted, free and open-source note taking app with a goal of simplicity in mind

Jotsy: Just your notes Jotsy is a self-hosted, free and open-source note taking app with a goal of simplicity in mind. It is powered by Skytable. Read

Sayan 433 Dec 30, 2022
yeenserve is a web app for serving random photos.

yeenserve yeenserve is a simple web app written in Rust that serves random images from a directory. It was written as the backing application for hyen

Mystic 3 Nov 30, 2022
A Rust app for creating RSS Feeds in Notion.

Notion Feed A Rust app for creating RSS Feeds in Notion. Features Manage your RSS sources in a separate Notion page Enable/disable RSS sources Read fe

Alexandru Bereghici 16 Nov 30, 2022
An occult chat app using Cabal 🧙✨🔮

coven ??✨?? An occult chat app using Cabal Uses the cable.rs implementation of the new Cable protocol. For now is a desktop app, but with the magic of

Mikey 7 Nov 2, 2023
Persist game settings like music volume or graphic settings in a nice toml file in the right location.

Bevy Settings The goal of this project is to store settings in a resource throughout game launches. Currently this crate supports Linux, Mac and Windo

Tobias Kriebisch 9 Feb 25, 2023
Easy c̵̰͠r̵̛̠ö̴̪s̶̩̒s̵̭̀-t̶̲͝h̶̯̚r̵̺͐e̷̖̽ḁ̴̍d̶̖̔ ȓ̵͙ė̶͎ḟ̴͙e̸̖͛r̶̖͗ë̶̱́ṉ̵̒ĉ̷̥e̷͚̍ s̷̹͌h̷̲̉a̵̭͋r̷̫̊ḭ̵̊n̷̬͂g̵̦̃ f̶̻̊ơ̵̜ṟ̸̈́ R̵̞̋ù̵̺s̷̖̅ţ̸͗!̸̼͋

Rust S̵̓i̸̓n̵̉ I̴n̴f̶e̸r̵n̷a̴l mutability! Howdy, friendly Rust developer! Ever had a value get m̵̯̅ð̶͊v̴̮̾ê̴̼͘d away right under your nose just when

null 294 Dec 23, 2022
A project for managing all Pop!_OS sources

Pop!_OS Pop!_OS is designed for people who use their computer to create; whether it’s complicated, professional grade software and products, sophistic

Pop!_OS 2k Jan 6, 2023
Small and simple CLI app to generate .editorconfig based on a given settings.

add-editorconfig Small and simple CLI app to generate .editorconfig based on a given settings. Usage # Will create an .editorconfig in the current dir

Reinaldy Rafli 3 Jan 16, 2022
A cosmic, polyphonic, additive FM synthesizer.

?? Orbital ?? A cosmic, polyphonic, additive FM synthesizer. Features Relative (to the oscillator frequency) and absolute frequency modulation: This a

Tendsin Mende 3 Jan 4, 2023
An implementation of Piet's text interface using cosmic-text

piet-cosmic-text Implements piet's Text interface using the cosmic-text crate. License piet-cosmic-text is free software: you can redistribute it and/

John Nunley 7 Mar 12, 2023
Use your computer as a cosmic ray detector! One of the memory errors Rust does not protect against.

Your computer can double up as a cosmic ray detector. Yes, really! Cosmic rays hit your computer all the time. If they hit the RAM, this can sometimes

Johanna Sörngård 110 Jun 16, 2023
A tool and library to losslessly join multiple .mp4 files shot with same camera and settings

mp4-merge A tool and library to losslessly join multiple .mp4 files shot with same camera and settings. This is useful to merge multiple files that ar

Gyroflow 7 Jan 2, 2023
Revolutionize handheld gaming with adaptive game settings. Optimize graphics and gameplay experience based on real-time system metrics. Open-source project empowering developers to enhance games on portable devices

Welcome to the server-side application for the HarmonyLink project. This innovative software is developed with the Rust programming language and is ai

Jordon Brooks 5 Jun 28, 2023
Scriptable tool to read and write UEFI variables from EFI shell. View, save, edit and restore hidden UEFI (BIOS) Setup settings faster than with the OEM menu forms.

UEFI Variable Tool (UVT) UEFI Variable Tool (UVT) is a command-line application that runs from the UEFI shell. It can be launched in seconds from any

null 4 Dec 11, 2023
A lightweight new Bing (AI chat) desktop application which based on Tauri.

Bing Lite A lightweight new Bing (AI chat) desktop application which based on Tauri. No more Microsoft Edge, no more Chromium/Electron! Download The l

a.e. 6 Apr 5, 2023
A W.I.P desktop application for a new typesetting language, typst.

[WIP] typstudio A W.I.P desktop application for a new markup-based typesetting language, typst. Typstudio is built using Tauri. Features Syntax highli

Cubxity 40 Apr 25, 2023
CLI utility to move (or rename) your files to a new location and redirect all of its symbolic links, to the new path

Move Links CLI utility to move (or rename) your files to a new location and redirect all of its symbolic links, to the new path (or name). Usage execu

Ben Mefteh 18 May 22, 2022