Skip to content

Commit 040610d

Browse files
committed
released at 0.0.1
0 parents  commit 040610d

File tree

13 files changed

+500
-0
lines changed

13 files changed

+500
-0
lines changed

.github/CONTRIBUTING

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
CONTRIBUTING
2+
============
3+
4+
Want to contribute? Great! First, read this page.
5+
6+
Code reviews:
7+
* All submissions, including submissions by project members, require
8+
review. We use Github pull requests for this purpose.
9+
10+
Some tips for good pull requests:
11+
* Use our code. When in doubt, try to stay true to the existing code
12+
of the project.
13+
* Write a descriptive commit message. What problem are you solving
14+
and what are the consequences? Where and what did you test? Some
15+
good tips:
16+
http://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message
17+
https://www.kernel.org/doc/Documentation/SubmittingPatches
18+
* If your PR consists of multiple commits which are successive
19+
improvements / fixes to your first commit, consider squashing them
20+
into a single commit (`git rebase -i`) such that your PR is a
21+
single commit on top of the current HEAD. This make reviewing the
22+
code so much easier, and our history more readable.

.github/FUNDING.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with a single Patreon username
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: https://www.paypal.me/mcpcpc/usd5

.github/workflows/codacy-analysis.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This workflow checks out code, performs a Codacy security scan
2+
# and integrates the results with the
3+
# GitHub Advanced Security code scanning feature. For more information on
4+
# the Codacy security scan action usage and parameters, see
5+
# https://github.com/codacy/codacy-analysis-cli-action.
6+
# For more information on Codacy Analysis CLI in general, see
7+
# https://github.com/codacy/codacy-analysis-cli.
8+
9+
name: Codacy Security Scan
10+
11+
on:
12+
push:
13+
branches: [ main ]
14+
pull_request:
15+
branches: [ main ]
16+
17+
jobs:
18+
codacy-security-scan:
19+
name: Codacy Security Scan
20+
runs-on: ubuntu-latest
21+
steps:
22+
# Checkout the repository to the GitHub Actions runner
23+
- name: Checkout code
24+
uses: actions/checkout@v2
25+
26+
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
27+
- name: Run Codacy Analysis CLI
28+
uses: codacy/[email protected]
29+
with:
30+
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
31+
# You can also omit the token and run the tools that support default configurations
32+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
33+
verbose: true
34+
output: results.sarif
35+
format: sarif
36+
# Adjust severity of non-security issues
37+
gh-code-scanning-compat: true
38+
# Force 0 exit code to allow SARIF file generation
39+
# This will handover control about PR rejection to the GitHub side
40+
max-allowed-issues: 2147483647
41+
42+
# Upload the SARIF file generated in the previous step
43+
- name: Upload SARIF results file
44+
uses: github/codeql-action/upload-sarif@v1
45+
with:
46+
sarif_file: results.sarif

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
xwm
2+
*.a
3+
*.o

CHANGELOG

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [0.0.1] - 2020-11-06
8+
### Added
9+
- Initial release.
10+

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Michael Czigler
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.POSIX:
2+
CC = cc
3+
CFLAGS = -W -O
4+
PREFIX = /usr/local
5+
LDLIBS = -lm
6+
ALL_LDFLAGS = $(LDFLAGS) $(LIBS) -lxcb -lxcb-keysyms
7+
8+
all: xwm
9+
install: all
10+
mkdir -p $(DESTDIR)$(PREFIX)/bin
11+
mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
12+
cp -f xwm $(DESTDIR)$(PREFIX)/bin
13+
cp -f xwm.1 $(DESTDIR)$(PREFIX)/share/man/man1
14+
chmod 755 $(DESTDIR)$(PREFIX)/bin/xwm
15+
chmod 644 $(DESTDIR)$(PREFIX)/share/man/man1/xwm.1
16+
xwm: xwm.o
17+
$(CC) $(ALL_LDFLAGS) -o xwm xwm.o $(LDLIBS)
18+
xwm.o: xwm.c xwm.h config.h
19+
clean:
20+
rm -f xwm *.o
21+
uninstall:
22+
rm -f $(DESTDIR)$(PREFIX)/bin/xwm
23+
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/xwm.1
24+
.PHONY: all install uninstall clean

