Browse Source

config: make %s in media hook full names, not letters, so it is self documenting

Benton Edmondson 1 year ago
parent
commit
5b84a58544
2 changed files with 5 additions and 5 deletions
  1. 1 1
      config/config.go
  2. 4 4
      ui/ui.go

+ 1 - 1
config/config.go

@@ -28,7 +28,7 @@ func Parse() (*Config, error) {
 		Timeout:   10,
 		Feeds:     feeds{},
 		Algos:     algos{},
-		MediaHook: []string{"xdg-open", "%u"},
+		MediaHook: []string{"xdg-open", "%url"},
 	}
 
 	location := location()

+ 4 - 4
ui/ui.go

@@ -491,14 +491,14 @@ func (s *State) openExternally(link string, mediaType *mime.MediaType) {
 			continue
 		}
 		switch field {
-		case "%u":
+		case "%url":
 			command[i] = link
 			foundPercentU = true
-		case "%m":
+		case "%mimetype":
 			command[i] = mediaType.Essence
-		case "%s":
+		case "%subtype":
 			command[i] = mediaType.Subtype
-		case "%t":
+		case "%supertype":
 			command[i] = mediaType.Supertype
 		}
 	}