KDE Connect/Tutorials/Useful commands: Difference between revisions

From KDE UserBase Wiki
m (Typos)
Line 29: Line 29:
* Brightness Up: {{Output|1=<nowiki>qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.setBrightness $(expr $(qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.brightness) + 375)</nowiki>}}
* Brightness Up: {{Output|1=<nowiki>qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.setBrightness $(expr $(qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.brightness) + 375)</nowiki>}}
* Brightness Down: {{Output|1=<nowiki>qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.setBrightness $(expr $(qdbus org.kde.Solid.PowerManagement /org/kde/Solid.PowerManagement.Actions.BrightnessControl.brightness) + 375)</nowiki>}}
* Brightness Down: {{Output|1=<nowiki>qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.setBrightness $(expr $(qdbus org.kde.Solid.PowerManagement /org/kde/Solid.PowerManagement.Actions.BrightnessControl.brightness) + 375)</nowiki>}}
==Screenshot==
* Save locally: {{Output|1=<nowiki>spectacle -b</nowiki>}}
* Send to phone: {{Output|1=<nowiki>file=/tmp/$(hostname)_$(date "+%Y%m%d_%H%M%S").png; spectacle -bo "${file}" && kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --share ${file}</nowiki>}}


</translate>
</translate>

Revision as of 20:14, 30 July 2018

Under Construction

This is a new page, currently under construction!


List of example commands for KDE Connect

In KDE Connect, you can add your own commands and execute them from your phone. Here are some useful command. Feel free to add your own!

Control your computer state

  • Shutdown:
    systemctl poweroff
  • Suspend:
    systemctl suspend
  • Lock screen:
    loginctl lock-session
  • Unlock screen:
    loginctl unlock-session
  • Turn off screen:
    xset dpms force off
  • Turn on screen:
    xset dpms force on
  • Lock keyboard and mouse (not the screen):
    pyxtrlock
  • Unlock keyboard and mouse:
    pkill pyxtrlock

Volume control

  • Volume down:
    qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "decrease_volume"
  • Volume up:
    qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "increase_volume"

Change look and feel

  • Breeze (Light) theme:
    lookandfeeltool -a 'org.kde.breeze.desktop'
  • Breeze (Dark) theme:
    lookandfeeltool -a 'org.kde.breezedark.desktop'

Brightness settings

  • Brightness Up:
    qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.setBrightness $(expr $(qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.brightness) + 375)
  • Brightness Down:
    qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.setBrightness $(expr $(qdbus org.kde.Solid.PowerManagement /org/kde/Solid.PowerManagement.Actions.BrightnessControl.brightness) + 375)

Screenshot

  • Save locally:
    spectacle -b
  • Send to phone:
    file=/tmp/$(hostname)_$(date "+%Y%m%d_%H%M%S").png; spectacle -bo "${file}" && kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --share ${file}