Difference between revisions of "KDE Connect/Tutorials/Useful commands"

m (Add some commands)
m (Add volume control with pactl)
Line 19: Line 19:
  
 
==Volume control==
 
==Volume control==
 +
===Plasma===
 
* Volume down: {{Output|1=<nowiki>qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "decrease_volume"</nowiki>}}
 
* Volume down: {{Output|1=<nowiki>qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "decrease_volume"</nowiki>}}
 
* Volume up: {{Output|1=<nowiki>qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "increase_volume"</nowiki>}}
 
* Volume up: {{Output|1=<nowiki>qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "increase_volume"</nowiki>}}
 +
* Mute: {{Output|1=<nowiki>qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "mute"</nowiki>}}
 +
* Mute microphone: {{Output|1=<nowiki>qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "mic_mute"</nowiki>}}
 +
 +
===Other (with pactl)===
 +
* Volume down: {{Output|1=<nowiki>pactl set-sink-volume $(pactl list short sinks | grep RUNNING | cut -f1) -10%</nowiki>}}
 +
* Volume up: {{Output|1=<nowiki>pactl set-sink-volume $(pactl list short sinks | grep RUNNING | cut -f1) +10%</nowiki>}}
 +
* Volume up: {{Output|1=<nowiki>pactl set-sink-mute $(pactl list short sinks | grep RUNNING | cut -f1) toggle</nowiki>}}
  
 
==Change look and feel==
 
==Change look and feel==

Revision as of 14:46, 19 September 2018

Other languages:
English • ‎català • ‎dansk • ‎français • ‎português do Brasil • ‎українська

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
  • Hibernate:
    systemctl hibernate
  • Reboot:
    systemctl reboot
  • 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 (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%
  • Volume up:
    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}



This page was last edited on 19 September 2018, at 14:46. Content is available under Creative Commons License SA 4.0 unless otherwise noted.