lighttigerXIV / catppuccinifier

Apply catppuccin flavors to your wallpapers
MIT License
164 stars 8 forks source link

[Feature Request] CLI on Mac OS #32

Open 2mnml opened 7 months ago

2mnml commented 7 months ago

Was wondering if this will be implemented into Mac OS, at least in the cli?

Thanks!

NamesCode commented 6 months ago

I would be interested in implementing this, however @lighttigerXIV has mentioned about support and maintenance being difficult to sustain for the main application.

NamesCode commented 6 months ago

Heyo @2mnml :wave:, so I've managed to get the CLI up and running. Just working in the GUI now, I can push the CLI commits to my fork if you wanna try it out.

2mnml commented 6 months ago

@NamesCode That would be great!

NamesCode commented 6 months ago

Heyo @2mnml, I've pushed to my repor the commits, You'd have to compile it yourself currently though, so i've provided a quick script:

git clone https://github.com/NamesCode/catppuccinifier.git \
cd catppuccinifier/src/catppuccinifier-cli \
cargo install

Any issues feel free to contact me :)

2mnml commented 6 months ago
Screenshot 2024-02-12 at 8 19 03 AM

Seems to be working great, you rock! @NamesCode

2mnml commented 5 months ago
Screenshot 2024-02-20 at 9 25 10 AM

Having some issues with it @NamesCode

omelette-watin commented 3 months ago

@2mnml in main.rs change update

    let temp_path = match env::consts::OS {
        "linux" => "/tmp/catppuccinifier/".to_string(),
        "windows" => "C:\\Windows\\TEMP\\catppuccinifier\\".to_string(),
        _ => "".to_string(),
    };

(line 90)

you need to specify a dir for macos. For example

    let temp_path = match env::consts::OS {
        "linux" => "/tmp/catppuccinifier/".to_string(),
        "windows" => "C:\\Windows\\TEMP\\catppuccinifier\\".to_string(),
        "macos" => "/tmp/catppuccinifier".to_string(),
        _ => "".to_string(),
    };
NotAriRay commented 1 month ago

Same Issue keeps happening @omelette-watin

omelette-watin commented 1 month ago

@NotAriRay what is the panic error that you got ?

NotAriRay commented 1 month ago

@omelette-watin Sane error as in this message

https://github.com/lighttigerXIV/catppuccinifier/issues/32#issuecomment-1954459195

omelette-watin commented 1 month ago

@NotAriRay try to check if /tmp dir exists. i think its the reason for your trouble

in line 97 the code calls create_dir instead of create_dir_all. You can either change this line or mkdir /tmp

lighttigerXIV commented 1 month ago

@NotAriRay try to check if /tmp dir exists. i think its the reason for your trouble

in line 97 the code calls create_dir instead of create_dir_all. You can either change this line or mkdir /tmp

/tmp doesn't exist on mac by default? 🤔

omelette-watin commented 1 month ago

I dont know tbh 😅 but try to see if this fixes your problem @NotAriRay

NamesCode commented 1 month ago

@2mnml in main.rs change update

    let temp_path = match env::consts::OS {
        "linux" => "/tmp/catppuccinifier/".to_string(),
        "windows" => "C:\\Windows\\TEMP\\catppuccinifier\\".to_string(),
        _ => "".to_string(),
    };

(line 90)

you need to specify a dir for macos. For example

    let temp_path = match env::consts::OS {
        "linux" => "/tmp/catppuccinifier/".to_string(),
        "windows" => "C:\\Windows\\TEMP\\catppuccinifier\\".to_string(),
        "macos" => "/tmp/catppuccinifier".to_string(),
        _ => "".to_string(),
    };

The only issue with this is that

@NotAriRay try to check if /tmp dir exists. i think its the reason for your trouble

in line 97 the code calls create_dir instead of create_dir_all. You can either change this line or mkdir /tmp

/tmp exists since macOS is a posix system. The reason I believe this is happening is because the catpuccinifier subfolder doesn't exist in /tmp. I'll work on my PR for this at some point in the future that should resolve this. For now just run:

mkdir "/tmp/catppuccinifier/"