README

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
xwm - a tiny XCB floating window manager
2+
3+
FEATURES
4+
========
5+
6+
* Few features (just works)
7+
* Extensible & configurable
8+
* Focus follows mouse
9+
10+
BUILD REQUIREMENTS
11+
==================
12+
13+
Other than libxcb, xwm also uses several default utilities which can be
14+
patched or configured to the users preference.
15+
16+
application launcher dmenu - https://git.suckless.org/dmenu
17+
terminal emulator st - https://git.suckless.org/st
18+
internet browser surf - https://git.suckless.org/surf
19+
20+
COMMANDS
21+
========
22+
23+
Implemented commands are limited.
24+
Win+Button1+[drag] interactive window move
25+
Win+Button3+[drag] interactive window resize
26+
Win+Space run launcher menu (default: dmenu_run)
27+
Win+Enter create new terminal window (default: st)
28+
Win+Shift+q quit window manager
29+
30+
INSTALL
31+
=======
32+
33+
Building and installing from source:
34+
git clone https://github.com/mcpcpc/xwm
35+
cd xwm
36+
make
37+
sudo make install
38+
39+
Building and installing on KISS Linux:
40+
kiss b xwm
41+
kiss i xwm
42+
43+
EXAMPLES
44+
========
45+
46+
Check your xwm installed version:
47+
xwm -v
48+
49+
Usimg startx to run xwm:
50+
echo "exec xwm" > ~/.xinitrc
51+
startx
52+
53+
Using xsetroot to set a solid background color:
54+
xsetroot -solid red
55+
56+
Using imagemagick and a shell script to set a wallpaper:
57+
curl -L -o bud https://bit.ly/38aAmDt
58+
chmod +x bud
59+
install bud /usr/bin/
60+
bud ~/path/to/wallpaper/directory/
61+
62+
CONTACT
63+
=======
64+
65+
For questions or issues, please contact info[at]mcpcpc[dot]com.
66+

TODO

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* Fix minimum window size
2+
* Add close window command (e.g. Win+q)
3+
* Use library call instead of execvp()

config.h

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* default xwm super keys*/
2+
#define MOD1 XCB_MOD_MASK_4 /* mod key 1=Alt, 4=Start */
3+
#define MOD2 XCB_MOD_MASK_SHIFT /* shift key */
4+
5+
/* shortcut commands */
6+
static char * termcmd[] = { "st", NULL };
7+
static char * menucmd[] = { "dmenu_run", NULL };
8+
static char * browcmd[] = { "surf", NULL };
9+
10+
/* shortcut keys */
11+
static Key keys[] = {
12+
{ MOD1, 0x0062, spawn, browcmd },
13+
{ MOD1, 0xff0d, spawn, termcmd },
14+
{ MOD1, 0x0020, spawn, menucmd },
15+
{ MOD1, 0x0071, killclient, NULL },
16+
{ MOD1|MOD2, 0x0071, closewm, NULL }
17+
};
18+

xwm.1

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.\" Manpage for xwm.
2+
.TH XWM 1 "NOVEMBER 2020" Linux "User Manuals"
3+
.SH NAME
4+
xwm \- a tiny XCB floating window managers
5+
.SH SYNOPSIS
6+
.B xwm [-v]
7+
.SH DESCRIPTION
8+
.B xwm
9+
is a tiny floating window manager implemented using
10+
the XCB protocol. Other than
11+
.BR libxcb (1),
12+
xwm also specifies third-party utilitiies for command
13+
alias, including the
14+
.BR surf (1)
15+
web browser,
16+
.BR st (1)
17+
terminal emulator and
18+
.BR dmenu (1)
19+
application launcher. Defaults for these command
20+
aliases can be configured or patched to the user's
21+
preference.
22+
.SH OPTIONS
23+
.IP -v
24+
Prints the current xwm version.
25+
.SH BUGS
26+
No known bugs.
27+
.SH AUTHOR
28+
Michael Czigler <info[at]mcpcpc[dot]com>
29+
.SH "SEE ALSO"
30+
.BR livxcb (1),
31+
.BR st (1),
32+
.BR surf (1),
33+
.BR dmenu (1)

0 commit comments

Comments
 (0)