Skip to content

Commit

Permalink
HotCorners: Fix custom action if there's only one (#2220)
Browse files Browse the repository at this point in the history
Co-authored-by: Leo <[email protected]>
  • Loading branch information
leolost2605 and lenemter authored Jan 12, 2025
1 parent d5cb0b4 commit 56d8caf
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/HotCorners/HotCornerManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,16 @@ public class Gala.HotCornerManager : Object {
private void run_custom_action (string hot_corner_position) {
string command = "";
var line = behavior_settings.get_string ("hotcorner-custom-command");
if (line == "")
if (line == "") {
return;
}

var parts = line.split (";;");
// keep compatibility to old version where only one command was possible
if (parts.length == 1) {
command = line;
} else {
// find specific actions
foreach (unowned var part in parts) {
var details = part.split (":");
if (details[0] == hot_corner_position) {
command = details[1];
}
// find specific actions
foreach (unowned var part in parts) {
var details = part.split (":", 2);
if (details[0] == hot_corner_position) {
command = details[1];
}
}

Expand Down

0 comments on commit 56d8caf

Please sign in to comment.