KDE Connect/Tutorials/Useful commands/da: Difference between revisions

From KDE UserBase Wiki
(Importing a new version from external source)
(Updating to match new version of source page)
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages />
<languages />
<span id="List_of_example_commands_for_KDE_Connect"></span>
== Liste med eksempler på kommandoer til KDE Connect ==
== Liste med eksempler på kommandoer til 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!
I [[Special:myLanguage/KDEConnect|KDE Connect]] kan du tilføje dine egne kommandoer og udføre den fra din telefon. Her er nogle nyttige kommandoer. Du er velkommen til at tilføje dine egne.


===Control your computer state===
<span id="Control_your_computer_state"></span>
=== Kontrollér din computers tilstand ===


* Shutdown: {{Output|1=<nowiki>systemctl poweroff</nowiki>}}
<div class="mw-translate-fuzzy">
* Luk ned: {{Output|1=<nowiki>systemctl poweroff</nowiki>}}
* Reboot: {{Output|1=<nowiki>systemctl reboot</nowiki>}}
* Reboot: {{Output|1=<nowiki>systemctl reboot</nowiki>}}
* Suspend: {{Output|1=<nowiki>systemctl suspend</nowiki>}}
* Suspendér: {{Output|1=<nowiki>systemctl suspend</nowiki>}}
* Hibernate: {{Output|1=<nowiki>systemctl hibernate</nowiki>}}
* Dvale: {{Output|1=<nowiki>systemctl hibernate</nowiki>}}
* Lock screen: {{Output|1=<nowiki>loginctl lock-session</nowiki>}}
* Låseskærm: {{Output|1=<nowiki>loginctl lock-session</nowiki>}}
* Unlock screen: {{Output|1=<nowiki>loginctl unlock-session</nowiki>}}
* Lås op: {{Output|1=<nowiki>loginctl unlock-session</nowiki>}}
* Turn off screen: {{Output|1=<nowiki>xset dpms force off</nowiki>}}
* Sluk skærm: {{Output|1=<nowiki>sleep 0.1 && qdbus org.kde.kglobalaccel /component/org_kde_powerdevil invokeShortcut "Turn Off Screen"</nowiki>}}
* Turn on screen: {{Output|1=<nowiki>xset dpms force on</nowiki>}}
* Lås tastatur og mus (ikke skærmen): {{Output|1=<nowiki>pyxtrlock</nowiki>}}
* Lock keyboard and mouse (not the screen): {{Output|1=<nowiki>pyxtrlock</nowiki>}}
* Lås tastatur og mus op: {{Output|1=<nowiki>pkill pyxtrlock</nowiki>}}
* Unlock keyboard and mouse: {{Output|1=<nowiki>pkill pyxtrlock</nowiki>}}
</div>
 
<span id="Volume_control"></span>
=== Volumenkontrol ===


===Volume control===


====Plasma====
====Plasma====


