ashinkarov / i3-extras Goto Github PK
View Code? Open in Web Editor NEWRepository to keep patches and extras for i3 window manager.
Repository to keep patches and extras for i3 window manager.
because of solving a crash problem of scratchpad i upgraded to i3-4.12,
managed to merge and install the window-icons.patch to i3 version 4.12 with small tinkering.
window-icons-4.12.patch.zip
But the app icon does not appear
Hello there,
I just created an AUR package for i3lock-wrapper. I would appreciate if you could point to it in the README.
Thanks
when using press on bar there is an offset of pressed item
something like this fixing it
--- i3-4.8.orig/i3bar/src/xcb.c 2014-06-15 21:12:43.000000000 +0400
+++ i3-4.8/i3bar/src/xcb.c 2014-07-06 14:13:04.006637305 +0400
@@ -355,6 +393,10 @@
last_block_x = block_x;
block_x += block->width + block->x_offset + block->x_append;
+ /* Add icon width */
+ if (block->icon)
+ block_x += block->icon->width + 5;
+
if (x <= block_x && x >= last_block_x) {
send_block_clicked(event->detail, block->name, block->instance, event->root_x, event->root_y);
return;
Hello,
I don't expect anyone to work on this, just wanted to point out than the latest i3 release breaks the specified patch.
It seems like this time it will require a fair amount of work to rebase it, my attempt to compile i3 with the patch fails with the following errors:
i3bar/src/xcb.c: In function 'draw_statusline':
i3bar/src/xcb.c:299:17: error: incompatible types when initializing type 'unsigned int' using type 'color_t'
i3bar/src/xcb.c:300:47: error: 'statusline_ctx' undeclared (first use in this function)
i3bar/src/xcb.c:300:47: note: each undeclared identifier is reported only once for each function it appears in
i3bar/src/xcb.c:300:17: warning: passing argument 2 of 'xcb_change_gc' makes integer from pointer without a cast [enabled by default]
/usr/include/xcb/xproto.h:11675:1: note: expected 'xcb_gcontext_t' but argument is of type 'uint32_t *'
i3bar/src/xcb.c:302:17: error: incompatible types when initializing type 'unsigned int' using type 'color_t'
i3bar/src/xcb.c:302:17: error: incompatible types when initializing type 'unsigned int' using type 'color_t'
i3bar/src/xcb.c:303:17: warning: passing argument 2 of 'xcb_change_gc' makes integer from pointer without a cast [enabled by default]
/usr/include/xcb/xproto.h:11675:1: note: expected 'xcb_gcontext_t' but argument is of type 'uint32_t *'
i3bar/src/xcb.c:306:34: error: 'statusline_pm' undeclared (first use in this function)
i3bar/src/xcb.c:307:28: warning: passing argument 2 of 'xcb_image_put' makes integer from pointer without a cast [enabled by default]
/usr/include/xcb/xcb_image.h:347:1: note: expected 'xcb_drawable_t' but argument is of type 'uint32_t *'
i3bar/src/xcb.c:307:28: warning: passing argument 3 of 'xcb_image_put' makes integer from pointer without a cast [enabled by default]
/usr/include/xcb/xcb_image.h:347:1: note: expected 'xcb_gcontext_t' but argument is of type 'uint32_t *'
i3bar/src/xcb.c: In function 'draw_bars':
i3bar/src/xcb.c:2080:17: error: 'block' undeclared (first use in this function)
i3bar/src/xcb.c:2080:22: error: request for member 'icon' in something not a structure or union
i3bar/src/xcb.c:2081:56: error: request for member 'icon' in something not a structure or union
i3bar/src/xcb.c:2081:62: error: request for member 'width' in something not a structure or union
i3bar/src/xcb.c:2081:48: warning: assignment makes integer from pointer without a cast [enabled by default]
make[2]: *** [i3bar/src/xcb.o] Error 1
make[2]: Leaving directory `/tmp/buildd/i3-wm-4.10.1'
make[1]: *** [override_dh_auto_build] Error 2
make[1]: Leaving directory `/tmp/buildd/i3-wm-4.10.1'
make: *** [build-stamp] Error 2
Bests
What kind of font are you using in the the following screenshot?
https://github.com/ashinkarov/i3-extras/raw/master/pictures/xbm-icons.png?raw=true
Hello,
when I install i3-py from pip (version 0.6.4) I get the following error:
Traceback (most recent call last):
File "./i3-exit", line 106, in <module>
a = exec_dzen (res)
File "./i3-exit", line 75, in exec_dzen
p = Popen (args, stdin=PIPE, stdout=PIPE)
File "/usr/lib/python2.7/subprocess.py", line 709, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1326, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Just so the next person does not start looking for it:
The patch 'smart borders' for i3 is actually somewhat already in the main i3 package included.
you can use it via the option
hide_edge_borders none|vertical|horizontal|both|smart
As described here:
https://i3wm.org/docs/userguide.html
So need to compile it your self.
Cheers
It is worth noting that the cwd-exec.patch
relies on the path being set (and updated) in the _NET_WM_NAME
property, which has to be configured manually (see for example Bash#Customize title on ArchWiki).
Second note is that :
is used as a delimiter separating the path from other text (e.g. terminal name). As a result, the patch does not work with paths containing the delimiter character.
Final note is for everybody who would think of different approach: One could think that another approach is to find out the PID of the active window and resolve the /proc/<pid>/cwd/
symlink to get the path where new process should be spawned. Unfortunately this does not work because the CWD of the terminal process (parent) remains constant and only the CWD of the shell process (child) changes.
You need to use xcb_change_gc instead of set_font_colors to support custom icon colors.
uint32_t mask = XCB_GC_FOREGROUND | XCB_GC_BACKGROUND;
if (block->icon_color) {
uint32_t values[] = { get_colorpixel(block->icon_color), colors.bar_bg };
xcb_change_gc(xcb_connection, statusline_ctx, mask, values);
}
else {
uint32_t values[] = { colors.bar_fg, colors.bar_bg };
xcb_change_gc(xcb_connection, statusline_ctx, mask, values);
}
instead of
if (block->icon_color)
set_font_colors(statusline_ctx, get_colorpixel(block->icon_color), colors.bar_bg);
else
set_font_colors(statusline_ctx, colors.bar_fg, colors.bar_bg);
patch solving the problem: i3/i3#3859
description about the stack/tab swamp problem: i3/i3#3738
the patch adds the surface
mode for focus
command that allows navigating across stacks and tabs without shuffling them. here is an example of my config that solves the stack/tabs swamp:
bindsym $mod+h focus left surface
bindsym $mod+j focus down surface
bindsym $mod+k focus up surface
bindsym $mod+l focus right surface
bindsym $mod+Mod1+h focus left
bindsym $mod+Mod1+j focus down
bindsym $mod+Mod1+k focus up
bindsym $mod+Mod1+l focus right
bindsym $mod+p focus prev sibling
bindsym $mod+n focus next sibling
a neat side effect of this is that stacks and tabs can now be treated just like tabs, except that stacks are tabs that are visually looking different than tabs.
i3 maintainers actually liked it a lot, and also approved the simplicity of the patch.
but they ended up rejecting the patch simply because some guy named squigz
lied to them about me about some irc drama, and they are ridiculously emotional and blindly trust rumours. the guy squigs
is actually blind, and he used to confuse me with another guy. squigs
actually banned me once thinking that i'm another, and snitched to ops of #weechat
to ban me (but they refused since there were no reasons. only the maintainers of i3 are dumb enough to obey him by believe him. makes me wonder, who is more blind?
this could've easily ended up being in upstream i3, if not for squigs
's lies and the foolish upstream devs that blindly believe in rumours.
Hi, I made a patch to support desktop windows with icons (i.e. with pcmanfm, nautilus and other file managers). It's based on i3 version 4.11. Would you like to add it to the collection?
i3-desktop.patch.zip
Hello,
I am having trouble in setting the "--inactivity-timeout" argument.
For exemple, when I type in my terminal:
i3lock-wrapper -d --inactivity-timeout 10
It return with zsh:
i3lock-wrapper: invalid arguments "10"
while
i3lock -d --inactivity-timeout 10
Works perfectly
scrot
>= 1.0 requires -o
switch to be able to write into already existing temporary files
It throws the next error when I run it:
raceback (most recent call last):
File "i3-exit.py", line 106, in <module>
a = exec_dzen (res)
File "i3-exit.py", line 80, in exec_dzen
print >>p.stdin, msg
TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.BufferedWriter'. Did you mean "print(<message>, file=<output_stream>)"?
The script is using print >> instead of print().
0x2493's bitbucket seems to have been deleted along with their github. I don't know where to find these patches now.
The last version this patch worked with was with i3-4.15. Since then, it looks like there have been refactors done to parts of the code that the patch modifies, and it no longer applies.
patching file include/atoms_rest.xmacro
patching file include/data.h
Hunk #1 FAILED at 440.
1 out of 1 hunk FAILED -- saving rejects to file include/data.h.rej
patching file include/libi3.h
Hunk #1 succeeded at 613 (offset 27 lines).
patching file include/window.h
Hunk #1 succeeded at 95 (offset 6 lines).
patching file libi3/draw_util.c
Hunk #1 FAILED at 135.
1 out of 1 hunk FAILED -- saving rejects to file libi3/draw_util.c.rej
patching file src/handlers.c
Hunk #1 succeeded at 1276 (offset -11 lines).
Hunk #2 succeeded at 1310 (offset -11 lines).
Hunk #3 succeeded at 1333 (offset -11 lines).
patching file src/manage.c
Hunk #1 succeeded at 121 (offset 30 lines).
Hunk #2 succeeded at 194 with fuzz 2 (offset 30 lines).
Hunk #3 FAILED at 180.
Hunk #4 FAILED at 188.
2 out of 4 hunks FAILED -- saving rejects to file src/manage.c.rej
patching file src/render.c
Hunk #1 succeeded at 96 (offset -29 lines).
patching file src/window.c
Hunk #2 succeeded at 465 (offset 99 lines).
patching file src/x.c
Hunk #1 succeeded at 615 with fuzz 2 (offset 52 lines).
Hunk #2 FAILED at 590.
Hunk #3 FAILED at 629.
2 out of 3 hunks FAILED -- saving rejects to file src/x.c.rej
Attached are the .rej
files in question:
Since you already have imagemagick
you should have both convert
and import
. You can easily use import
in place of scrot
with a line like import -window root $file1 < /dev/null
. The < /dev/null
bit is there because import can also be used to click and drag to collect only a portion of the screen, but with -window root
we are getting the entire current desktop.
I've been using this myself since I didn't want to mess with scrot and it seems possibly slightly faster, but probably a false impression.
With newer versions of scrot -z doesn't exist anymore. I tried googling for a older man page to see what the option was for, but was unable to find one.
Using scrot 0.8.4
Found this patch on my drive. Maybe will not work now due to patch age.
https://dl.dropboxusercontent.com/u/54969696/l/tiny-bar.diff
0x2493 has migrated to Bitbucket, so the link to i3-patches repository is now https://bitbucket.org/0x2493/i3-patches
The current link leads to a 404 error.
i3lock has removed the option to have it control the display with the --dpms option, so it should be removed as an option to the i3lock-wrapper script.
The version of the patch does not work with the new i3 version
Hello! I am the new maintainer for i3-for-quickswitch (see fork graph.) Slowpoke mailed me ages ago about it but didn't put up any info in his readme. Anyway, even if you don't use it, would be cool if you wanted to change the link in your readme.
Hello,
I've been using the xbm patch for a while and it's been working pretty good for the last 4-6 months, however today, after rebooting the machine they stopped appearing. I've not update neither the status_command logic nor the i3 patched version but the general OS (ubuntu 12.04, it could be an update in the X stack?) so I really have no idea what happened. Reading i3-dump-log doesn't help a lot, so I was wondering what are your techniques to debug i3bar and i3.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.