This repository has been archived by the owner on Jul 20, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add css to config Fixes #10
- Loading branch information
Showing
11 changed files
with
100 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// Created by waff on 1/8/20. | ||
// | ||
|
||
#include "colors.h" | ||
#include "config.h" | ||
|
||
char* get_css () { | ||
open_config(); | ||
|
||
char* css_file = str_concat(get_user_home(), "/.config/waffy/main.css"); | ||
|
||
FILE* fp = fopen(css_file, "r"); | ||
if (fp == NULL) { | ||
fp = fopen(css_file, "w"); | ||
fprintf(fp, "%s", read_file("../assets/main.css")); | ||
} | ||
|
||
fclose(fp); | ||
|
||
if (config_wal == 1) { | ||
char* wal_file = str_concat(get_user_home(), "/.cache/wal/colors-waybar.css"); | ||
return str_concat(read_file(wal_file), read_file(css_file)); | ||
} | ||
|
||
return read_file(css_file); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// | ||
// Created by waff on 1/8/20. | ||
// | ||
|
||
#ifndef WAFFY_COLORS_H | ||
#define WAFFY_COLORS_H | ||
|
||
#include "utils.h" | ||
|
||
char* get_css (); | ||
|
||
#endif //WAFFY_COLORS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters