58 lines
2.6 KiB
Plaintext

{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://deadvey.com//socialweb/notes/77",
"type": "Note",
"hash": "77",
"content": "<b>Waybar theme switcher for home manager:</b><br/>I made this basic script for changing my home manager theme and mode settings:<br/><div class=\"indent code\">echo theme = $1<br/>echo mode = $2<br/>sed -i \"s/THEME\\ =\\ \".*\";/THEME\\ =\\ \\\"\\${1}\\\";/\" $HOME/.config/home-manager/home.nix<br/>sed -i \"s/MODE\\ =\\ \".*\";/MODE\\ =\\ \\\"\\${2}\\\";/\" $HOME/.config/home-manager/home.nix<br/>home-manager switch</div> which I can run like <div class=\"code\">./theme-switcher.sh gruvbox dark</div> then it writes the theme to my home manager configuration and reloads home manager. I can then have several waybar modules like such:<br/><div class=\"code indent\"><br/>\"custom/gruvbox\" = {<br/>&#9;on-click = \"$HOME/scripts/theme-switcher.sh gruvbox \\${MODE}\";<br/>&#9;format = \"\";<br/>};<br/></div><br/>Which I can easily click to change themes<br/>Pretty basic, but I thought I'd share, also it takes about 10 seconds to change theme so it's not quite instant gratification.<br/>Fly You High - DeaDvey<br/><img src=\"https://deadvey.com/images/rice.png\" />",
"url": "https://deadvey.com/blog/77.html",
"attributedTo": "https://deadvey.com/@blog",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [],
"published": "Sat, 14 Dec 2024 15:46:55",
"replies": {
"id": "https://deadvey.com/socialweb/replies/77",
"type": "Collection",
"first": {
"type": "CollectionPage",
"next": "https://deadvey.com/socialweb/replies/77?page=true",
"partOf": "https://deadvey.com/socialweb/replies/77",
"items": []
}
},
"tag": [
{
"Type": "Hashtag",
"Href": "https://deadvey.com/blog/ricing.html",
"Name": "#ricing"
},
{
"Type": "Hashtag",
"Href": "https://deadvey.com/blog/nixos.html",
"Name": "#nixos"
},
{
"Type": "Hashtag",
"Href": "https://deadvey.com/blog/theme changer.html",
"Name": "#theme changer"
},
{
"Type": "Hashtag",
"Href": "https://deadvey.com/blog/guide.html",
"Name": "#guide"
},
{
"Type": "Hashtag",
"Href": "https://deadvey.com/blog/bash scripting.html",
"Name": "#bash scripting"
},
{
"Type": "Hashtag",
"Href": "https://deadvey.com/blog/nix.html",
"Name": "#nix"
}
]
}