Skip to content

Commit

Permalink
Updated write-applet.xml - New example (Cin from 4.6 to 5.8+
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiux committed Jul 31, 2023
1 parent a3aef2b commit 690a9b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/reference/cinnamon-tutorials/write-applet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@
/**
* Variables (and other constants)
*/
var user = GLib.getenv("USER"); // acts like the shell command: echo -n $USER

user = user.charAt(0).toUpperCase() + user.slice(1); // Capitalize 'user'
var user = GLib.get_user_name();
// String.capitalize() is a function implemented by Cinnamon.
user = user.capitalize(); // Turns the first character into uppercase.

/**
* Declaration of the 'NotifyMe' class, which extends
Expand Down

0 comments on commit 690a9b9

Please sign in to comment.