Move source into new src/
directory and move Vim config into
`contrib/` directory.
This commit is contained in:
parent
91347e1aed
commit
f2b56cf11c
12
.gitignore
vendored
12
.gitignore
vendored
|
@ -10,9 +10,9 @@ build
|
|||
*.ebuild*
|
||||
PKGBUILD
|
||||
|
||||
libs/wl/wlr-layer-shell-unstable-v1-client-protocol.h
|
||||
libs/wl/wlr-layer-shell-unstable-v1-protocol.c
|
||||
libs/wl/xdg-output-unstable-v1-protocol.c
|
||||
libs/wl/xdg-output-unstable-v1-client-protocol.h
|
||||
libs/wl/xdg-shell-client-protocol.h
|
||||
libs/wl/xdg-shell-protocol.c
|
||||
src/libs/wl/wlr-layer-shell-unstable-v1-client-protocol.h
|
||||
src/libs/wl/wlr-layer-shell-unstable-v1-protocol.c
|
||||
src/libs/wl/xdg-output-unstable-v1-protocol.c
|
||||
src/libs/wl/xdg-output-unstable-v1-client-protocol.h
|
||||
src/libs/wl/xdg-shell-client-protocol.h
|
||||
src/libs/wl/xdg-shell-protocol.c
|
||||
|
|
|
@ -605,9 +605,7 @@ regex can be used as well.
|
|||
## Modes
|
||||
|
||||
There are two modes. Normal mode and Insert mode. These modes are of
|
||||
course similar to Vim. While modes are used by default, it is possible
|
||||
to move all keybinds to Insert mode, restoring the original dmenu
|
||||
behavior.
|
||||
course similar to Vim.
|
||||
|
||||
Normal mode is the mode spmenu starts in unless a mode argument is specified
|
||||
or another mode is set in the configuration file. Note that if `forceinsertmode`
|
||||
|
|
17
meson.build
17
meson.build
|
@ -8,8 +8,8 @@ project(
|
|||
cc = meson.get_compiler('c')
|
||||
|
||||
project_source_files = [
|
||||
'libs/draw/draw.c',
|
||||
'spmenu.c',
|
||||
'src/libs/draw/draw.c',
|
||||
'src/spmenu.c',
|
||||
]
|
||||
|
||||
project_dependencies = [
|
||||
|
@ -40,12 +40,12 @@ if get_option('wayland')
|
|||
|
||||
run_command('protocols/generate.sh', check : true)
|
||||
|
||||
project_source_files += [ 'libs/wl/wlr-layer-shell-unstable-v1-client-protocol.h' ]
|
||||
project_source_files += [ 'libs/wl/wlr-layer-shell-unstable-v1-protocol.c' ]
|
||||
project_source_files += [ 'libs/wl/xdg-output-unstable-v1-client-protocol.h' ]
|
||||
project_source_files += [ 'libs/wl/xdg-output-unstable-v1-protocol.c' ]
|
||||
project_source_files += [ 'libs/wl/xdg-shell-client-protocol.h' ]
|
||||
project_source_files += [ 'libs/wl/xdg-shell-protocol.c' ]
|
||||
project_source_files += [ 'src/libs/wl/wlr-layer-shell-unstable-v1-client-protocol.h' ]
|
||||
project_source_files += [ 'src/libs/wl/wlr-layer-shell-unstable-v1-protocol.c' ]
|
||||
project_source_files += [ 'src/libs/wl/xdg-output-unstable-v1-client-protocol.h' ]
|
||||
project_source_files += [ 'src/libs/wl/xdg-output-unstable-v1-protocol.c' ]
|
||||
project_source_files += [ 'src/libs/wl/xdg-shell-client-protocol.h' ]
|
||||
project_source_files += [ 'src/libs/wl/xdg-shell-protocol.c' ]
|
||||
build_args += [ '-DWAYLAND' ]
|
||||
endif
|
||||
|
||||
|
@ -100,7 +100,6 @@ endif
|
|||
|
||||
if get_option('docs')
|
||||
install_data(sources : 'docs/spmenu.conf', install_dir : 'share/spmenu')
|
||||
install_data(sources : 'docs/binds-vim.conf', install_dir : 'share/spmenu')
|
||||
install_data(sources : 'docs/spmenu_run.desktop', install_dir : 'share/applications')
|
||||
install_data(sources : 'docs/spmenu_desktop.desktop', install_dir : 'share/applications')
|
||||
install_data(sources : 'docs/spmenu_filemanager.desktop', install_dir : 'share/applications')
|
||||
|
|
|
@ -14,7 +14,7 @@ fifo=${fifo:-true}
|
|||
|
||||
prefix="${prefix:-/usr}"
|
||||
|
||||
reconfigure=${reconfigure:-false}
|
||||
reconfigure=${reconfigure:-true}
|
||||
static=${static:-false}
|
||||
|
||||
clean() {
|
||||
|
@ -23,7 +23,7 @@ clean() {
|
|||
}
|
||||
|
||||
check_correct_dir() {
|
||||
[ ! -f "spmenu.c" ] && printf "Incorrect directory.\n" && exit 1
|
||||
[ ! -f "src/spmenu.c" ] && printf "Incorrect directory.\n" && exit 1
|
||||
}
|
||||
|
||||
gen_arg_list() {
|
||||
|
@ -65,42 +65,42 @@ headers() {
|
|||
wayland-scanner \
|
||||
client-header \
|
||||
protocols/wlr-layer-shell-unstable-v1.xml \
|
||||
libs/wl/wlr-layer-shell-unstable-v1-client-protocol.h
|
||||
src/libs/wl/wlr-layer-shell-unstable-v1-client-protocol.h
|
||||
|
||||
wayland-scanner \
|
||||
client-header \
|
||||
protocols/xdg-shell.xml \
|
||||
libs/wl/xdg-shell-client-protocol.h
|
||||
src/libs/wl/xdg-shell-client-protocol.h
|
||||
|
||||
wayland-scanner \
|
||||
client-header \
|
||||
protocols/xdg-output-unstable-v1.xml \
|
||||
libs/wl/xdg-output-unstable-v1-client-protocol.h
|
||||
src/libs/wl/xdg-output-unstable-v1-client-protocol.h
|
||||
|
||||
wayland-scanner \
|
||||
public-code \
|
||||
protocols/wlr-layer-shell-unstable-v1.xml \
|
||||
libs/wl/wlr-layer-shell-unstable-v1-protocol.c
|
||||
src/libs/wl/wlr-layer-shell-unstable-v1-protocol.c
|
||||
|
||||
wayland-scanner \
|
||||
public-code \
|
||||
protocols/xdg-shell.xml \
|
||||
libs/wl/xdg-shell-protocol.c
|
||||
src/libs/wl/xdg-shell-protocol.c
|
||||
|
||||
wayland-scanner \
|
||||
public-code \
|
||||
protocols/xdg-output-unstable-v1.xml \
|
||||
libs/wl/xdg-output-unstable-v1-protocol.c
|
||||
src/libs/wl/xdg-output-unstable-v1-protocol.c
|
||||
}
|
||||
|
||||
clean_headers() {
|
||||
rm -f \
|
||||
libs/wl/xdg-output-unstable-v1-protocol.c \
|
||||
libs/wl/xdg-shell-protocol.c \
|
||||
libs/wl/wlr-layer-shell-unstable-v1-protocol.c \
|
||||
libs/wl/xdg-output-unstable-v1-client-protocol.h \
|
||||
libs/wl/xdg-shell-client-protocol.h \
|
||||
libs/wl/wlr-layer-shell-unstable-v1-client-protocol.h
|
||||
src/libs/wl/xdg-output-unstable-v1-protocol.c \
|
||||
src/libs/wl/xdg-shell-protocol.c \
|
||||
src/libs/wl/wlr-layer-shell-unstable-v1-protocol.c \
|
||||
src/libs/wl/xdg-output-unstable-v1-client-protocol.h \
|
||||
src/libs/wl/xdg-shell-client-protocol.h \
|
||||
src/libs/wl/wlr-layer-shell-unstable-v1-client-protocol.h
|
||||
}
|
||||
|
||||
gen_pkg() {
|
||||
|
@ -113,13 +113,12 @@ gen_pkg() {
|
|||
LICENSE \
|
||||
meson.build \
|
||||
meson_options.txt \
|
||||
*.c \
|
||||
spmenu.1 \
|
||||
spmenu_run.1 \
|
||||
spmenu_test.1 \
|
||||
scripts/ \
|
||||
docs/ \
|
||||
libs/ \
|
||||
src/ \
|
||||
protocols/ \
|
||||
packaging \
|
||||
"spmenu-${version}"
|
||||
|
@ -182,36 +181,38 @@ gen_arch_pkg() {
|
|||
|
||||
makepkg -sfr --sign || exit 1
|
||||
|
||||
rm -rf src/ pkg/
|
||||
rm -rf pkg/ src/spmenu-${version}.tar.gz src/spmenu-${version}.tar.gz.sig src/spmenu-${version}
|
||||
|
||||
mv PKGBUILD spmenu-${version}.PKGBUILD
|
||||
|
||||
if [ -x "$(command -v md5sum)" ]; then
|
||||
# generate MD5 checksum
|
||||
[ -x "$(command -v md5sum)" ] && \
|
||||
md5sum spmenu-${version}-1-x86_64.pkg.tar.zst | cut -d ' ' -f 1 > spmenu-${version}-1-x86_64.pkg.tar.zst.md5
|
||||
fi
|
||||
|
||||
if [ -x "$(command -v sha256sum)" ]; then
|
||||
# generate SHA256 checksum
|
||||
[ -x "$(command -v sha256sum)" ] && \
|
||||
sha256sum spmenu-${version}-1-x86_64.pkg.tar.zst | cut -d ' ' -f 1 > spmenu-${version}-1-x86_64.pkg.tar.zst.sha256
|
||||
fi
|
||||
}
|
||||
|
||||
generate_theme() {
|
||||
declare -a color
|
||||
|
||||
read_colors() {
|
||||
i=1
|
||||
declare -a color
|
||||
color=()
|
||||
i=1
|
||||
|
||||
[ ! -f "$1" ] && printf "File does not exist.\n" && exit 1
|
||||
[ "$(grep -c "" "$1")" != "18" ] && printf "Color list is not 18 lines long.\n" && exit 1
|
||||
|
||||
# assign colors to variables
|
||||
while true; do
|
||||
color[i]="$(sed -n ${i},${i}p $1)"
|
||||
ccol="${color[i]}"
|
||||
|
||||
[ "${#ccol}" != "7" ] || [ "${ccol:0:1}" != "#" ] && color[i]="#000000"
|
||||
[ "$i" = "18" ] && break
|
||||
|
||||
i=$((i+1))
|
||||
done
|
||||
}
|
||||
|
||||
write_array() {
|
||||
cat << EOF
|
||||
/* spmenu colorscheme generated from ${1:-None} */
|
||||
theme = {
|
||||
|
@ -274,13 +275,6 @@ theme = {
|
|||
EOF
|
||||
}
|
||||
|
||||
[ ! -f "$1" ] && printf "File does not exist.\n" && exit 1
|
||||
[ "$(grep -c "" "$1")" != "18" ] && printf "Color list is not 18 lines long.\n" && exit 1
|
||||
|
||||
read_colors "$1"
|
||||
write_array "$1"
|
||||
}
|
||||
|
||||
build() {
|
||||
[ -x "buildconf" ] && [ ! -x "buildconf_dev" ] && source buildconf
|
||||
[ -x "buildconf_dev" ] && source buildconf_dev
|
||||
|
|
Loading…
Reference in a new issue