chore: add startup applications command and desktop entry
This commit is contained in:
parent
0d555db0dd
commit
ee34b79359
6 changed files with 26 additions and 7 deletions
|
|
@ -120,6 +120,7 @@ impl SettingsApp {
|
||||||
PageCommands::RegionLanguage => self.pages.page_id::<time::region::Page>(),
|
PageCommands::RegionLanguage => self.pages.page_id::<time::region::Page>(),
|
||||||
#[cfg(feature = "page-sound")]
|
#[cfg(feature = "page-sound")]
|
||||||
PageCommands::Sound => self.pages.page_id::<sound::Page>(),
|
PageCommands::Sound => self.pages.page_id::<sound::Page>(),
|
||||||
|
PageCommands::StartupApps => self.pages.page_id::<applications::startup_apps::Page>(),
|
||||||
PageCommands::System => self.pages.page_id::<system::Page>(),
|
PageCommands::System => self.pages.page_id::<system::Page>(),
|
||||||
PageCommands::Time => self.pages.page_id::<time::Page>(),
|
PageCommands::Time => self.pages.page_id::<time::Page>(),
|
||||||
#[cfg(feature = "page-input")]
|
#[cfg(feature = "page-input")]
|
||||||
|
|
@ -548,6 +549,12 @@ impl cosmic::Application for SettingsApp {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
crate::pages::Message::StartupApps(message) => {
|
||||||
|
if let Some(page) = self.pages.page_mut::<applications::startup_apps::Page>() {
|
||||||
|
return page.update(message).map(Into::into);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "page-users")]
|
#[cfg(feature = "page-users")]
|
||||||
crate::pages::Message::User(message) => {
|
crate::pages::Message::User(message) => {
|
||||||
if let Some(page) = self.pages.page_mut::<system::users::Page>() {
|
if let Some(page) = self.pages.page_mut::<system::users::Page>() {
|
||||||
|
|
@ -638,12 +645,6 @@ impl cosmic::Application for SettingsApp {
|
||||||
return page.update(message).map(Into::into);
|
return page.update(message).map(Into::into);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
crate::pages::Message::StartupApps(message) => {
|
|
||||||
if let Some(page) = self.pages.page_mut::<applications::startup_apps::Page>() {
|
|
||||||
return page.update(message).map(Into::into);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
#[cfg(feature = "wayland")]
|
#[cfg(feature = "wayland")]
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,8 @@ pub enum PageCommands {
|
||||||
/// Sound settings page
|
/// Sound settings page
|
||||||
#[cfg(feature = "page-sound")]
|
#[cfg(feature = "page-sound")]
|
||||||
Sound,
|
Sound,
|
||||||
|
/// Startup applications settings page
|
||||||
|
StartupApps,
|
||||||
/// System & Accounts settings page
|
/// System & Accounts settings page
|
||||||
System,
|
System,
|
||||||
/// Time & Language settings page
|
/// Time & Language settings page
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ impl page::AutoBind<crate::pages::Message> for Page {}
|
||||||
|
|
||||||
impl page::Page<crate::pages::Message> for Page {
|
impl page::Page<crate::pages::Message> for Page {
|
||||||
fn info(&self) -> Info {
|
fn info(&self) -> Info {
|
||||||
page::Info::new("startup-apps", "system-reboot-symbolic")
|
page::Info::new("startup-apps", "preferences-startup-applications-symbolic")
|
||||||
.title(fl!("startup-apps"))
|
.title(fl!("startup-apps"))
|
||||||
.description(fl!("startup-apps", "desc"))
|
.description(fl!("startup-apps", "desc"))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1
debian/install
vendored
1
debian/install
vendored
|
|
@ -21,6 +21,7 @@
|
||||||
/usr/share/applications/com.system76.CosmicSettings.Power.desktop
|
/usr/share/applications/com.system76.CosmicSettings.Power.desktop
|
||||||
/usr/share/applications/com.system76.CosmicSettings.RegionLanguage.desktop
|
/usr/share/applications/com.system76.CosmicSettings.RegionLanguage.desktop
|
||||||
/usr/share/applications/com.system76.CosmicSettings.Sound.desktop
|
/usr/share/applications/com.system76.CosmicSettings.Sound.desktop
|
||||||
|
/usr/share/applications/com.system76.CosmicSettings.StartupApps.desktop
|
||||||
/usr/share/applications/com.system76.CosmicSettings.System.desktop
|
/usr/share/applications/com.system76.CosmicSettings.System.desktop
|
||||||
/usr/share/applications/com.system76.CosmicSettings.Time.desktop
|
/usr/share/applications/com.system76.CosmicSettings.Time.desktop
|
||||||
/usr/share/applications/com.system76.CosmicSettings.Touchpad.desktop
|
/usr/share/applications/com.system76.CosmicSettings.Touchpad.desktop
|
||||||
|
|
|
||||||
3
justfile
3
justfile
|
|
@ -52,6 +52,7 @@ entry-panel := appid + '.Panel.desktop'
|
||||||
entry-power := appid + '.Power.desktop'
|
entry-power := appid + '.Power.desktop'
|
||||||
entry-region-language := appid + '.RegionLanguage.desktop'
|
entry-region-language := appid + '.RegionLanguage.desktop'
|
||||||
entry-sound := appid + '.Sound.desktop'
|
entry-sound := appid + '.Sound.desktop'
|
||||||
|
entry-startup-apps := appid + '.StartupApps.desktop'
|
||||||
entry-system := appid + '.System.desktop'
|
entry-system := appid + '.System.desktop'
|
||||||
entry-time := appid + '.Time.desktop'
|
entry-time := appid + '.Time.desktop'
|
||||||
entry-touchpad := appid + '.Touchpad.desktop'
|
entry-touchpad := appid + '.Touchpad.desktop'
|
||||||
|
|
@ -91,6 +92,7 @@ install-desktop-entries:
|
||||||
install -Dm0644 'resources/{{entry-power}}' '{{appdir}}/{{entry-power}}'
|
install -Dm0644 'resources/{{entry-power}}' '{{appdir}}/{{entry-power}}'
|
||||||
install -Dm0644 'resources/{{entry-region-language}}' '{{appdir}}/{{entry-region-language}}'
|
install -Dm0644 'resources/{{entry-region-language}}' '{{appdir}}/{{entry-region-language}}'
|
||||||
install -Dm0644 'resources/{{entry-sound}}' '{{appdir}}/{{entry-sound}}'
|
install -Dm0644 'resources/{{entry-sound}}' '{{appdir}}/{{entry-sound}}'
|
||||||
|
install -Dm0644 'resources/{{entry-startup-apps}}' '{{appdir}}/{{entry-startup-apps}}'
|
||||||
install -Dm0644 'resources/{{entry-system}}' '{{appdir}}/{{entry-system}}'
|
install -Dm0644 'resources/{{entry-system}}' '{{appdir}}/{{entry-system}}'
|
||||||
install -Dm0644 'resources/{{entry-time}}' '{{appdir}}/{{entry-time}}'
|
install -Dm0644 'resources/{{entry-time}}' '{{appdir}}/{{entry-time}}'
|
||||||
install -Dm0644 'resources/{{entry-touchpad}}' '{{appdir}}/{{entry-touchpad}}'
|
install -Dm0644 'resources/{{entry-touchpad}}' '{{appdir}}/{{entry-touchpad}}'
|
||||||
|
|
@ -144,6 +146,7 @@ uninstall:
|
||||||
'{{appdir}}/{{entry-power}}' \
|
'{{appdir}}/{{entry-power}}' \
|
||||||
'{{appdir}}/{{entry-region-language}}' \
|
'{{appdir}}/{{entry-region-language}}' \
|
||||||
'{{appdir}}/{{entry-sound}}' \
|
'{{appdir}}/{{entry-sound}}' \
|
||||||
|
'{{appdir}}/{{entry-startup-apps}}' \
|
||||||
'{{appdir}}/{{entry-system}}' \
|
'{{appdir}}/{{entry-system}}' \
|
||||||
'{{appdir}}/{{entry-time}}' \
|
'{{appdir}}/{{entry-time}}' \
|
||||||
'{{appdir}}/{{entry-touchpad}}' \
|
'{{appdir}}/{{entry-touchpad}}' \
|
||||||
|
|
|
||||||
12
resources/com.system76.CosmicSettings.StartupApps.desktop
Normal file
12
resources/com.system76.CosmicSettings.StartupApps.desktop
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Startup applications
|
||||||
|
Comment=Configure applications which run on login.
|
||||||
|
Type=Settings
|
||||||
|
Exec=cosmic-settings startup-apps
|
||||||
|
Terminal=false
|
||||||
|
Categories=COSMIC
|
||||||
|
Keywords=COSMIC
|
||||||
|
NoDisplay=true
|
||||||
|
OnlyShowIn=COSMIC
|
||||||
|
Icon=preferences-startup-applications
|
||||||
|
StartupNotify=true
|
||||||
Loading…
Add table
Add a link
Reference in a new issue