News for hackers. Stuff that matters.
Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by sandreas on Saturday June 22, 2024 @01:48AM (#40756624)
Here are some things I found helpful using Windows at work (at home I use Fedora):

Debloat / Software Management: https://github.com/ChrisTitusTech/winutil

Command line software management (Scoop): https://pilabor.com/blog/2021/12/automate-windows-app-setup-...

Comparison (Scoop/Chocolatey/Win-Get): https://daftdev.blog/2024/04/01/chocolatey-vs-scoop-vs-winge...

I would also recommend starship (https://starship.rs/) for your Powershell, which is cross platform and therefore usable for all popular shells. Scoop can also install and manage nerd fonts:

    scoop bucket add nerd-fonts
    scoop install nerd-fonts/JetBrains-Mono
Here is my starship.toml config:

    format="$all\u001b7${fill}$cmd_duration | $time\u001b8"
    
    [fill]
    symbol = " " 
    
    # right_format = """$cmd_duration$time"""
    
    [username]
    show_always = true
    format = '[$user[@](red)]($style)'
    
    [hostname]
    ssh_only = false
    format = "[$ssh_symbol$hostname]($style): "
    
    [time]
    disabled = false
    format = '[$time]($style)'
    
    [character]
    success_symbol = '[>](bold green)' 
    
    [git_branch]
    format = "[$symbol$branch(:$remote_branch)]($style)"
    
    [cmd_duration]
    min_time = 0 
    format = '   [$duration]($style) '
    show_milliseconds = true
Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by namanyayg on Saturday June 22, 2024 @02:34AM (#40756885)
PS sucks so I've always installed git bash and used it instead since I first discovered it ~12y ago

Starship seems quite promising, this is the first time I'm seeing it. But I'm a bit confused on how it works, can you go into a bit more details?

Can I use starship+ps to get all Unix and git tools or should I stick with my existing workflow with windows git bash?

Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by blooalien on Saturday June 22, 2024 @02:47AM (#40756958)
Starship is just a fancy prompt that just happens to be crazy cross-platform (works on Linux, MacOS, and Windows shells), but it's super-informative, and easy to install/configure. Beyond that, you'll still need to choose a shell you prefer for when you want/need to use a terminal/console window for things. Contrary to popular belief, the shell is not obsolete by a longshot, even on Windows. On Windows, PowerShell is probably gonna be your best bet, as it's the current standard going forward. I use Starship on Fish shell on Linux and love it.
Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by d_tr on Saturday June 22, 2024 @04:04AM (#40757299)
Have you tried MSYS2? It even uses pacman for package management!
Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by sandreas on Saturday June 22, 2024 @05:30AM (#40757646)
Besides git bash you could also use wsl, like in:

  wsl ls -lsa
  wsl cat file.txt

Basically, starship is a config generator for your shell. It transforms a cross platform config file (starship.toml) into a platform specific configuration shell script, e.g.:

  starship init zsh
will output something like

  zmodload zsh/parameter  # Needed to access jobstates variable for STARSHIP_JOBS_COUNT

  # Defines a function `__starship_get_time` that sets the time since epoch in millis in STARSHIP_CAPTURED_TIME.
  if [[ $ZSH_VERSION == ([1-4]*) ]]; then
    # ZSH <= 5; Does not have a built-in variable so we will rely on Starship's inbuilt time function.
    __starship_get_time() {
        STARSHIP_CAPTURED_TIME=$(/home/andreas/bin/starship time)
    }
  else
    zmodload zsh/datetime
    zmodload zsh/mathfunc
    __starship_get_time() {
        (( STARSHIP_CAPTURED_TIME = int(rint(EPOCHREALTIME * 1000)) ))
    }
  fi
  # ...
  # ...
For PowerShell the output will look accordingly - the config stays the same. I've had a bunch of custom zsh / powershell config dotfiles for years now, starship just eases it out :-)
Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by red-iron-pine on Saturday June 22, 2024 @08:36AM (#40758682)
powershell is light years easier than bash. like, im fluent in bash enough to get stuff done, but i only got there over years, while i picked up powershell fairly quickly. also wayyyyy more readable.

i'll admit the object vs text thing is annoying, i feel like bash is more straightforward there, but PS will let you do the same thing eventually.

Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by nativeit on Saturday June 22, 2024 @12:49PM (#40760355)
My experience is almost exactly inverted. WTF is Invoke? Am I a sorcerer? I want to call a function, I think…
Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by sandreas on Saturday June 22, 2024 @01:38PM (#40760698)
I would have thought Microsoft on is dotnet multi-platform journey would find a way to make PowerShell just POSIX compatible, supporting at least standard all day commands like `grep`, `wc`, `find` and others. All it would have taken is to create aliases or replacements for the top 50 shell commands.

Instead they re-invented the wheel. It's not a bad wheel, but the wheel is completely different than most people would expected to be and for POSIX enthusiast it just does not feel right.

With wsl or git bash you can do this but it feels slow and clunky most of the time.

Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by lofaszvanitt on Saturday June 22, 2024 @02:08AM (#40756731)
Why do you even need those? Software and hardware should be under the human, helping, not hindering.
Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by sandreas on Saturday June 22, 2024 @05:21AM (#40757607)
Absolutely. In my company I'm forced to use Windows, because we develop Windows software (WPF). I'm not totally happy with Windows (especially 11), but I tend to look for jobs that have nothing to do with what I'm too familiar with to gain new knowledge. However, I'm trying to make the windows experience as good as possible for my personal taste :-) Additionally I hope I can help to migrate to a web based solution in the future.
Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by nurettin on Sunday June 23, 2024 @05:32AM (#40766032)
At work if we have to code on windows, I always ask for a remote development environment. I use arch, btw.
Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by charles_f on Saturday June 22, 2024 @11:28AM (#40759744)
Yes!

I'm also running a number of additional software on mac to make the experience more liveable (Alfred, scroll inverter, ice, rectangle, iterm,...). I think the big companies got to the point where they do the bare minimum for Gene Public to accept the useability, and leave the rest of us with our ### dangling to fill in the gap.

Probably something to do with maximizing profit and minimizing expense?

Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by alsetmusic on Tuesday June 25, 2024 @06:07PM (#40794226)
> scroll inverter

You can invert “natural scrolling” in the OS (System Preferences / System Settings).

Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by charles_f on Wednesday June 26, 2024 @12:46PM (#40801915)
I want to use natural scrolling on the trackpad and the normal mouse wheel direction. There's no way to do that out of the box, you need scroll reverser.
Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by Admiral_AWS on Saturday June 22, 2024 @06:39AM (#40757926)
Better yet - just switch to Linux Mint.
Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by sandreas on Saturday June 22, 2024 @06:57AM (#40758014)
As already stated: At home I use Fedora (and others). Company restricts me to use Windows - well technically, the project does, but company IT would not be happy, if I'd use Linux there.

And no, this is not a reason to leave an otherwise perfectly fine job behind.

Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by red-iron-pine on Saturday June 22, 2024 @08:33AM (#40758661)
same boat, fedora at home, windows at work. and that's fine -- keeps me plugged into the windows infra that runs the world to some degree.

older jobs let us put whatever on the laptops, and even had hardening scripts if we wanted to use linux. only approved linux was ubuntu, but you could slap mint or other derivatives in there and get away with it / not have concerns.

Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by shrimp_emoji on Saturday June 22, 2024 @02:00PM (#40760847)
Manjaro with KDE is much better.

Or Fedora with KDE.

Re:My Windows Computer Just Doesn't Feel Like Mine Anymore by rldjbpin on Sunday June 23, 2024 @05:00AM (#40765855)
the first tool does work for removing web results, but not so much for the "recommended" section. it can stay empty though.

also, while the tool is nice, it needs admin permissions to work.