{"action":"created","issue":{"url":"https://api.github.com/repos/dylanaraps/neofetch/issues/416","repository_url":"https://api.github.com/repos/dylanaraps/neofetch","labels_url":"https://api.github.com/repos/dylanaraps/neofetch/issues/416/labels{/name}","comments_url":"https://api.github.com/repos/dylanaraps/neofetch/issues/416/comments","events_url":"https://api.github.com/repos/dylanaraps/neofetch/issues/416/events","html_url":"https://github.com/dylanaraps/neofetch/issues/416","id":187242912,"number":416,"title":"Idea: Remove info() in favor of prin()","user":{"login":"dylanaraps","id":6799467,"avatar_url":"https://avatars.githubusercontent.com/u/6799467?v=3","gravatar_id":"","url":"https://api.github.com/users/dylanaraps","html_url":"https://github.com/dylanaraps","followers_url":"https://api.github.com/users/dylanaraps/followers","following_url":"https://api.github.com/users/dylanaraps/following{/other_user}","gists_url":"https://api.github.com/users/dylanaraps/gists{/gist_id}","starred_url":"https://api.github.com/users/dylanaraps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylanaraps/subscriptions","organizations_url":"https://api.github.com/users/dylanaraps/orgs","repos_url":"https://api.github.com/users/dylanaraps/repos","events_url":"https://api.github.com/users/dylanaraps/events{/privacy}","received_events_url":"https://api.github.com/users/dylanaraps/received_events","type":"User","site_admin":false},"labels":[{"id":327983461,"url":"https://api.github.com/repos/dylanaraps/neofetch/labels/Discussion","name":"Discussion","color":"fad8c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-04T02:58:09Z","updated_at":"2016-11-04T05:00:56Z","closed_at":null,"body":"I had the idea of removing the `info()` function entirely and instead utilizing the `prin()` function. This would simplify the `printinfo()` function in the config file and also remove the `eval` command we call every time we run `info`. \r\n\r\nIt would work by adding a new line to the bottom of every info function.\r\n\r\n```sh\r\n# $1 will be the subtitle from the user config\r\n# If $1 is empty we can fallback to the default title.\r\nprin \"${1:-Memory}\" \"$memory\"\r\n```\r\n\r\nThe `printinfo()` function would then look like this:\r\n\r\n```sh\r\n# First column is function name.\r\n# Second column is the subtitle.\r\n# If the second column is empty we can use a default title as seen above.\r\nprintinfo() {\r\n    gettitle\r\n    getunderline\r\n    getmodel  \"Model\"\r\n    getdistro \"OS\"\r\n    getkernel \"Kernel\"\r\n    # ...\r\n}\r\n```\r\n\r\nI also had another idea, we could remove the `get` from the function names entirely, it would then look like this:\r\n\r\n```sh\r\nprintinfo() {\r\n    title\r\n    underline\r\n    model  \"Model\"\r\n    distro \"OS\"\r\n    kernel \"Kernel\"\r\n    # ...\r\n}\r\n```\r\n\r\nI think that this looks a lot cleaner and will make it easier for users to modify.\r\n\r\nTL;DR\r\n\r\n- Remove `info()`\r\n- Add a new line to every info function to call `prin()`\r\n- Remove `get` from all function names\r\n\r\nLet me know what you guys think about this!\r\n"},"comment":{"url":"https://api.github.com/repos/dylanaraps/neofetch/issues/comments/258345429","html_url":"https://github.com/dylanaraps/neofetch/issues/416#issuecomment-258345429","issue_url":"https://api.github.com/repos/dylanaraps/neofetch/issues/416","id":258345429,"user":{"login":"dylanaraps","id":6799467,"avatar_url":"https://avatars.githubusercontent.com/u/6799467?v=3","gravatar_id":"","url":"https://api.github.com/users/dylanaraps","html_url":"https://github.com/dylanaraps","followers_url":"https://api.github.com/users/dylanaraps/followers","following_url":"https://api.github.com/users/dylanaraps/following{/other_user}","gists_url":"https://api.github.com/users/dylanaraps/gists{/gist_id}","starred_url":"https://api.github.com/users/dylanaraps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylanaraps/subscriptions","organizations_url":"https://api.github.com/users/dylanaraps/orgs","repos_url":"https://api.github.com/users/dylanaraps/repos","events_url":"https://api.github.com/users/dylanaraps/events{/privacy}","received_events_url":"https://api.github.com/users/dylanaraps/received_events","type":"User","site_admin":false},"created_at":"2016-11-04T05:00:56Z","updated_at":"2016-11-04T05:00:56Z","body":"See #417 "}}
{"actor":{"display_login":"dylanaraps"}}