Skip to content

Commit

Permalink
Ready for release? ;)
Browse files Browse the repository at this point in the history
  • Loading branch information
Abraham Masri committed Sep 8, 2017
1 parent 2551b3a commit 6d39c32
Show file tree
Hide file tree
Showing 17 changed files with 150 additions and 38 deletions.
17 changes: 8 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
set (PKGDATADIR "${DATADIR}/komorebi")
set (RELEASE_NAME "summit")
set (VERSION "0.9")
set (VERSION_INFO "Beta")
set (VERSION "1.0")
set (VERSION_INFO "Release")
set (ARCHIVE_NAME komorebi-${VERSION})


Expand Down Expand Up @@ -75,7 +75,7 @@ OPTIONS

)

add_definitions(${CFLAGS} -Wall -Winit-self -Wwrite-strings -Wunreachable-code -Wstrict-prototypes )
add_definitions(${CFLAGS} -Wall -Winit-self -Wwrite-strings -Wunreachable-code -Wstrict-prototypes)
add_executable(komorebi ${VALA_C})
add_executable(komorebi-wallpaper-creator ${WALLPAPER_CREATOR})
target_link_libraries(komorebi ${DEPS_LIBRARIES} -lm)
Expand All @@ -97,27 +97,26 @@ install(DIRECTORY data/Icons/ DESTINATION /System/Resources/Komorebi)

######### Other ############
install(FILES data/Other/komorebi.desktop DESTINATION /usr/share/applications/)
install(FILES data/Other/komorebi.desktop DESTINATION $ENV{HOME}/.config/autostart)

install(FILES data/Other/wallpapercreator.desktop DESTINATION /usr/share/applications/)

######### Run the upgrade script #########
install(CODE "execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/data/Other/update_wallpapers.sh)")
install(CODE "execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/data/Other/postinst.sh)")

# Packaging configuration
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Komorebi - an awesome desktop manager for Linux")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Komorebi - An awesome desktop manager for Linux")
set(CPACK_PACKAGE_VENDOR "")
set(CPACK_PACKAGE_CONTACT "Abraham Masri <imasrim114@gmail.com>")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_ICON screenshots/komorebi-icon.png)
set(CPACK_PACKAGE_VERSION_MAJOR 1)
set(CPACK_PACKAGE_VERSION_MAJOR 2)
set(CPACK_PACKAGE_VERSION_MINOR 0)
set(CPACK_PACKAGE_VERSION_PATCH 0)
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Komorebi")
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/data/Other/postinst;")

set(CPACK_DEBIAN_PACKAGE_DEPENDS "libgtk-3-0 (>= 3.14), libglib2.0-0 (>= 2.38), libgtop2-common, libgee-0.8-dev libclutter-gtk-1.0-0 libclutter-1.0-0 libclutter-gst-3.0-0")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libgtk-3-0 (>= 3.14), libglib2.0-0 (>= 2.38), libgtop2-common, libgee-0.8-2, libclutter-gtk-1.0-0, libclutter-1.0-0, libclutter-gst-3.0-0")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
set(CPACK_DEBIAN_PACKAGE_SECTION "system")

Expand Down
Binary file added data/Fonts/BubblerOne-Regular.ttf
Binary file not shown.
Binary file added data/Fonts/VT323-Regular.ttf
Binary file not shown.
10 changes: 7 additions & 3 deletions data/Other/update_wallpapers.sh → data/Other/postinst
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#!/bin/bash

# A script that updates existing Komorebi wallpapers
# with the new updated syntax
# and add us to the start up with the new updated syntax

echo "[INFO]: Removing old Komorebi properties file.."
users="$(ls -d -1 /home/*/)"
users="$(ls -d -1 /home/*/ | xargs -n 1 basename)"

for user in $users; do

rm -rf "$user/.Komorebi.prop"
rm -rf "/home/$user/.Komorebi.prop"

mkdir -p "/home/$user/.config/autostart"
cp "/usr/share/applications/komorebi.desktop" "/home/$user/.config/autostart/komorebi.desktop"
chown "$user:$user" "/home/$user/.config/autostart" -R

