Possible Switch to Mac
Table of Contents
Events summary
As a long time average windows user I made a switch to linux back in late 2020-21, dual booting from an old laptop HDD. While I already prior experience with the linux cli from having vps’s to hosts sites and game servers for friends, making the switch made me feel more comfortable with it and I started using it a lot more. I started editing it with zsh and setting up neovim and tmux, and later would use it to check news using a tool like newsboat, listening to music using spotify-tui or even just watching anime using a tool like ani-cli. It of couse wasn’t perfect, with issues like screentearing or other misc. issues popping up that would require time looking through wikis and forums to fix.
Eventually I would make my way back to Windows to play games with friends as the screentearing issues while gaming where annoying and some, such as valorant, simply wouldn’t run on linux. I would stay but would always get the feeling of going back to linux but wouldn’t want to deal with the issues that would come with it, I would try wsl and that would have it’s own problems, such as some network related tools not working when connected to a vpn or just not working regardless. I would try mobaXterm and MSYS2, but would still deal with similar and new issues, Which brings us to now.
The consideraton for mac
So the consideration comes from the want of unix commands, without the tinkering and constant fixing of using linux as my main OS or using scuffed ways of doing so on windows as well as it being windows. MacOS just kinda seems to solve those problems for me but of course with its own problems.
The problems I’d face:
- No good free sharex alternative to upload to my sharex server instance.
- I have an older model of macbook pro, so only 2 usb-c ports.
- other small misc things:
- software installation
- window management
Solutions and Workarounds
Sharex alternative for mac
Unless my time spent trying to find a good free app to replace the custom uploader functionality of sharex on windows was spent in the wrong places, I couldn’t find one. There is flameshot which is an amazing screenshot tool that lets you edit and upload screenshots to imgur, which if you don’t want to host your own image hoster, is a really good free alternative. But due to me not wanting to give up my hoster while on on mac, gotta take matters into my own hands.
Using automator and bash scripts to utilize the built in screencapture
command to take screenshots and using curl
to send a post request to the custom image hoster domain with the proper autorization.
Firstly using a sharex server as the hoster, and taking the sharex config from my windows machine to turn it into a curl command gets this:
#!/bin/bash
curl -X POST \
https://upload-site\
-H 'Authorization: TOKEN' \
-H 'X-Ass-OG-Author: AUTHOR-NAME' \
-H 'X-Ass-Access: random' \
-H 'X-Ass-OG-Color: &random' \
-H 'X-Ass-OG-Provider: &filename | &size' \
-H 'Content-Type: multipart/form-data' \
-F "file=@$screenshot_file" \
-F 'URL={json:.resource}' \
-F 'ThumbnailURL={json:.thumbnail}' \
-F 'DeletionURL={json:.delete}' \
This will be used to make the request to the domain of the hoster to upload an image, Next to add the screencapture
command to take the screenshot to be uploaded and save it to a temp file.
#!/bin/bash
# Take a screenshot and save it to a temporary file
screenshot_file=$(mktemp).png
screencapture -i "$screenshot_file"
Afterwards, I set it up to take the URL
from the {json:.resource}
using jq
and piping the curl command into it and then removing the temporary screenshot file and copying the url to the clipboard.
#!/bin/bash
# Take a screenshot and save it to a temporary file
screenshot_file=$(mktemp).png
screencapture -i "$screenshot_file"
# Upload the image and copy the URL to the clipboard
upload_url=$(curl -X POST \
https://upload-site\
-H 'Authorization: TOKEN' \
-H 'X-Ass-OG-Author: AUTHOR-NAME' \
-H 'X-Ass-Access: random' \
-H 'X-Ass-OG-Color: &random' \
-H 'X-Ass-OG-Provider: &filename | &size' \
-H 'Content-Type: multipart/form-data' \
-F "file=@$screenshot_file" \
-F 'URL={json:.resource}' \
-F 'ThumbnailURL={json:.thumbnail}' \
-F 'DeletionURL={json:.delete}' \
| /usr/local/bin/jq -r '.resource')
rm "$screenshot_file"
echo "$upload_url" | pbcopy
I might later work on adding the abliity to edit the screenshot by opening preview and using the edited file to be uploaded, this might require setting full paths for the screenshots to be placed until uploaded
Next opening automator and creating a Quick Action
, change the Workflow recieves current
dropdown to no input
. From the left side of the screen, search and drag in the Run Shell Script
action and paste in the script and save it. Then open settings and got to Keyboard
> Shortcuts
> Services
and under General
should the Workflow you made. Give it a keybind and should be able to start using it. And with that, a very simple screenshot tool to push to a custom uploader.
You might need to allow access to recording screens from any app you decide to screenshot
Older macbook pro
I have a 2017 13in MacBook Pro that I bought refurbished off backmarket for school and to get more experience with the OS. The problems faced include the 2 usb-c ports and any possible issues that may arise with the keyboard of this generation of macbooks.
The workaround to get this working with a dual monitor setup would be either use an adapter that includes an hdmi port and a hdmi splitter, or using a kvm switch to allow connecting and switching between mac and windows while still using the same external mouse and keyboard inputs.
Misc. Issues
Software Installation
Software installation can be kinda annoying due to the security aspect of apple, but sometimes programs need to be installed via a thrid party and constantly dealing with the pop up asking if you’re sure you want to open it contribute to that.
Alongside that, the installation of brew to use as the package manager is essentially a must.
/bin/bash -c \
"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Window Management
Defaul window management on mac really isn’t the best. And while there’s plenty of options to be able to better manage windows, I kept it simple by using Rectangle, it’s an increbile open source window management app to have better control over your windows.
brew install --cask rectangle
Closing
While I’ll consider the switch, even if or when I do go about it, I won’t completely abandon my windows pc for times I want to game or for certain software that may just not be availbe and have good alternatives to on mac. But since most of what I do is just having terminals and browser tabs open it might not be the worst idea to.