Commit Graph

191 Commits

Author SHA1 Message Date
M.B. Christiansen e8f9deab43 Wrap usage to fit within 80 characters 2022-10-10 11:30:41 +02:00
M.B. Christiansen 866aafc8cd Move environment variable defaults to initial variable declaration
Reduce the verbose syntax and use bash idioms instead.
2022-10-10 11:10:06 +02:00
M.B. Christiansen e0a0e9ce1c Make script silent/quiet by default
It's common for unix tools to be quiet by default, and verbose by
toggle.
2022-10-10 11:00:19 +02:00
M.B. Christiansen 19fb4c78a1 Replace API_URL trace with logging.
Uncertain why this was being echoed. If the intention was to
trace it, this should be done using `set -x`. If the intention was
to inform the user, it should be properly logged.
2022-10-10 10:57:22 +02:00
M.B. Christiansen a293b54818 Use functions for logging
To prevent duplicate logic for formatting and writing out
log messages, a standardized function is made for logging messages
and logging errors.
2022-10-10 10:52:33 +02:00
M.B. Christiansen 51fb3ec6d4 Use album or artist picture when downloading 2022-10-10 10:42:14 +02:00
M.B. Christiansen 83ad18b0eb Retabularize script
The script had an ugly mix of spaces and tabs. Now it's only using
spaces.
2022-10-10 10:40:30 +02:00
Siddharth Dushantha c5d51654c0
Merge pull request #59 from Aeres-u99/api_endpoint_update
Fixed the Endpoint
2021-08-17 11:29:47 +02:00
Akuma 9d4ad785b2 Fixed the Endpoint 2021-08-17 13:51:10 +00:00
Siddharth Dushantha f1fbfbb709
Merge pull request #55 from keeganjk/patch-1
Fixed typo
2021-06-24 17:02:49 +02:00
keeganjk 50ed87e43d
Fixed typo
The file was displaying as ~/Music//.../artist/album ; removing this slash will have it display properly with only one / at the end of the directory name.
2021-02-21 20:53:19 -05:00
Siddharth Dushantha 2823cf1ea8
fixed spelling mistake, fixes #42 2020-08-21 19:21:02 +02:00
Siddharth Dushantha 74e05d28ad
version bump 1.3.1 --> 1.3.2 2020-08-02 21:02:21 +02:00
Siddharth Dushantha 1a48c25f4e
Merge pull request #41 from BachoSeven/master
Fixed problematic characters in mpc status output
2020-08-02 21:01:37 +02:00
Francesco Minnocci 1265c0145f Fixed problematic characters in mpc status output 2020-08-02 19:52:57 +02:00
Siddharth Dushantha ad7d7a592d version bump 1.3.0 --> 1.3.1 2020-06-15 21:43:11 +02:00
Siddharth Dushantha a28451f89f forcefully get album art from the internet...
...regardless if the current song has an album art or not
2020-06-15 21:22:16 +02:00
Siddharth Dushantha 7c62307ef5
Update README.md 2020-06-14 10:03:51 +02:00
Siddharth Dushantha dfff8d5ebc
changed jq code to work with updated Deezer api, fixes #36 2020-06-04 17:31:49 +02:00
Siddharth Dushantha 5b927d28a5
minor change 2020-04-09 13:36:18 +02:00
Siddharth Dushantha 425b00435b
added Buy Me A Coffee widget 2020-04-08 15:29:20 +02:00
Siddharth Dushantha 04fbf0d753
removed todo 2020-04-04 20:16:04 +02:00
Siddharth Dushantha b577b66ec2
fixed minor error 2020-03-28 19:51:16 +01:00
Siddharth Dushantha d257265a4c
version bump 1.2.7 --> 1.2.8 2020-03-28 19:39:10 +01:00
Siddharth Dushantha b068ea5d1c
fixed wrong dependency name
I accidentally checked if imagemagick instead of convert. 
imagemagick is the package, but convert is one of the commands.
2020-03-28 19:38:48 +01:00
Siddharth Dushantha caf457b74f version bump 2020-03-27 20:07:27 +01:00
Siddharth Dushantha 5c03e64913 added dependency checking 2020-03-27 20:06:54 +01:00
Siddharth Dushantha 03e3520311 Fixed the whole thing 2020-03-27 20:05:03 +01:00
Siddharth Dushantha 4dd9bb7650
added todo 2020-03-25 21:06:48 +01:00
Siddharth Dushantha 3a18fde47c
fixed typo 2020-03-25 20:34:35 +01:00
Siddharth Dushantha 51cd567d7f
tell users to save script to ~/.local/bin 2020-03-23 11:16:01 +01:00
Siddharth Dushantha 804a440fd9
version bump 1.2.5 --> 1.2.6 2020-03-20 16:11:09 +01:00
Siddharth Dushantha 01dbabf5a1
use -z to check if a string is empty or not
Previously I used:
    [[ $STRING == "" ]] && do_something
