Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
don't trim non-existent bindm
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAShelf committed Oct 20, 2022
1 parent acaf43f commit 09b1113
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions hyprkeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ func readHyprlandConfig() ([]string, []string, []string, map[string]string) {
kbKeybinds = append(kbKeybinds, line)
} else if strings.HasPrefix(line, "bindm=") {
mKeybinds = append(mKeybinds, line)
}

if strings.HasPrefix(line, "$") {
} else if strings.HasPrefix(line, "$") {
// Probably not the best way to do this, but can't think of another occasion where a line would start with "$"
// and include "=", yet still not be a variable
if strings.Contains(line, "=") {
Expand Down Expand Up @@ -82,7 +80,6 @@ func keybindsToMarkdown(kbKeybinds, mKeybinds []string) []string {
var markdown []string
for _, keybind := range kbKeybinds {
keybind = strings.TrimPrefix(keybind, "bind=")
keybind = strings.TrimPrefix(keybind, "bindm=")

// Split "keybind" into a slice of strings
// based on the comma delimiter
Expand Down

0 comments on commit 09b1113

Please sign in to comment.