* Volume down: {{Output|1=<nowiki>qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "decrease_volume"</nowiki>}}
* Formindsk lydstyrke: {{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>}}
* Forøg lydstyrke: {{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: {{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>}}
* Mute mikrofoner: {{Output|1=<nowiki>qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "mic_mute"</nowiki>}}
 
<span id="Other_DE/WM_(with_pactl)"></span>
==== Andre DE/WM (med pactl) ====
 
* Formindsk lydstyrke: {{Output|1=<nowiki>
pactl set-sink-volume @DEFAULT_SINK@ -10%
## OR
pactl set-sink-volume $(pactl list short sinks | grep RUNNING | cut -f1) -10%</nowiki>}}
 
* Forøg lydstyrke: {{Output|1=<nowiki>
pactl set-sink-volume @DEFAULT_SINK@ +10%
## OR
pactl set-sink-volume $(pactl list short sinks | grep RUNNING | cut -f1) +10%
</nowiki>}}
 
* Mute/Unmute: {{Output|1=<nowiki>
pactl set-sink-mute @DEFAULT_SINK@ toggle
## OR
pactl set-sink-mute $(pactl list short sinks | grep RUNNING | cut -f1) toggle</nowiki>}}
 
<span id="Other_DE/WM_(with_amixer)"></span>
====Andre DE/WM (med amixer)====
 
* Formindsk lydstyrke: {{Output|1=<nowiki>amixer -q sset Master 10%-</nowiki>}}
* Forøg lydstyrke: {{Output|1=<nowiki>amixer -q sset Master 10%+</nowiki>}}
Andre kommandoer kan bygges ved at bruge [https://linux.die.net/man/1/amixer amixer]


====Other DE/WM (with pactl)====
<span id="Change_look_and_feel"></span>
=== Skift udseende og fremtoning ===


* Volume down: {{Output|1=<nowiki>pactl set-sink-volume $(pactl list short sinks | grep RUNNING | cut -f1) -10%</nowiki>}}
* Breeze (Light) tema: {{Output|1=<nowiki>lookandfeeltool -a 'org.kde.breeze.desktop'</nowiki>}}
* Volume up: {{Output|1=<nowiki>pactl set-sink-volume $(pactl list short sinks | grep RUNNING | cut -f1) +10%</nowiki>}}
* Breeze (Dark) tema: {{Output|1=<nowiki>lookandfeeltool -a 'org.kde.breezedark.desktop'</nowiki>}}
* Mute/Unmute: {{Output|1=<nowiki>pactl set-sink-mute $(pactl list short sinks | grep RUNNING | cut -f1) toggle</nowiki>}}


===Change look and feel===
<span id="Brightness_settings"></span>
=== Indstilling af lysstyrke ===


* Breeze (Light) theme: {{Output|1=<nowiki>lookandfeeltool -a 'org.kde.breeze.desktop'</nowiki>}}
* Forøg lysstyrke: {{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>}}
* Breeze (Dark) theme: {{Output|1=<nowiki>lookandfeeltool -a 'org.kde.breezedark.desktop'</nowiki>}}
* Formindsk lysstyrke: {{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 settings===
<span id="Screen_capture"></span>
=== Skærmbilleder ===


* 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>}}
* Gem lokalt: {{Output|1=<nowiki>spectacle -b</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 org.kde.Solid.PowerManagement.Actions.BrightnessControl.brightness) - 375)</nowiki>}}
* Send til telefon: {{Output|1=<nowiki>file=/tmp/$(hostname)_$(date "+%Y%m%d_%H%M%S").png; spectacle -bo "${file}" && while ! [ -f "${file}" ]; do sleep 0.5; done && kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --share "${file}"</nowiki>}}
* Gem webcam-foto i mappen Billeder (Images) og send til telefon: {{Output|1=<nowiki>file="$HOME/Images/WebcamImage_$(date "+%Y%m%d_%H%M%S").jpg"; ffmpeg -f video4linux2 -s 1280x720 -i /dev/video0 -ss 0:0:2 -frames 1 "${file}" && kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --share "${file}"</nowiki>}}


===Screenshot===
<span id="Send_output_of_any_command_to_your_phone"></span>
=== Send resultatet fra enhver kommando til din telefon ===


* Save locally: {{Output|1=<nowiki>spectacle -b</nowiki>}}
* Tjek status for baloo-indeksering: {{Output|1=<nowiki>kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --ping-msg "$(balooctl status)"</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>}}
* Tjek linje 5, 7 og 9 i speedtest-cli: {{Output|1=<nowiki>kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --ping-msg "$(speedtest-cli|awk 'NR==5;NR==7;NR==9 {print;exit}')"</nowiki>}}
* Tjek at tjenesten sshd kører: {{Output|1=<nowiki>kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --ping-msg "$(systemctl status sshd|grep Active)"</nowiki>}}
* Tjek hvilke 5 programmer, der bruger mest RAM: {{Output|1=<nowiki>kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --ping-msg "$(ps -eo pid,%mem,cmd --sort=-%mem | head -n 6)"</nowiki>}}


[[Category:Tutorials]]
[[Category:Vejledning/da]]

Latest revision as of 12:37, 17 February 2024

Liste med eksempler på kommandoer til KDE Connect

I KDE Connect kan du tilføje dine egne kommandoer og udføre den fra din telefon. Her er nogle nyttige kommandoer. Du er velkommen til at tilføje dine egne.

Kontrollér din computers tilstand

  • Luk ned:
    systemctl poweroff
  • Reboot:
    systemctl reboot
  • Suspendér:
    systemctl suspend
  • Dvale:
    systemctl hibernate
  • Låseskærm:
    loginctl lock-session
  • Lås op:
    loginctl unlock-session
  • Sluk skærm:
    sleep 0.1 && qdbus org.kde.kglobalaccel /component/org_kde_powerdevil invokeShortcut "Turn Off Screen"
  • Lås tastatur og mus (ikke skærmen):
    pyxtrlock
  • Lås tastatur og mus op:
    pkill pyxtrlock

Volumenkontrol

Plasma

  • Formindsk lydstyrke:
    qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "decrease_volume"
  • Forøg lydstyrke:
    qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "increase_volume"
  • Mute:
    qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "mute"
  • Mute mikrofoner:
    qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "mic_mute"

Andre DE/WM (med pactl)

  • Formindsk lydstyrke:
    pactl set-sink-volume @DEFAULT_SINK@ -10%
    ## OR
    pactl set-sink-volume $(pactl list short sinks | grep RUNNING | cut -f1) -10%
  • Forøg lydstyrke:
    pactl set-sink-volume @DEFAULT_SINK@ +10%
    ## OR
    pactl set-sink-volume $(pactl list short sinks | grep RUNNING | cut -f1) +10%
    
  • Mute/Unmute:
    pactl set-sink-mute @DEFAULT_SINK@ toggle
    ## OR
    pactl set-sink-mute $(pactl list short sinks | grep RUNNING | cut -f1) toggle

Andre DE/WM (med amixer)

  • Formindsk lydstyrke:
    amixer -q sset Master 10%-
  • Forøg lydstyrke:
    amixer -q sset Master 10%+

Andre kommandoer kan bygges ved at bruge amixer

Skift udseende og fremtoning

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

Indstilling af lysstyrke

  • Forøg lysstyrke:
    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)
  • Formindsk lysstyrke:
    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)