done

Expand Down
4 changes: 2 additions & 2 deletions data/Wallpapers/dark_forest/config
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Alpha=255
ShadowColor=black
ShadowAlpha=190

TimeFont=Lato Hairline 80
DateFont=Lato Hairline 60
TimeFont=Lato Hairline 60
DateFont=Lato Hairline 50

[Wallpaper]
Parallax=false
Expand Down
32 changes: 32 additions & 0 deletions data/Wallpapers/grainy_day/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[Info]
WallpaperType=image

[DateTime]
Visible=true
Parallax=false
MarginTop=0
MarginRight=0
MarginLeft=60
MarginBottom=0
RotationX=0
RotationY=0
RotationZ=0
Position=center_left
Alignment=start
AlwaysOnTop=true
Color=#2e3436
Alpha=255
ShadowColor=#2e3436
ShadowAlpha=255
TimeFont=VT323 20
DateFont=VT323 20

[Wallpaper]
Parallax=false

[Asset]
Visible=false
AnimationMode=noanimation
AnimationSpeed=100
Width=0
Height=0
Binary file added data/Wallpapers/grainy_day/wallpaper.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions data/Wallpapers/icy_mountains/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[Info]
WallpaperType=image

[DateTime]
Visible=true
Parallax=false
MarginTop=0
MarginRight=0
MarginLeft=0
MarginBottom=75
RotationX=0
RotationY=0
RotationZ=0
Position=center
Alignment=center
AlwaysOnTop=true
Color=#164b71
Alpha=167
ShadowColor=#dd22dd22dd22
ShadowAlpha=255
TimeFont=Bubbler One Bold 46
DateFont=Bubbler One 15

[Wallpaper]
Parallax=false

