run0: Give --empower its own color, title and emoji
When in --empower mode, all created files will be owned by the current user, which could be problematic when creating files outside of the current user's home directory, as other processes running as the same user would be able to edit those files. While this is a bit of an edge case since users already have to go through the effort of writing --empower to indicate they want a privileged session as the current user, it's not unphatomable to think they could start an empowered session which they later return to and continue using. Currently, it's not easy to differentiate a regular run0 session and an empowered session at a glance, so users might think they're using a regular run0 session when they're actually using an empowered session. To address this problem, let's give empowered session their own identify, by making the background orange, using the pumpkin emoji as the shell prompt prefix and giving them an orange circle as the PTY title.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
784f5a52f8
commit
c36942916b
@@ -82,10 +82,12 @@ const char* glyph_full(Glyph code, bool force_utf) {
|
||||
[GLYPH_COMPUTER_DISK] = "o",
|
||||
[GLYPH_WORLD] = "W",
|
||||
[GLYPH_RED_CIRCLE] = "o",
|
||||
[GLYPH_ORANGE_CIRCLE] = "o",
|
||||
[GLYPH_YELLOW_CIRCLE] = "o",
|
||||
[GLYPH_BLUE_CIRCLE] = "o",
|
||||
[GLYPH_GREEN_CIRCLE] = "o",
|
||||
[GLYPH_SUPERHERO] = "S",
|
||||
[GLYPH_PUMPKIN] = "P",
|
||||
[GLYPH_IDCARD] = "@",
|
||||
[GLYPH_HOME] = "^",
|
||||
[GLYPH_ROCKET] = "^",
|
||||
@@ -162,10 +164,12 @@ const char* glyph_full(Glyph code, bool force_utf) {
|
||||
[GLYPH_COMPUTER_DISK] = UTF8("💽"),
|
||||
[GLYPH_WORLD] = UTF8("🌍"),
|
||||
[GLYPH_RED_CIRCLE] = UTF8("🔴"),
|
||||
[GLYPH_ORANGE_CIRCLE] = UTF8("🟠"),
|
||||
[GLYPH_YELLOW_CIRCLE] = UTF8("🟡"),
|
||||
[GLYPH_BLUE_CIRCLE] = UTF8("🔵"),
|
||||
[GLYPH_GREEN_CIRCLE] = UTF8("🟢"),
|
||||
[GLYPH_SUPERHERO] = UTF8("🦸"),
|
||||
[GLYPH_PUMPKIN] = UTF8("🎃"),
|
||||
[GLYPH_IDCARD] = UTF8("🪪"),
|
||||
[GLYPH_HOME] = UTF8("🏠"),
|
||||
[GLYPH_ROCKET] = UTF8("🚀"),
|
||||
|
||||
@@ -50,10 +50,12 @@ typedef enum Glyph {
|
||||
GLYPH_COMPUTER_DISK,
|
||||
GLYPH_WORLD,
|
||||
GLYPH_RED_CIRCLE,
|
||||
GLYPH_ORANGE_CIRCLE,
|
||||
GLYPH_YELLOW_CIRCLE,
|
||||
GLYPH_BLUE_CIRCLE,
|
||||
GLYPH_GREEN_CIRCLE,
|
||||
GLYPH_SUPERHERO,
|
||||
GLYPH_PUMPKIN,
|
||||
GLYPH_IDCARD,
|
||||
GLYPH_HOME,
|
||||
GLYPH_ROCKET,
|
||||
|
||||
Reference in New Issue
Block a user