Skærmbilleder

  • Gem lokalt:
    spectacle -b
  • Send til telefon:
    file=/tmp/$(hostname)_$(date "+%Y%m%d_%H%M%S").png; spectacle -bo "${file}" && while ! [ -f "${file}" ]; do sleep 0.5; done && kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --share "${file}"
  • Gem webcam-foto i mappen Billeder (Images) og send til telefon:
    file="$HOME/Images/WebcamImage_$(date "+%Y%m%d_%H%M%S").jpg"; ffmpeg -f video4linux2 -s 1280x720 -i /dev/video0 -ss 0:0:2 -frames 1 "${file}" && kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --share "${file}"

Send resultatet fra enhver kommando til din telefon

  • Tjek status for baloo-indeksering:
    kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --ping-msg "$(balooctl status)"
  • Tjek linje 5, 7 og 9 i speedtest-cli:
    kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --ping-msg "$(speedtest-cli|awk 'NR==5;NR==7;NR==9 {print;exit}')"
  • Tjek at tjenesten sshd kører:
    kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --ping-msg "$(systemctl status sshd|grep Active)"
  • Tjek hvilke 5 programmer, der bruger mest RAM:
    kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --ping-msg "$(ps -eo pid,%mem,cmd --sort=-%mem | head -n 6)"