Skip to content

Instantly share code, notes, and snippets.

@Zedai00
Zedai00 / BingWallpapers.sh
Created May 25, 2024 17:09
Bing Daily Wallpapers Using swaybg For Hyprland Linux
#!/bin/sh
swaybg -i ~/.wallpapers/ArchLinuxNord.png &
# replace sed first argument for your own resolution i.e 1366x768 to widthxHeigt of your device
urlpath=$( \
curl "https://www.bing.com/HPImageArchive.aspx?format=rss&idx=0&n=1&mkt=en-US" \
| xmllint --xpath "/rss/channel/item/link/text()" - \
| sed 's/1366x768/1920x1080/g' \
)
curl "https://www.bing.com$urlpath" -o ~/.wallpapers/wall.jpg
killall swaybg
@Zedai00
Zedai00 / RedditWallpapers.sh
Last active May 25, 2024 17:05
Random Wallpaper From Reddit Wallpapers Subreddits In Fish Shell and Swaybg
#!/usr/bin/fish
# Kill swaybg if active
if pgrep swaybg > /dev/null
killall swaybg
end
# remove the file else wget gives warning
rm wall
# get json of the subreddit
# use jq to get the list of urls
# egrep to only select jpeg|jpg files
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Game game = new Game();
game.playGame();
sc.close();
}
@Zedai00
Zedai00 / Powerlevel10k-And-Tide-Nerd-Font-Termux.sh
Created February 20, 2022 10:27
Powerlevel10k and Tide Meslo Nerd Font install in Termux
curl -fsSL -o ~/.termux/font.ttf https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
termux-reload-settings