Skip to content

Commit

Permalink
HotCorners: Fix custom action if there's only one
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 committed Jan 8, 2025
1 parent 0d8893a commit 279c82a
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 (":");
if (details[0] == hot_corner_position) {
command = details[1];
}
}

Expand Down

0 comments on commit 279c82a

Please sign in to comment.