-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update st to latest upstream #11
Open
ianbeyst
wants to merge
135
commits into
michaelforney:wayland
Choose a base branch
from
ianbeyst:wayland-split
base: wayland
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CTRL+SHIFT is an impossible combination in the terminal world (0x20 | x & 0x1F), so it is perfect to be used for internals shortcuts of terminals, and being a double combination reduces the prossibility of having comflicts.
This is used by, e.g., tmux.
st currently does not keep any mode for the cursor that was active in the underlying glyph (e.g. italic text), the mode is always ATTR_NULL [1]. At [2] you can find a screenshot that shows the implications. Other terminals (at least vte-based, such as XFCE-terminal) keep some modes for the cursor. I find the current behaviour very disruptive, so here is a patch that keeps a few (arbitrarily chosen) modes for the cursor. [1] http://git.suckless.org/st/tree/st.c#n3963 [2] http://i.imgur.com/R2yCEaC.png
Thanks to tarug0 for the suggestion/patch.
Attached. ===> 2/ (text/x-patch) [file] cp /mail/fs/mbox/298/2/body /usr/k0ga/0001-st.1-modify-man-page-to-accurately-reflect-default-k.patch From 265db94b1eca5850d484f86b7db4af8e57822cfe Mon Sep 17 00:00:00 2001 From: Greg Reagle <[email protected]> Date: Sun, 9 Apr 2017 23:05:47 -0400 Subject: [PATCH] st.1: modify man page to accurately reflect default keybindings
Change some styling too while we're at it.
This reverts commit 6cb6d61. This wasn't a useful thing after all.
This reverts commit 77c51c5. Having multiple clipboards are useful, for example for plumber scripts. I've discussed this on IRC and it is useful to have.
This reverts commit 7f99032. this was wrong as pointed out by k0ga: "STLDFLAGS is about flags to the linker, for example -L not about -l for that reason it must go before the object list".
Non-printable characters, such as line breaks, in a base64 encoded string violate the "string length must be a multiple of four" rule. This patch pads the result buffer by one extra unit of four bytes, and skips over non-printable characters found in the input string.
This reverts commit 274d46a. Sorry, the original commit was correct after all. It allows has the correct link order and supports static-linking also. Just a reminder: it is important to give a (brief) rationale of the patch intentions.
Signed-off-by: Paride Legovini <[email protected]>
An example where the new behaviour makes more sense: Suppose some text is formatted with ATTR_FAINT for red for the foreground, so it is rendered in a dark red. In that case, when selected with the mouse, the intended behaviour is that foreground and background color are swapped: so the selection should be rendered in dark red and the text in the default background color. Before this patch, what happened was that the selection would be in normal red and the text in the darkened background color, making it almost unreadable. For an example application that uses the FAINT attribute, try dmesg from util-linux with color support, it uses FAINT for segfault messages.
The alpha value needs to be initialized as well.
config.h includes references to KeySyms and other X stuff. Until we come up with a cleaner way to separate configuration, it is simpler (leads to more code removal) to have this here. Signed-off-by: Devin J. Pohly <[email protected]>
No need to keep a function that only calls another function in the same file. Signed-off-by: Devin J. Pohly <[email protected]>
These were only used in x.c, which now has direct visibility of the config.h arrays. Signed-off-by: Devin J. Pohly <[email protected]>
This makes xsetenv internal to x.c, and allows iso14755's external command to use $WINDOWID instead of having to snprintf it again. (The same benefit will apply to the externalpipe patch.) The xwinid function is no longer needed. Signed-off-by: Devin J. Pohly <[email protected]>
This has been asked many times on IRC and the mailinglist. Make it easier to find information about this particular Xft issue by adding it to the FAQ.
Also fix shell return value detection.
st is now usable on velox/swc. Before, it gave a segfault on startup.
To prevent contaminating the already existing x11 st on my system.
To partially harmonize with michaelforney's st patch at https://github.com/michaelforney/oasis/blob/master/pkg/st/patch/0001-Port-to-wayland-using-wld.patch
crude first steps to move the wayland stack to a state where it becomes easy to track upstream st. Most wayland related functions are separated out and the program compiles and runs. Further work is needed to flesh out bugs, clean up the messy code and eventually merge with upstream.
A lot of functions called in st.c were prepended by "wl" to differentiate them from their "x" counterparts, eg xclipcopy -> wlclipcopy. These are all renamed to be prepended with "x" to ease merging. In the future, st should move to neutral terminology here.
…ugfixes There was an issue where the surface never gets drawn if xstartdraw returns the window visibility mode that was temporarily fixed by always returning 1. This has been fixed by simply initializing win.mode to MODE_VISIBLE. Also removed the useless wl.vis attribute.
Thanks a lot for doing this! I will take a look when I find some time. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I spent the past few days hacking around a bit to update your wayland version to the latest upstream st version (and also stable xdg-shell). For me it was mostly an educational project (I'm not very experienced with C) and I might have broken a thing or two, but I couldn't find any regressions and it seems to work fine.
The st.c file is mostly identical to upstream st and it uses the exact same "API" to talk to wl.c as the X version uses to talk to x.c, except for two function calls in st.c to set the "needdraw" variable in wl.c, these should also be avoided and be moved into wl.c. I'm also not at all happy about the naming of the "API" and general tidyness of the code but nothing insurmountable. In short, it still needs some work but it's a start.
I put up the pull request in the state it is because I won't have much time in the short term to work on this anymore, but maybe it's interesting or useful to you or suckless.