diff --git a/applications/desktop/Draw.desktop b/applications/desktop/Draw.desktop new file mode 100644 index 0000000..23b898f --- /dev/null +++ b/applications/desktop/Draw.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=Draw +Comment=Draw in the browser +Exec=blob-launch-webapp https://draw.sirblob.co/ +Terminal=false +Type=Application +Icon=Draw +StartupNotify=true diff --git a/applications/icons/Draw.png b/applications/icons/Draw.png new file mode 100644 index 0000000..041545c Binary files /dev/null and b/applications/icons/Draw.png differ diff --git a/docs/install.md b/docs/install.md index aa08929..a5dca99 100644 --- a/docs/install.md +++ b/docs/install.md @@ -59,6 +59,9 @@ with `--check`. panels come up full of blanks. `fonts.conf` binds `monospace` to `JetBrainsMono Nerd Font`; `blob font set` rewrites the same file, and the installer then reports it as a local change and keeps your choice. + Launcher entries in `applications/desktop/` go to `~/.local/share/applications` + and their icons in `applications/icons/` to `~/.local/share/icons/hicolor/32x32/apps`; + that is how the Draw web app is installed. Default applications are set in `~/.config/mimeapps.list`: Loupe for images, `mpv` for video and audio, `evince` for PDFs and other documents, LibreOffice for documents, spreadsheets and presentations, GNOME Text Editor for text, and diff --git a/docs/keybinds.md b/docs/keybinds.md index a06d75a..53a6886 100644 --- a/docs/keybinds.md +++ b/docs/keybinds.md @@ -15,6 +15,7 @@ Personal overrides in `hypr/bindings.lua` win over the defaults, and | `SUPER + CTRL + M` | System monitor | | `SUPER + CTRL + Q` | Quick settings | | `SUPER + SHIFT + CTRL + D` | Display layout | +| `SUPER + SHIFT + W` | Draw | | `SUPER + SPACE` | Apps menu | ## Applications diff --git a/hypr/bindings.lua b/hypr/bindings.lua index 96897d8..965f1c6 100644 --- a/hypr/bindings.lua +++ b/hypr/bindings.lua @@ -5,6 +5,7 @@ o.bind("SUPER + ALT + W", "Wallpapers", "blob-shell shell toggle blob.displays") o.bind("SUPER + CTRL + M", "System monitor", "blob-shell shell toggle blob.sysmon") o.bind("SUPER + SHIFT + CTRL + D", "Display layout", "blob-shell shell toggle blob.display-layout") o.bind("SUPER + CTRL + Q", "Quick settings", "blob-shell shell toggle blob.quick-settings") +o.bind("SUPER + SHIFT + W", "Draw", { webapp = "https://draw.sirblob.co/", focus = true }) -- Apps on SUPER + SPACE, root menu on ALT, swapping the shipped defaults back. hl.unbind("SUPER + SPACE") diff --git a/install.sh b/install.sh index f113ca0..56d6314 100755 --- a/install.sh +++ b/install.sh @@ -81,6 +81,7 @@ install_bash_integration install_user_units install_systemd_dropins install_zen_config +install_desktop_apps install_default_apps section "Theme" diff --git a/install/steps/config.sh b/install/steps/config.sh index f7cbbbe..6fbfda8 100644 --- a/install/steps/config.sh +++ b/install/steps/config.sh @@ -62,6 +62,14 @@ install_shipped_config() { install_file "$repo_dir/session/uwsm/env.d/10-blob" "$config_dir/uwsm/env.d/10-blob" "uwsm/env.d/10-blob" } +desktop_entry_dir="$HOME/.local/share/applications" +app_icon_dir="$HOME/.local/share/icons/hicolor/32x32/apps" + +install_desktop_apps() { + install_tree "$repo_dir/applications/desktop" "$desktop_entry_dir" "applications" + install_tree "$repo_dir/applications/icons" "$app_icon_dir" "icons" +} + remove_omarchy_font() { local omarchy_font="$font_dir/omarchy.ttf" diff --git a/uninstall.sh b/uninstall.sh index 2adec81..e54a2bd 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -3,6 +3,7 @@ set -e blob_path="$HOME/.local/share/blob" +repo_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" config_dir="$HOME/.config" session_entry="/usr/local/share/wayland-sessions/blob.desktop" @@ -105,6 +106,16 @@ for relative in blob/shell.json uwsm/default uwsm/env.d/10-blob; do restore_or_remove "$config_dir/$relative" "$relative" done +for desktop_file in "$repo_dir"/applications/desktop/*.desktop; do + [[ -e $desktop_file ]] || continue + restore_or_remove "$HOME/.local/share/applications/$(basename "$desktop_file")" "applications/$(basename "$desktop_file")" +done + +for icon_file in "$repo_dir"/applications/icons/*; do + [[ -e $icon_file ]] || continue + restore_or_remove "$HOME/.local/share/icons/hicolor/32x32/apps/$(basename "$icon_file")" "icons/$(basename "$icon_file")" +done + if [[ -d $config_dir/blob ]]; then rm -rf "$config_dir/blob" say "remove ~/.config/blob"