Desktop commands | vasak-desktop
Commands implemented in vasak-desktop that new desktop features can use
Audio#
get_audio_volume()- Get the current volumeset_audio_volume(volume: u32)- Set the volumetoggle_audio_mute()- Toggle muteget_audio_devices()- List audio devicesset_audio_device(device_id: String)- Switch devicetoggle_audio_applet()- Show/hide the audio applet
Brightness#
get_brightness_info()- Current brightness informationset_brightness_info(brightness: u32)- Set the brightness
Notifications#
send_notify(notification: NotificationData)- Send a notificationclear_notifications()- Clear all notificationsget_all_notifications()- Get the list of notificationsdelete_notification(id: String)- Delete a specific notificationinvoke_notification_action(id: String, action: String)- Run an action
Network#
toggle_network_applet()- Show/hide the network applet
Bluetooth#
toggle_bluetooth_applet()- Show/hide the Bluetooth applet
Music (MPRIS)#
music_play_pause()- Play/Pausemusic_next_track()- Next trackmusic_previous_track()- Previous trackmusic_now_playing()- Current track information
Search#
global_search(query: String)- Global application searchexecute_search_result(result: SearchResult)- Run a resulttoggle_search()- Show/hide search
Keyboard Shortcuts#
get_shortcuts()- Get all shortcutsupdate_shortcut(id: String, new_keys: Vec<String>)- Update a shortcutadd_custom_shortcut(shortcut: CustomShortcut)- Add a custom shortcutdelete_shortcut(id: String)- Delete a shortcutexecute_shortcut(command: String)- Run a shortcut commandcheck_shortcut_conflicts(keys: Vec<String>)- Check for conflicts
System#
get_system_info()- System informationget_cpu_usage_only()- CPU usageget_memory_usage_only()- Memory usageget_system_config()- System configurationset_system_config(config: SystemConfig)- Set the configurationget_current_system_state()- Current system state
Theme#
toggle_system_theme()- Toggle dark/light themeget_gtk_themes()- List the available GTK themesget_cursor_themes()- List the cursor themesget_icon_packs()- List the icon packs
Session#
logout()- Log outshutdown()- Shut down the systemreboot()- Reboot the systemsuspend()- Suspend the systemdetect_display_server()- Detect X11/Wayland
Location: All of these commands are defined in src-tauri/src/commands/ and registered in src-tauri/src/lib.rs.