KDE Connect/Tutorials/Useful commands: Difference between revisions

From KDE Wiki Sandbox
(Marked this version for translation)
(corrected heading levels)
Line 1: Line 1:
<languages />
<languages />
<translate>
<translate>
=List of example commands for KDE Connect= <!--T:1-->
==List of example commands for KDE Connect== <!--T:1-->


<!--T:2-->
<!--T:2-->
In KDE Connect, you can add your own commands and execute them from your phone. Here are some useful commands. Feel free to add your own!
In KDE Connect, you can add your own commands and execute them from your phone. Here are some useful commands. Feel free to add your own!


==Control your computer state== <!--T:3-->
===Control your computer state=== <!--T:3-->


<!--T:4-->
<!--T:4-->
Line 20: Line 20:
* Unlock keyboard and mouse: {{Output|1=<nowiki>pkill pyxtrlock</nowiki>}}
* Unlock keyboard and mouse: {{Output|1=<nowiki>pkill pyxtrlock</nowiki>}}


==Volume control== <!--T:5-->
===Volume control=== <!--T:5-->


===Plasma=== <!--T:10-->
====Plasma==== <!--T:10-->


<!--T:11-->
<!--T:11-->
Line 30: Line 30:
* Mute microphone: {{Output|1=<nowiki>qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "mic_mute"</nowiki>}}
* Mute microphone: {{Output|1=<nowiki>qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "mic_mute"</nowiki>}}


===Other DE/WM (with pactl)=== <!--T:6-->
====Other DE/WM (with pactl)==== <!--T:6-->


<!--T:12-->
<!--T:12-->
Line 37: Line 37:
* Mute/Unmute: {{Output|1=<nowiki>pactl set-sink-mute $(pactl list short sinks | grep RUNNING | cut -f1) toggle</nowiki>}}
* Mute/Unmute: {{Output|1=<nowiki>pactl set-sink-mute $(pactl list short sinks | grep RUNNING | cut -f1) toggle</nowiki>}}


==Change look and feel== <!--T:7-->
===Change look and feel=== <!--T:7-->


<!--T:13-->
<!--T:13-->
Line 43: Line 43:
* Breeze (Dark) theme: {{Output|1=<nowiki>lookandfeeltool -a 'org.kde.breezedark.desktop'</nowiki>}}
* Breeze (Dark) theme: {{Output|1=<nowiki>lookandfeeltool -a 'org.kde.breezedark.desktop'</nowiki>}}


==Brightness settings== <!--T:8-->
===Brightness settings=== <!--T:8-->


<!--T:14-->
<!--T:14-->
Line 49: Line 49:
* 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== <!--T:9-->
===Screenshot=== <!--T:9-->


<!--T:15-->
<!--T:15-->

Revision as of 05:19, 27 September 2018

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 commands. Feel free to add your own!

Control your computer state

  • Shutdown:
    systemctl poweroff
  • Reboot:
    systemctl reboot
  • Suspend:
    systemctl suspend
  • Hibernate:
    systemctl hibernate
  • 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

Plasma

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

Other DE/WM (with pactl)

  • Volume down:
    pactl set-sink-volume $(pactl list short sinks | grep RUNNING | cut -f1) -10%
  • Volume up:
    pactl set-sink-volume $(pactl list short sinks | grep RUNNING | cut -f1) +10%
  • Mute/Unmute:
    pactl set-sink-mute $(pactl list short sinks | grep RUNNING | cut -f1) toggle

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}