[Asset]
Visible=true
AnimationMode=noanimation
AnimationSpeed=100
Width=0
Height=0
Binary file added data/Wallpapers/icy_mountains/wallpaper.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions extra/wallpaper-creator/Main.vala
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace WallpaperCreator {

string filePath;
string assetPath;
string thumbnailPath;

string wallpaperName;
string wallpaperType; // image/video
Expand Down Expand Up @@ -48,7 +49,7 @@ namespace WallpaperCreator {
string timeFont;
string dateFont;

bool showAsset;
bool showAsset = false;
string animationMode;
int animationSpeed;

Expand All @@ -57,7 +58,7 @@ namespace WallpaperCreator {
print("Welcome to Komorebi Wallpaper Creator\n");

if(args[1] == "--version" || args[1] == "version") {
print("Version: 0.6 - Summit\nCreated by: Abraham Masri @cheesecakefuo\n\n");
print("Version: 1.0 - Summit\nCreated by: Abraham Masri @cheesecakefuo\n\n");
return;
}
Gtk.init (ref args);
Expand All @@ -67,7 +68,6 @@ namespace WallpaperCreator {
new NewWallpaperWindow();

var mainSettings = Gtk.Settings.get_default ();
mainSettings.set("gtk-xft-dpi", (int) (1042 * 100), null);
mainSettings.set("gtk-xft-antialias", 1, null);
mainSettings.set("gtk-xft-rgba" , "none", null);
mainSettings.set("gtk-xft-hintstyle" , "slight", null);
Expand Down
17 changes: 12 additions & 5 deletions extra/wallpaper-creator/OnScreen/FinalPage.vala
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace WallpaperCreator.OnScreen {
descLabel.justify = Justification.CENTER;

titleLabel.set_markup("<span font='Lato 20'>Done</span>");
descLabel.set_markup("<span font='Lato Light 12'>Open 'Change Wallpaper' to choose your new wallpaper.</span>");
descLabel.set_markup("<span font='Lato Light 12'>Copy the wallpaper folder from your home directory to /System/Komorebi/Resources\nthen open 'Change Wallpaper' to choose your new wallpaper.</span>");

closeButton.margin_top = 20;
closeButton.halign = Align.CENTER;
Expand All @@ -66,9 +66,9 @@ namespace WallpaperCreator.OnScreen {
private void createWallpaper() {

// Create a new directory
wallpaperName = wallpaperName.replace(" ", "_").down();
wallpaperName = wallpaperName.replace(" ", "_").replace(".", "_").down();

var dirPath = @"$(Environment.get_home_dir())/.Resources/Komorebi/$(wallpaperName)";
var dirPath = @"$(Environment.get_home_dir())/$(wallpaperName)";
var dirFile = File.new_for_path(dirPath).make_directory_with_parents();
var configPath = dirPath + "/config";
var configFile = File.new_for_path(configPath);
Expand All @@ -83,11 +83,15 @@ namespace WallpaperCreator.OnScreen {
var videoFileName = videoFileNameArray[videoFileNameArray.length - 1];
configKeyFile.set_string("Info", "VideoFileName", videoFileName);

// Move the video into our new dir
// Copy the video into our new dir
File.new_for_path(filePath).copy(File.new_for_path(dirPath + @"/$videoFileName"), FileCopyFlags.NONE);

// Move the thumbnail
File.new_for_path(thumbnailPath).copy(File.new_for_path(dirPath + "/thumb.jpg"), FileCopyFlags.NONE);

} else {

// Move the wallpaper into our new dir
// Copy the wallpaper into our new dir
File.new_for_path(filePath).copy(File.new_for_path(dirPath + "/wallpaper.jpg"), FileCopyFlags.NONE);
}

Expand Down Expand Up @@ -123,6 +127,9 @@ namespace WallpaperCreator.OnScreen {

configKeyFile.set_boolean("Wallpaper", "Parallax", wallpaperParallax);

if(assetPath == null || assetPath == "")
showAsset = false;

configKeyFile.set_boolean("Asset", "Visible", showAsset);
configKeyFile.set_string("Asset", "AnimationMode", animationMode);
configKeyFile.set_integer("Asset", "AnimationSpeed", animationSpeed);
Expand Down
32 changes: 28 additions & 4 deletions extra/wallpaper-creator/OnScreen/InitialPage.vala
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,14 @@ namespace WallpaperCreator.OnScreen {
Label typeLabel = new Label("My wallpaper is");
ComboBoxText typeComboBox = new ComboBoxText();

Label chooseFileLabel = new Label("Where is the image/video located?");
Label chooseFileLabel = new Label("Where is the image located?");
FileChooserButton chooseFileButton = new FileChooserButton("Choose File", Gtk.FileChooserAction.OPEN);

Revealer revealer = new Revealer();

Box thumbnailBox = new Box(Orientation.VERTICAL, 5);
Label chooseThumbnailLabel = new Label("Where is the thumbnail located?");
FileChooserButton chooseThumbnailButton = new FileChooserButton("Choose Thumbnail", Gtk.FileChooserAction.OPEN);

public InitialPage() {

Expand Down Expand Up @@ -75,6 +80,9 @@ namespace WallpaperCreator.OnScreen {
chooseFileButton.set_filter (imageFilter);
chooseFileButton.width_chars = 10;

chooseThumbnailButton.set_filter (imageFilter);
chooseThumbnailButton.width_chars = 10;

// Signals
nameEntry.changed.connect(() => {

Expand All @@ -87,11 +95,15 @@ namespace WallpaperCreator.OnScreen {
typeComboBox.changed.connect(() => {
wallpaperType = typeComboBox.get_active_id();

if(wallpaperType == "image")
if(wallpaperType == "image") {
chooseFileButton.set_filter (imageFilter);
else
chooseFileLabel.label = "Where is the image located?";
revealer.set_reveal_child(false);
} else {
chooseFileButton.set_filter (videoFilter);

chooseFileLabel.label = "Where is the video located?";
revealer.set_reveal_child(true);
}

});

Expand All @@ -101,12 +113,22 @@ namespace WallpaperCreator.OnScreen {
});


chooseThumbnailButton.file_set.connect (() => {

thumbnailPath = chooseThumbnailButton.get_file().get_path();
});

titleBox.add(titleLabel);
titleBox.add(aboutLabel);

aboutGrid.attach(new Image.from_file("/System/Resources/Komorebi/wallpaper_creator.svg"), 0, 0, 1, 1);
aboutGrid.attach(titleBox, 1, 0, 1, 1);

thumbnailBox.add(chooseThumbnailLabel);
thumbnailBox.add(chooseThumbnailButton);

revealer.add(thumbnailBox);

add(aboutGrid);
add(nameLabel);
add(nameEntry);
Expand All @@ -116,6 +138,8 @@ namespace WallpaperCreator.OnScreen {

add(chooseFileLabel);
add(chooseFileButton);

add(revealer);
}
}
}
2 changes: 1 addition & 1 deletion src/Main.vala
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace Komorebi {
print("Welcome to Komorebi\n");

if(args[1] == "--version" || args[1] == "version") {
print("Version: 1.0 - Summit\nCreated by: Abraham Masri @cheesecakefuo\n\n");
print("Version: 2.0 - Summit\nCreated by: Abraham Masri @cheesecakefuo\n\n");
return;
}

Expand Down
19 changes: 16 additions & 3 deletions src/OnScreen/DesktopIcons.vala
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,12 @@ namespace Komorebi.OnScreen {
/* Creates a new folder */
public void createNewFolder () {

var iconNewFolder = new Icon.NewFolder();
append(iconNewFolder);
iconNewFolder.unDimIcon(true);
var untitledFolder = File.new_for_path(getUntitledFolderName());
untitledFolder.make_directory_async();

// var iconNewFolder = new Icon.NewFolder();
// append(iconNewFolder);
// iconNewFolder.unDimIcon(true);

}

Expand Down Expand Up @@ -247,5 +250,15 @@ namespace Komorebi.OnScreen {

}

/* Returns a new Untitled Folder name */
private string getUntitledFolderName(int count = 0) {

string path = desktopPath + @"/New Folder($(count.to_string()))";
if(File.new_for_path(path).query_exists())
path = getUntitledFolderName(count + 1);

return path;
}

}
}
7 changes: 4 additions & 3 deletions src/OnScreen/PreferencesWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ namespace Komorebi.OnScreen {
Label aboutLabel = new Label("");

// Gtk.CheckButton showSystemStatsButton = new Gtk.CheckButton.with_label ("Show RAM and CPU Usage");
Gtk.CheckButton twentyFourHoursButton = new Gtk.CheckButton.with_label ("Use 24-Hour Time");
Gtk.CheckButton showDesktopIconsButton = new Gtk.CheckButton.with_label ("Show Desktop Icons (Beta)");
Gtk.CheckButton twentyFourHoursButton = new Gtk.CheckButton.with_label ("Use 24-hour time");
Gtk.CheckButton showDesktopIconsButton = new Gtk.CheckButton.with_label ("Show desktop icons");

Gtk.Box bottomPreferencesBox = new Box(Orientation.HORIZONTAL, 10);

Expand Down Expand Up @@ -186,14 +186,15 @@ namespace Komorebi.OnScreen {

donateButton.released.connect(() => {

print("Thank you <3\n");
AppInfo.launch_default_for_uri("https://goo.gl/qzB5QY", null); // Thank you <3
destroy();

});

reportButton.released.connect(() => {

AppInfo.launch_default_for_uri("https://github.com/iabem97/komorebi/issues", null);
AppInfo.launch_default_for_uri("https://goo.gl/aaJgN7", null);
destroy();
});

Expand Down
6 changes: 3 additions & 3 deletions src/OnScreen/WallpapersSelector.vala
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ namespace Komorebi.OnScreen {

getWallpapers();

var thumbnail = new Thumbnail.Add();
// var thumbnail = new Thumbnail.Add();

addThumbnail(thumbnail);
thumbnailsList.append(thumbnail);
// addThumbnail(thumbnail);
// thumbnailsList.append(thumbnail);

add(grid);
}
Expand Down
Loading

0 comments on commit 6d39c32

Please sign in to comment.