Code Monkey home page Code Monkey logo

i3-extras's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

i3-extras's Issues

i3bar-xbm-icons press offset

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;

i3bar-xbm-icons.patch no longer works with i3 v4.12

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

Does it work with recent i3-py from pip?

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

Smart Borders exists in main repro

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

Notes on cwd-exec.patch

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.

Icon coloring does not work

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);

interested in surface focus mode? it neatly solves the stack/tab swamps problem

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.

i3-desktop.patch

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

i3lock-wrapper cannot specify --inactivity-timeout

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

i3-exit needs to be ported to python 3

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().

window-icons.patch no longer applies on i3-4.18

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:

Why depend on scrot if you already require imagemagick for `convert`?

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.

i3-for-quickswitch

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.

Ways to debug i3bar with icon patches?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.