Desktop: Linux improve desktop integration (#3003)

* Move consts to extra module

* Add desktop icons

* Add xdg desktop file

* Improve window attributes

* Make icon background white
This commit is contained in:
Timon
2025-08-06 15:05:38 +00:00
committed by GitHub
parent caa228a1ec
commit 0462d0ea2f
7 changed files with 46 additions and 11 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
use std::fs::create_dir_all;
use std::path::PathBuf;
static APP_NAME: &str = "graphite-desktop";
use crate::consts::APP_DIRECTORY_NAME;
pub(crate) fn ensure_dir_exists(path: &PathBuf) {
if !path.exists() {
@@ -10,7 +10,7 @@ pub(crate) fn ensure_dir_exists(path: &PathBuf) {
}
pub(crate) fn graphite_data_dir() -> PathBuf {
let path = dirs::data_dir().expect("Failed to get data directory").join(APP_NAME);
let path = dirs::data_dir().expect("Failed to get data directory").join(APP_DIRECTORY_NAME);
ensure_dir_exists(&path);
path
}