20
20
showDistribution bool
21
21
showDocker bool
22
22
showEmby bool
23
+ showGPU bool
23
24
showJellyfin bool
24
25
showKernel bool
25
26
showLastLogin bool
@@ -60,6 +61,7 @@ last login, user sessions, process information, and system update status based o
60
61
showDistribution = true
61
62
showDocker = true
62
63
showEmby = true
64
+ showGPU = true
63
65
showJellyfin = true
64
66
showKernel = true
65
67
showLastLogin = true
@@ -79,7 +81,7 @@ last login, user sessions, process information, and system update status based o
79
81
80
82
// Check if at least one flag is enabled
81
83
if ! showAptStatus && ! showCPU && ! showCpuAverages && ! showDisk && ! showDistribution &&
82
- ! showDocker && ! showEmby && ! showJellyfin && ! showKernel && ! showLastLogin &&
84
+ ! showDocker && ! showEmby && ! showGPU && ! showJellyfin && ! showKernel && ! showLastLogin &&
83
85
! showMemory && ! showNzbget && ! showPlex && ! showProcesses && ! showQbittorrent &&
84
86
! showQueues && ! showRebootRequired && ! showRtorrent && ! showSabnzbd && ! showSessions &&
85
87
! showTraefik && ! showUptime {
@@ -93,6 +95,7 @@ last login, user sessions, process information, and system update status based o
93
95
fmt .Println (" --distro Show distribution information" )
94
96
fmt .Println (" --docker Show Docker container information" )
95
97
fmt .Println (" --emby Show Emby streaming information" )
98
+ fmt .Println (" --gpu Show GPU information" )
96
99
fmt .Println (" --jellyfin Show Jellyfin streaming information" )
97
100
fmt .Println (" --kernel Show kernel information" )
98
101
fmt .Println (" --login Show last login information" )
@@ -199,22 +202,23 @@ func displayMotd() {
199
202
{Key : "Load Averages:" , Provider : motd .GetCpuAveragesWithContext , Timeout : 1 * time .Second , Order : 4 },
200
203
{Key : "Processes:" , Provider : motd .GetProcessCountWithContext , Timeout : 2 * time .Second , Order : 5 },
201
204
{Key : "CPU:" , Provider : motd .GetCpuInfoWithContext , Timeout : 2 * time .Second , Order : 6 },
202
- {Key : "Memory Usage:" , Provider : motd .GetMemoryInfoWithContext , Timeout : 2 * time .Second , Order : 7 },
203
- {Key : "Package Status:" , Provider : motd .GetAptStatusWithContext , Timeout : 5 * time .Second , Order : 8 },
204
- {Key : "Reboot Status:" , Provider : motd .GetRebootRequiredWithContext , Timeout : 2 * time .Second , Order : 9 },
205
- {Key : "User Sessions:" , Provider : motd .GetUserSessionsWithContext , Timeout : 1 * time .Second , Order : 10 },
206
- {Key : "Last login:" , Provider : motd .GetLastLoginWithContext , Timeout : 3 * time .Second , Order : 11 },
207
- {Key : "Disk Usage:" , Provider : motd .GetDiskInfoWithContext , Timeout : 3 * time .Second , Order : 12 },
208
- {Key : "Docker:" , Provider : motd .GetDockerInfoWithContext , Timeout : 5 * time .Second , Order : 13 },
209
- {Key : "Traefik:" , Provider : motd .GetTraefikInfoWithContext , Timeout : 10 * time .Second , Order : 14 },
210
- {Key : "Download Queues:" , Provider : motd .GetQueueInfoWithContext , Timeout : 10 * time .Second , Order : 15 },
211
- {Key : "SABnzbd:" , Provider : motd .GetSabnzbdInfoWithContext , Timeout : 10 * time .Second , Order : 16 },
212
- {Key : "NZBGet:" , Provider : motd .GetNzbgetInfoWithContext , Timeout : 10 * time .Second , Order : 17 },
213
- {Key : "qBittorrent:" , Provider : motd .GetQbittorrentInfoWithContext , Timeout : 10 * time .Second , Order : 18 },
214
- {Key : "rTorrent:" , Provider : motd .GetRtorrentInfoWithContext , Timeout : 10 * time .Second , Order : 19 },
215
- {Key : "Plex:" , Provider : motd .GetPlexInfoWithContext , Timeout : 10 * time .Second , Order : 20 },
216
- {Key : "Emby:" , Provider : motd .GetEmbyInfoWithContext , Timeout : 10 * time .Second , Order : 21 },
217
- {Key : "Jellyfin:" , Provider : motd .GetJellyfinInfoWithContext , Timeout : 10 * time .Second , Order : 22 },
205
+ {Key : "GPU:" , Provider : motd .GetGpuInfoWithContext , Timeout : 3 * time .Second , Order : 7 },
206
+ {Key : "Memory Usage:" , Provider : motd .GetMemoryInfoWithContext , Timeout : 2 * time .Second , Order : 8 },
207
+ {Key : "Package Status:" , Provider : motd .GetAptStatusWithContext , Timeout : 5 * time .Second , Order : 9 },
208
+ {Key : "Reboot Status:" , Provider : motd .GetRebootRequiredWithContext , Timeout : 2 * time .Second , Order : 10 },
209
+ {Key : "User Sessions:" , Provider : motd .GetUserSessionsWithContext , Timeout : 1 * time .Second , Order : 11 },
210
+ {Key : "Last login:" , Provider : motd .GetLastLoginWithContext , Timeout : 3 * time .Second , Order : 12 },
211
+ {Key : "Disk Usage:" , Provider : motd .GetDiskInfoWithContext , Timeout : 3 * time .Second , Order : 13 },
212
+ {Key : "Docker:" , Provider : motd .GetDockerInfoWithContext , Timeout : 5 * time .Second , Order : 14 },
213
+ {Key : "Traefik:" , Provider : motd .GetTraefikInfoWithContext , Timeout : 10 * time .Second , Order : 15 },
214
+ {Key : "Download Queues:" , Provider : motd .GetQueueInfoWithContext , Timeout : 10 * time .Second , Order : 16 },
215
+ {Key : "SABnzbd:" , Provider : motd .GetSabnzbdInfoWithContext , Timeout : 10 * time .Second , Order : 17 },
216
+ {Key : "NZBGet:" , Provider : motd .GetNzbgetInfoWithContext , Timeout : 10 * time .Second , Order : 18 },
217
+ {Key : "qBittorrent:" , Provider : motd .GetQbittorrentInfoWithContext , Timeout : 10 * time .Second , Order : 19 },
218
+ {Key : "rTorrent:" , Provider : motd .GetRtorrentInfoWithContext , Timeout : 10 * time .Second , Order : 20 },
219
+ {Key : "Plex:" , Provider : motd .GetPlexInfoWithContext , Timeout : 10 * time .Second , Order : 21 },
220
+ {Key : "Emby:" , Provider : motd .GetEmbyInfoWithContext , Timeout : 10 * time .Second , Order : 22 },
221
+ {Key : "Jellyfin:" , Provider : motd .GetJellyfinInfoWithContext , Timeout : 10 * time .Second , Order : 23 },
218
222
}
219
223
220
224
// Filter sources based on enabled flags
@@ -226,6 +230,7 @@ func displayMotd() {
226
230
"Load Averages:" : showCpuAverages ,
227
231
"Processes:" : showProcesses ,
228
232
"CPU:" : showCPU ,
233
+ "GPU:" : showGPU ,
229
234
"Memory Usage:" : showMemory ,
230
235
"Package Status:" : showAptStatus ,
231
236
"Reboot Status:" : showRebootRequired ,
@@ -310,6 +315,7 @@ func init() {
310
315
motdCmd .Flags ().BoolVar (& showDistribution , "distro" , false , "Show distribution information" )
311
316
motdCmd .Flags ().BoolVar (& showDocker , "docker" , false , "Show Docker container information" )
312
317
motdCmd .Flags ().BoolVar (& showEmby , "emby" , false , "Show Emby streaming information" )
318
+ motdCmd .Flags ().BoolVar (& showGPU , "gpu" , false , "Show GPU information" )
313
319
motdCmd .Flags ().BoolVar (& showJellyfin , "jellyfin" , false , "Show Jellyfin streaming information" )
314
320
motdCmd .Flags ().BoolVar (& showKernel , "kernel" , false , "Show kernel information" )
315
321
motdCmd .Flags ().BoolVar (& showLastLogin , "login" , false , "Show last login information" )
0 commit comments