To check if a string was empty or not, but this can be simplified a lot by writing:
    [ -z $STRING ] && do_something
2020-03-20 16:10:40 +01:00
Siddharth Dushantha 791f26fe54
made many of the if statements into a oneliner
These if statements would check before echoing some info if the user had used the --silent flag. If they did, it would not echo anything. These if statements have now been made into a oneliner because it is easier to read, and the file size is smaller.
2020-03-20 16:02:28 +01:00
Siddharth Dushantha 03e858fafd
Merge pull request #34 from Seirdy/chore/formatting
Chore: format using `shfmt`
2020-03-06 16:33:13 +01:00
Rohan Kumar 37069dc6a9
Chore: format using `shfmt`
Use [`shfmt`](https://github.com/mvdan/sh) to format kunst. Fixes the
remaining issues in #14.

No flags/customizations are needed; all have been added to
.editorconfig.
2020-03-06 07:27:30 -08:00
Siddharth Dushantha e03b872d27
version bump 1.2.4 --> 1.2.5 2020-03-04 21:11:26 +01:00
Siddharth Dushantha e5d047affe
Merge pull request #33 from Seirdy/fix/better-cover-file-discovery
Use better regex to find cover art
2020-03-01 12:38:20 +01:00
Rohan Kumar e3a60593cb
Cover file regex: file extension should be at EOL
File extensions (.png, .jpg, etc) should come at the end of the line.
mpDris2 also includes an EOL in its regex pattern: see line 108 in
491588a476/src/mpDris2.in.py (L108)
2020-03-01 01:45:14 -08:00
Rohan Kumar ebf47b8075
Use better regex to find cover art
Allow the cover filename to be preceeded by a track number, which
sometimes happens with certain programs and ripping setups.
2020-03-01 01:37:46 -08:00
Siddharth Dushantha 32a60f8d07
Merge pull request #32 from Seirdy/improvement/drop-imagemagick
Remove imagemagick dependency
2020-02-29 14:46:17 +01:00
Rohan Kumar 020aec34b0
Remove imagemagick dependency
Use FFmpeg to convert images, removing the need for imagemagick. FFmpeg
was already needed for cover art extraction.
2020-02-29 01:25:33 -08:00
Siddharth Dushantha a207ee23a5
Merge pull request #30 from Seirdy/fix/better-cover-file-discovery
Find more types of cover art files
2020-02-29 09:22:59 +01:00
Siddharth Dushantha 50be2ebeb7
Merge pull request #29 from Seirdy/feat/imv-on-wayland
Support imv image viewer
2020-02-29 09:22:32 +01:00
Siddharth Dushantha dc98871400
Merge pull request #31 from Seirdy/fix/https
Use HTTPS to fetch images
2020-02-29 09:21:32 +01:00
Rohan Kumar f9e929387e
Fix: don't call imv-msg if we're not using imv
Only call imv-msg to update the image if the image viewer is imv, not
sxiv.
2020-02-28 19:06:46 -08:00
Rohan Kumar b5c9811d3b
Use HTTPS to fetch images 2020-02-28 18:13:20 -08:00
Rohan Kumar 1dc2b932a1
Find more types of cover art files
Find cover art files with different names/extensions by matching the
same files as mpDris2.
2020-02-28 17:57:10 -08:00
Rohan Kumar 9258513fa9
Support imv image viewer
- Allow the user to tell kunst to use imv instead of sxiv via new flag
  `--viewer`
- If `--viewer` is not passed, prefer imv over sxiv in wayland sessions
- In sway sessions, use `swaymsg` to resize imv to preferred dimensions
2020-02-28 14:05:08 -08:00
Siddharth Dushantha d0477c0fcb minor changes 2020-01-29 15:02:24 +01:00