Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal Output #30

Closed
smhmd opened this issue Apr 7, 2020 · 7 comments
Closed

Minimal Output #30

smhmd opened this issue Apr 7, 2020 · 7 comments
Assignees
Labels
feature New feature or request

Comments

@smhmd
Copy link
Contributor

smhmd commented Apr 7, 2020

Is your feature request related to a problem? Please describe.
I use /etc/hosts to block websites during work and it exceeds 20,000 lines. When listing profiles, it all gets outputted.

Describe the solution you'd like
I would love there to be a minified output flag (through persistent configuration? hostctl config minimal)

Describe alternatives you've considered
outputting to /dev/null, but I want to see enabled/disabled profiles.

@smhmd smhmd added the feature New feature or request label Apr 7, 2020
@guumaster
Copy link
Owner

We can add a -q to silence output.

Also I'm thinking about a config file so users can tweat default behavior

@smhmd
Copy link
Contributor Author

smhmd commented Apr 7, 2020

Great. I also think a command for on/off profiles could be useful.

$ hostctl list -m
awesome on
meh off
splendid on

This is much easily scripted as I want to make a dmenu script for turning profiles on and off.

@smhmd
Copy link
Contributor Author

smhmd commented Apr 7, 2020

effectively, hostctl list --raw -c profile,status | uniq.

@smhmd
Copy link
Contributor Author

smhmd commented Apr 7, 2020

just an idea, not really a feature request:
How about hostctl toggle along side enable and disable?

@guumaster
Copy link
Owner

guumaster commented Apr 7, 2020

hostctl list -m

What would be the meaning of -m? menu? not sure I get it.

The toggle idea could be useful. Or even some kind of "only" to turn all off and switch to one specific profile.

@smhmd
Copy link
Contributor Author

smhmd commented Apr 8, 2020

the -m is for minimal.

Or even some kind of "only" to turn all off and switch to one specific profile.

I agree. Different modes for enabling/disabling can be very handy.

I suggested toggle just to ease with the cognitive load and make use of commands from history.

Another mere suggestion and not a feature request is having hostctl list --on/hostctl list --off to list only on or off profiles.

@guumaster
Copy link
Owner

This issue ended up on this features:

  • hostctl list enabled to show only enabled profiles. (also works with alias on)
  • hostctl list disabled to show only disabled profiles. (also works with alias off)
  • hostctl status to show only one profile name per line and its status

Thanks for your contribution @smhmd!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants