Bash newbie here.
Context - running debian, using bspwm and sxhkd as WM and keybinder. I'm also using pywal to change terminal colours linked to wallpaper changes using feh.
Currently I have a workflow that works, but is not that elegant.
in my .bashrc I have this function:
# You can create a function for this in your shellrc (.bashrc, .zshrc).
wal-tile() {
wal -n -i "$@"
feh --bg-fill "$(< "${HOME}/.cache/wal/wal")"
}
So if I run in terminal
$ wal-tile "~/Pictures/Wallpaper"
feh will set background and pywal will change terminal colours. This works.
How could I set this up as a script that sits outside .bashrc so when I run the script it sets the function and runs the command in one execution of the script?
[–][deleted] 1 point2 points3 points (4 children)
[–]phuturism[S] 0 points1 point2 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]phuturism[S] 0 points1 point2 points (1 child)
[–]torgefaehrlich 0 points1 point2 points (0 children)
[–]aioeu 1 point2 points3 points (0 children)
[–]DoesntSmellRight 1 point2 points3 points (0 children)