mirror of
https://github.com/fairyglade/ly.git
synced 2026-05-06 15:20:36 +00:00
Feature: Add custom command & label support (#945)
## What are the changes about? Adds customizable commands and labels to ly. Solves https://codeberg.org/fairyglade/ly/issues/905. Since Ly doesn't use INI headers. I use them exclusively for declarations of custom commands and labels. ### Commands Bind a keybind to a command, and add a hint to the HUD. Useful for use cases like display brightness, switching between GPUs, etc. Supports localization in the `name` field only. ex: where `lang = es`: `$brightness_up` => `bajar brillo` Declared in config.ini with the following: ```ini [cmd:F8] name = custom command 2 cmd = touch /tmp/ly.gaming ``` ### Labels Add a label to the HUD. As specified in #905. The text of the label corresponds to the output of the command specified in `[lbl:NAME]`. Only shows the first line of the output. Declared in config.ini with the following: ```ini [lbl:kernel] cmd = uname -srn refresh = 0 ``` Example to add to the config.ini: ```ini # Declare a command with the F8 binding. [cmd:F8] #The name of the command to show up in Ly. name = custom command cmd = touch /tmp/ly.gaming # Declare a label with an ID. This ID should be unique across all labels. [lbl:kernel] cmd = uname -srn # In frames, the time to re-run the command and update the label. If 0, only run once- do not refresh. refresh = 0 # Once you're done setting up labels and commands, add an empty header # below to continue configurating the rest of Ly. # Put other settings not belonging to custom commands/labels below here. [] ``` ## Pre-requisites - [x] I have tested & confirmed the changes work locally  Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/945 Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org> Co-authored-by: RadsammyT <radsammyt@gmail.com> Co-committed-by: RadsammyT <radsammyt@gmail.com>
This commit is contained in:
@@ -3,6 +3,9 @@ brightness_down = خفض السطوع
|
||||
brightness_up = رفع السطوع
|
||||
capslock = capslock
|
||||
|
||||
|
||||
|
||||
|
||||
err_alloc = فشل في تخصيص الذاكرة
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@ brightness_down = намаляване на яркостта
|
||||
brightness_up = увеличаване на яркостта
|
||||
capslock = caps lock
|
||||
custom = персонализирано
|
||||
|
||||
|
||||
|
||||
err_alloc = неуспешно заделяне на памет
|
||||
err_args = неуспешен анализ на аргументите от командния ред
|
||||
err_autologin_session = сесията за автоматично влизане не е намерена
|
||||
|
||||
@@ -3,6 +3,9 @@ brightness_down = abaixar brillantor
|
||||
brightness_up = apujar brillantor
|
||||
capslock = Bloq Majús
|
||||
|
||||
|
||||
|
||||
|
||||
err_alloc = assignació de memòria fallida
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
capslock = capslock
|
||||
|
||||
|
||||
|
||||
|
||||
err_alloc = alokace paměti selhala
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@ brightness_down = Helligkeit-
|
||||
brightness_up = Helligkeit+
|
||||
capslock = Feststelltaste
|
||||
|
||||
|
||||
|
||||
|
||||
err_alloc = Speicherzuweisung fehlgeschlagen
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@ brightness_down = decrease brightness
|
||||
brightness_up = increase brightness
|
||||
capslock = capslock
|
||||
custom = custom
|
||||
custom_info_err_output_long = output too long
|
||||
custom_info_err_no_output = no output
|
||||
custom_info_err_no_output_error = , possible error
|
||||
err_alloc = failed memory allocation
|
||||
err_args = unable to parse command line arguments
|
||||
err_autologin_session = autologin session not found
|
||||
|
||||
@@ -3,6 +3,9 @@ brightness_down = malpliigi helecon
|
||||
brightness_up = pliigi helecon
|
||||
capslock = majuskla baskulo
|
||||
custom = propra
|
||||
|
||||
|
||||
|
||||
err_alloc = malsukcesis memorasignon
|
||||
err_args = ne povas analizi argumentojn de komanda linio
|
||||
err_autologin_session = aŭtomatan ensalutan seancon ne trovis
|
||||
@@ -73,6 +76,7 @@ restart = restartigi
|
||||
shell = ŝelo
|
||||
shutdown = malŝalti
|
||||
sleep = memordormi
|
||||
|
||||
wayland = wayland
|
||||
x11 = x11
|
||||
xinitrc = xinitrc
|
||||
|
||||
@@ -3,6 +3,9 @@ brightness_down = bajar brillo
|
||||
brightness_up = subir brillo
|
||||
capslock = Bloq Mayús
|
||||
|
||||
|
||||
|
||||
|
||||
err_alloc = asignación de memoria fallida
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@ brightness_down = diminuer la luminosité
|
||||
brightness_up = augmenter la luminosité
|
||||
capslock = verr.maj
|
||||
custom = customisé
|
||||
|
||||
|
||||
|
||||
err_alloc = échec d'allocation mémoire
|
||||
err_args = échec de l'analyse des arguments en lignes de commande
|
||||
err_autologin_session = session de connexion automatique introuvable
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
capslock = capslock
|
||||
|
||||
|
||||
|
||||
|
||||
err_alloc = impossibile allocare memoria
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@ brightness_down = 明るさを下げる
|
||||
brightness_up = 明るさを上げる
|
||||
capslock = CapsLock
|
||||
|
||||
|
||||
|
||||
|
||||
err_alloc = メモリ割り当て失敗
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@ brightness_down = ronahiyê kêm bike
|
||||
brightness_up = ronahiyê bilind bike
|
||||
capslock = tîpên girdek (capslock)
|
||||
custom = kesane
|
||||
|
||||
|
||||
|
||||
err_alloc = veqetandina bîrê têk çû
|
||||
err_args = argumanên rêzika fermanê nehatin analîzkirin
|
||||
err_autologin_session = danişîna têketina xweber nehate dîtin
|
||||
|
||||
@@ -3,6 +3,9 @@ brightness_down = samazināt spilgtumu
|
||||
brightness_up = palielināt spilgtumu
|
||||
capslock = caps lock
|
||||
custom = pielāgots
|
||||
|
||||
|
||||
|
||||
err_alloc = neizdevās atmiņas piešķiršana
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@ brightness_down = zmniejsz jasność
|
||||
brightness_up = zwiększ jasność
|
||||
capslock = capslock
|
||||
custom = własny
|
||||
|
||||
|
||||
|
||||
err_alloc = nieudana alokacja pamięci
|
||||
|
||||
err_autologin_session = nie znaleziono sesji autologowania
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
capslock = capslock
|
||||
|
||||
|
||||
|
||||
|
||||
err_alloc = erro na atribuição de memória
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
capslock = caixa alta
|
||||
|
||||
|
||||
|
||||
|
||||
err_alloc = alocação de memória malsucedida
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@ capslock = capslock
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@ brightness_down = уменьшить яркость
|
||||
brightness_up = увеличить яркость
|
||||
capslock = capslock
|
||||
custom = пользовательский
|
||||
|
||||
|
||||
|
||||
err_alloc = не удалось выделить память
|
||||
|
||||
err_autologin_session = не найдена сессия с автологином
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
capslock = capslock
|
||||
|
||||
|
||||
|
||||
|
||||
err_alloc = neuspijesna alokacija memorije
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@ brightness_down = minska ljusstyrka
|
||||
brightness_up = öka ljusstyrka
|
||||
capslock = capslock
|
||||
custom = anpassad
|
||||
|
||||
|
||||
|
||||
err_alloc = minnesallokering misslyckades
|
||||
err_args = tolkning av kommandoargument misslyckades
|
||||
err_autologin_session = autologin-session hittades inte
|
||||
|
||||
@@ -3,6 +3,9 @@ brightness_down = parlakligi azalt
|
||||
brightness_up = parlakligi arttir
|
||||
capslock = capslock
|
||||
|
||||
|
||||
|
||||
|
||||
err_alloc = basarisiz bellek ayirma
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
capslock = capslock
|
||||
|
||||
|
||||
|
||||
|
||||
err_alloc = невдале виділення пам'яті
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
capslock = 大写锁定
|
||||
|
||||
|
||||
|
||||
|
||||
err_alloc = 内存分配失败
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user