Skip to content

Commit

Permalink
fix: fixed some typos and added version to cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
DRAGONTOS committed Jul 27, 2024
1 parent 2ed4323 commit 81cfc74
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 13 deletions.
13 changes: 10 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
cmake_minimum_required(VERSION 3.19)
project(RapidMenu)

# Get version
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/props.json PROPS)
string(JSON VER GET ${PROPS} version)

project(RapidMenu
DESCRIPTION "Utilize configuration files to create runner scripts."
VERSION ${VER})

set(CMAKE_CXX_STANDARD 23)

Expand All @@ -19,15 +26,15 @@ target_link_libraries(RapidMenu PRIVATE tomlplusplus::tomlplusplus)
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "DRAGONTOS")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libcpptoml-dev")
set(CPACK_DEBIAN_PACKAGE_LICENSE "GPLv3")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Utilize configuration files to create runner scripts.")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${DESCRIPTION})
set(CPACK_DEBIAN_PACKAGE_RELEASE_DIST ON)
set(CPACK_GENERATOR DEBIAN)
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
# RPM
set(CPACK_PACKAGE_VENDOR "DRAGONTOS")
set(CPACK_RPM_PACKAGE_REQUIRES "tomlplusplus-devel")
set(CPACK_RPM_PACKAGE_LICENSE "GPLv3")
set(CPACK_RPM_PACKAGE_DESCRIPTION "Utilize configuration files to create runner scripts.")
set(CPACK_RPM_PACKAGE_DESCRIPTION ${DESCRIPTION})
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
set(CPACK_RPM_PACKAGE_RELEASE_DIST ON)
set(CPACK_GENERATOR RPM)
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Utilize configuration files to create runner scripts.

# Requirements
- cpptoml
- tomlplusplus
- a runner like rofi, dmenu etc

# Installing
Expand Down Expand Up @@ -66,17 +67,18 @@ It is required to have the [runner] section in the configuration.
Example:
```
[runner]
rname = "Dashboard:" (name if needed)
rtheme = "-show-icons -theme ~/.config/rofi/themes/rounded-purple-dark.rasi" (theme if needed)
rcommand = "rofi -dmenu -p" (dmenu, rofi, bemenu etc)
rname = "Dashboard:" #(name if needed)
rtheme = "-show-icons -theme ~/.config/rofi/themes/rounded-purple-dark.rasi" #(theme if needed)
rcommand = "rofi -dmenu -p" #(dmenu, rofi, bemenu etc)
```
An example of something to add to the configuration.
```
[Disk] (To set the name)
names = "Disk" (To set the in the runner)
description = "You chose Disk." (No required but can be set)
command = "kitty -e /home/$USER/.config/RapidMenu/hdd.bash" (bash command)
[Disk] #(To set the name)
names = "Disk" #(To set the name in the runner)
description = "You chose Disk." #(Not required but can be set)
command = "kitty -e /home/$USER/.config/RapidMenu/hdd.bash" #(bash command)
```

# Contributors
- DRAGONTOS
- maukkis
3 changes: 3 additions & 0 deletions props.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "0.2.1"
}
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ void clearBuffer(){
}

inline void checkIfExtractionFailed(){
if (!std::cin){ // if previous extraction failed
if (std::cin.eof()){ // check if eof and if yes aborts the program
if (!std::cin){ // if previous extraction failed
if (std::cin.eof()){ // check if eof and if yes aborts the program
std::abort();
}

std::cin.clear(); //put std::cin back into normal mode
clearBuffer(); // remove bad input
clearBuffer(); // remove bad input
}
}

Expand Down

0 comments on commit 81cfc74

Please sign in to comment.