Skip to content

Commit

Permalink
Merge pull request #193 from budlabs/next
Browse files Browse the repository at this point in the history
2023.07.13.1
  • Loading branch information
budRich authored Jul 13, 2023
2 parents a1d54c8 + d201729 commit db0120d
Show file tree
Hide file tree
Showing 34 changed files with 366 additions and 67 deletions.
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: budRich

---

### before anything else, try to reproduce the bug with the [wiki config](https://github.com/budlabs/i3ass/wiki/i3-config-example)

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Distro [e.g. RHEL, Ubuntu 12.10, Arch btw]

**Post the output of the command `i3ass`**
```
output goes here
```


**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017-2022, budRich
Copyright (c) 2017-2023, budRich

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ $ make

#### build dependencies
[GNU make], [Gawk], [bash], [GNU sed](https://www.gnu.org/software/sed/)
[go-md2man] is needed to **re**-build the manpages (optional)

[go-md2man]: https://github.com/cpuguy83/go-md2man

#### runtime dependencies
[bash], [i3wm], [xdotool], [Gawk]
Expand All @@ -44,14 +47,15 @@ of most of **i3ass**.
script | description
|:-|:-|
[i3Kornhe] | move and resize windows gracefully
[i3ass] | Print environment information
[i3flip] | Tabswitching done right
[i3fyra] | An advanced, simple grid-based tiling layout
[i3get] | prints info about a specific window to stdout
[i3gw] | a ghost window wrapper for i3wm
[i3king] | window ruler
[i3list] | list information about the current i3 session
[i3run] | Run, Raise or hide windows in i3wm
[i3var] | get or get a i3 variable
[i3var] | get or set a i3 variable
[i3viswiz] | professional window focus for i3wm
[i3zen] | zentered container, full focus

Expand Down Expand Up @@ -80,6 +84,7 @@ i3ass is licensed under the **MIT** license
[i3menu]: https://github.com/budlabs/i3ass/wiki/i3menu
[i3viswiz]: https://github.com/budlabs/i3ass/wiki/i3viswiz
[i3king]: https://github.com/budlabs/i3ass/wiki/i3king
[i3ass]: https://github.com/budlabs/i3ass/wiki/i3ass
[i3zen]: https://github.com/budlabs/i3ass/wiki/i3zen
[youtube channel]: https://youtube.com/c/dubbeltumme
[rofi]: https://github.com/davatorium/rofi
Expand Down
3 changes: 3 additions & 0 deletions docs/readme_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ $ make

#### build dependencies
[GNU make], [Gawk], [bash], [GNU sed](https://www.gnu.org/software/sed/)
[go-md2man] is needed to **re**-build the manpages (optional)

[go-md2man]: https://github.com/cpuguy83/go-md2man

#### runtime dependencies
[bash], [i3wm], [xdotool], [Gawk]
1 change: 1 addition & 0 deletions docs/readme_links.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
[i3menu]: https://github.com/budlabs/i3ass/wiki/i3menu
[i3viswiz]: https://github.com/budlabs/i3ass/wiki/i3viswiz
[i3king]: https://github.com/budlabs/i3ass/wiki/i3king
[i3ass]: https://github.com/budlabs/i3ass/wiki/i3ass
[i3zen]: https://github.com/budlabs/i3ass/wiki/i3zen
[youtube channel]: https://youtube.com/c/dubbeltumme
[rofi]: https://github.com/davatorium/rofi
Expand Down
23 changes: 19 additions & 4 deletions docs/releasenotes/0next.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
#### i3menu
[i3ass]

has been rewritten to use a custom dmenu fork instead
of rofi. i3menu is no longer part of i3ass repository
and now lives in it's own repo.
A *"new"* command, that prints environment information.

[i3list]

Fixed an issue where i3fyra workspace couldn't be
seen if it wasn't the currently active workspace (#180)

[i3fyra]

Fixed a typo that made I3FYRA_MAIN_CONTAINER be ignored

[i3king]

Fixed an issue where commands where not printed
when `--print-commands` was used (i3fyra)

Account for `"actual_deco_rect":` in JSON, not doing
this made it so some windows never triggered rules
7 changes: 7 additions & 0 deletions docs/releasenotes/2023.06.04.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#### 2023.06.04

[i3menu]

has been rewritten to use a custom dmenu fork instead
of rofi. i3menu is no longer part of i3ass repository
and now lives in it's own repo.
20 changes: 20 additions & 0 deletions docs/releasenotes/23.07.13.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[i3ass]

A *"new"* command, that prints environment information.

[i3list]

Fixed an issue where i3fyra workspace couldn't be
seen if it wasn't the currently active workspace (#180)

[i3fyra]

Fixed a typo that made I3FYRA_MAIN_CONTAINER be ignored

[i3king]

Fixed an issue where commands where not printed
when `--print-commands` was used (i3fyra)

Account for `"actual_deco_rect":` in JSON, not doing
this made it so some windows never triggered rules
1 change: 1 addition & 0 deletions src/i3ass/GNUmakefile
39 changes: 39 additions & 0 deletions src/i3ass/config.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
NAME := i3ass
VERSION := 2023.07.13.1
CREATED := 2023-07-12
UPDATED := 2023-07-13
AUTHOR := budRich
CONTACT := https://github.com/budlabs/i3ass
USAGE := i3ass
DESCRIPTION := Print environment information
ORGANISATION := budlabs
LICENSE := MIT

MANPAGE_LAYOUT = \
$(CACHE_DIR)/help_table.txt \
$(CACHE_DIR)/long_help.md \
$(DOCS_DIR)/description.md \
$(CACHE_DIR)/copyright.txt

$(CACHE_DIR)/wiki.md: config.mak $(MANPAGE_LAYOUT)
@$(info making $@)
{
printf '%s\n' '## NAME' '$(NAME) - $(DESCRIPTION)' \
'## SYNOPSIS' '`$(USAGE)`' \
'## OPTIONS'

sed 's/^/ /g' $(CACHE_DIR)/help_table.txt
cat $(CACHE_DIR)/long_help.md

echo "## USAGE"
cat $(DOCS_DIR)/description.md

printf '%s\n' \
'## CONTACT' \
"Send bugs and feature requests to: " \
"$(CONTACT)/issues" \
'## COPYRIGHT'

cat $(CACHE_DIR)/copyright.txt

} > $@
6 changes: 6 additions & 0 deletions src/i3ass/docs/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
The `i3ass` command is used to print information
about the current environment relevant to i3ass.
The version, update date and installation path of
the other commands in i3ass. Version of the commands
`i3, xdotool, gawk, bash`. And the environment variables:
I3FYRA_WS and I3FYRA_MAIN_CONTAINER.
1 change: 1 addition & 0 deletions src/i3ass/docs/options/help
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print help and exit
1 change: 1 addition & 0 deletions src/i3ass/docs/options/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print messages to stderr
13 changes: 13 additions & 0 deletions src/i3ass/func/CLEANUP.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

trap 'CLEANUP' EXIT INT HUP

CLEANUP() {

[[ -n $_msgstring ]] && {
((_o[verbose])) || qflag='-q'
>&2 i3-msg "${qflag:-}" "$_msgstring"
}

((___t)) && >&2 echo "<<< $___cmd" "$(( (10#${EPOCHREALTIME//[!0-9]} - ___t) / 1000 ))ms" #bashbud
}
1 change: 1 addition & 0 deletions src/i3ass/func/ERR.sh
1 change: 1 addition & 0 deletions src/i3ass/func/LOG.sh
1 change: 1 addition & 0 deletions src/i3ass/func/TIMER.sh
38 changes: 38 additions & 0 deletions src/i3ass/i3ass
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

main(){

for ass in i3{flip,fyra,get,gw,king,Kornhe,list,var,viswiz,zen}; do
path=$(command -v "$ass")
version_output=$("$ass" -v 2>&1)

# i3ass - version: 0.0.1
# updated: 2023-07-12 by budRich
[[ $path ]] \
&& read -rs _ _ _ version _ updated _ \
<<< "${version_output//$'\n'/ }"

printf "%-8s | %-7s | %-10s | %s\n" \
"$ass" "${version:--}" "${updated:--}" "${path/~/'~'}"
done

echo
echo -------------------------------------------
echo

for cmd in i3 bash gawk xdotool ; do
if command -v "$cmd" >/dev/null ; then
"$cmd" --version 2>&- | head -n1
else
echo "WARNING: command $cmd not found"
fi
done

echo
echo -------------------------------------------
echo
export | grep I3FYRA | cut -f3 -d' '
}

__dir=$(dirname $(readlink -f "${BASH_SOURCE[0]}")) #bashbud
source "$__dir/_init.sh" #bashbud
42 changes: 42 additions & 0 deletions src/i3ass/i3ass.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.nh
.TH I3ASS 2023-07-13 budlabs "User Manuals"
.SH NAME
.PP
i3ass - Print environment information

.SH SYNOPSIS
.PP
\fB\fCi3ass\fR

.SH OPTIONS
.PP
.RS

.nf
-h, --help | print help and exit
-v, --version | print messages to stderr

.fi
.RE

.SH USAGE
.PP
The \fB\fCi3ass\fR command is used to print information
about the current environment relevant to i3ass.
The version, update date and installation path of
the other commands in i3ass. Version of the commands
\fB\fCi3, xdotool, gawk, bash\fR\&. And the environment variables:
.br
I3FYRA_WS and I3FYRA_MAIN_CONTAINER.

.SH CONTACT
.PP
Send bugs and feature requests to:
.br
https://github.com/budlabs/i3ass/issues

.SH COPYRIGHT
.PP
Copyright (c) 2023, budRich of budlabs
.br
SPDX-License-Identifier: MIT
1 change: 1 addition & 0 deletions src/i3ass/options
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--help|-h --version|-v
1 change: 1 addition & 0 deletions src/i3ass/share.mak
2 changes: 1 addition & 1 deletion src/i3fyra/config.mak
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME := i3fyra
VERSION := 1.35
VERSION := 1.36
CREATED := 2017-01-14
UPDATED := 2022-06-05
AUTHOR := budRich
Expand Down
3 changes: 1 addition & 2 deletions src/i3fyra/func/float_toggle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ float_toggle(){
if ((i3list[AWF]==1)); then

[[ -f $I3_KING_PID_FILE ]] && {
ERM "hhh"

mapfile -t king_commands <<< "$(i3king --conid "${i3list[TWC]}" --print-commands)"

Expand All @@ -31,7 +30,7 @@ float_toggle(){
fi


if [[ ${i3list[LVI]} =~ I3FYRA_MAIN_CONTAINER ]]; then
if [[ ${i3list[LVI]} =~ $I3FYRA_MAIN_CONTAINER ]]; then
target=$I3FYRA_MAIN_CONTAINER
elif [[ ${i3list[LVI]} ]]; then
target=${i3list[LVI]:0:1}
Expand Down
5 changes: 4 additions & 1 deletion src/i3fyra/func/initialize_globals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ initialize_globals() {

[[ $I3FYRA_WS ]] || {
eval "$(i3list)"
I3FYRA_WS=\"${i3list[WAN]}\"
I3FYRA_WS=${i3list[WAN]}
}

[[ $I3FYRA_WS =~ ^\" ]] \
|| I3FYRA_WS=$(printf '"%s"' "$I3FYRA_WS")

(( _o[float] && i3list[AWF]==0 )) \
|| i3var set i3fyra_ws "$I3FYRA_WS"

Expand Down
4 changes: 2 additions & 2 deletions src/i3king/config.mak
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
NAME := i3king
VERSION := 0.4
VERSION := 0.4.2
CREATED := 2021-06-01
UPDATED := 2022-07-26
UPDATED := 2023-07-13
AUTHOR := budRich
CONTACT := https://github.com/budlabs/i3ass
USAGE := i3king [OPTIONS]
Expand Down
1 change: 1 addition & 0 deletions src/i3king/func/make_regex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ re+=$(cat << EOB
"current_border_width":[0-9-]+,
"rect":[{]"x":([0-9]+),"y":([0-9]+),"width":([0-9]+),"height":([0-9]+)},
"deco_rect":[^g]+ght":([0-9]+)},
("actual_deco_rect":[^}]+},)?
"window_rect":[^}]+},
"geometry":[^}]+},
"name":"?([^\"]+)"?,
Expand Down
5 changes: 3 additions & 2 deletions src/i3king/func/match_window.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ match_window() {
local cid=$1 class=$2 instance=$3 title=$4
local type=$5 role=$6 wid=$7 change=$8

((_o[print-commands])) && change=new

local last_cmd cmd rule
local title_regex title_options new_title

Expand Down Expand Up @@ -178,8 +180,7 @@ match_window() {
((_o[print-commands] || _o[dryrun])) \
|| >&2 i3-msg "${prefix:-} $cmd"

((_o[print-commands])) \
&& echo "${prefix:-} $cmd"
((_o[print-commands])) && echo "${prefix:-} $cmd"

done
}
Expand Down
Loading

0 comments on commit db0120d

Please sign in to comment.