Re: [i3] binding the same key to revert the command?
Elaborating on Ingo's hints: Something like this could be used to not to have to maintain the state somewhere on disk: === #!/usr/bin/env bash process_name=$1 for pid in $(pgrep --exact $process_name); do # Assumes there is no space in the command name if awk '$3=="T"{exit 1}' /proc/$pid/stat 2>/dev/null then kill -SIGCONT $pid else kill -SIGKILL $pid fi done === Kind regards, Joep Ingo Bürk schreef op 2015-11-08 10:30: Hi, one possible solution: save the following as /some/path/stopcont.sh and bind bindsym $mod+p exec --no-startup-id /some/path/stopcont.sh Script: === #!/usr/bin/env bash PROCESS=${1} FILE="/tmp/${PROCESS}.signal" if [[ -f "${FILE}" ]]; then rm ${FILE} pkill -SIGCONT ${PROCESS} else touch ${FILE} pkill -SIGSTOP ${PROCESS} fi === This will, of course, assume that the process isn't paused by anything else as that would make it go out of sync. A better and more robust way would be to write the script such that it instead uses the information of /proc//stat to check whether the process is currently paused. If you use a higher-level language such as Python, you can do this nicely instead of manually parsing the output. See [1] for some more information. [1] http://stackoverflow.com/questions/6021771/is-there-a-way-to-determine-if-a-linux-pid-is-paused-or-not Ingo On 11/08/2015 04:16 AM, Zenny wrote: Hi, I am trying to use a keybinding to pause a process temporily, bindsym $mod+p exec pkill -SIGSTOP But I could not figure out how to make pressing to same keybinding to restart the process? Currenlty I am using, bindsym $mod+c exec pkill -SIGCONT Instead, I want something like re-pressing $mod+p executes pkill -SIGCONT . Thanks! /z
Re: [i3] i3 does not swallow title correctly
Hi Dave, Heuristic number one: If you have an issue with i3, and flash is involved, it is not an issue with i3. Can you show the problem with i3-sensible-terminal (specify which)? Also, judging from your email address and disclaimer, you are probably building some multimonitor drone control high precision WMD kill interface. Just for your information, i3 is really not suited for that. dwm is really more oriented towards those type of purposes. Cheers, Joep On Mon, 29 Sep 2014 18:36:40 + Sargrad, Dave dave.sarg...@saabsensis.com wrote: Xprop shows the following for the window that is not getting swallowed correctly: WM_STATE(WM_STATE): window state: Normal icon window: 0x0 WM_HINTS(WM_HINTS): Client accepts input or input focus: True Initial state is Normal State. bitmap id # to use for icon: 0x27b bitmap id # of mask for icon: 0x27c window id # of group leader: 0x201 WM_WINDOW_ROLE(STRING) = browser XdndAware(ATOM) = BITMAP _MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0 _NET_WM_ICON(CARDINAL) =Icon (16 x 16): âââ ââ ââ â âââ â âââ â âââ â ââ âââ ââ ââ Icon (32 x 32): ââ â â ââ â ââ â ââ ââ ââ âââ â ââ â ââ ââ â â â âââ âââ ââ â âââ ââ ââ Icon (48 x 48): ââ ââ âââ â âââ â â ââ ââ âââ â â ââ ââ ââ âââ â â ââ âââ â ââ âââ â ââ âââ â ââ âââ ââ âââ ââ âââ ââ âââ ââ ââ ââ âââ ââ âââ â ââ â âââ âââ â â âââ â ââ âââ â ââ
Re: [i3] How to move workspace by name to a given named output
On Mon, 22 Sep 2014 12:37:20 + Sargrad, Dave dave.sarg...@saabsensis.com wrote: i3-msg move workspace 6 to output DVI-I-3 (...) U.S. International Traffic in Arms Regulations Maybe inquire the ballistics department? Kind regards, Joep
Re: [i3] [Ticket 591] Killing workspaces does not work.
Hello Layus, On Sat, 12 Jan 2013 14:11:02 +0100 Layus layus...@gmail.com wrote: As I know that it is not frequently checked, I post something here too. I have the following link in my feed reader: http://bugs.i3wm.org/query/report/2?asc=1format=rss It also updates with a new comment (though the comment itself does not get included, anyone found a better link?). Kind regards, Joep
Re: [i3] i3 and xdotools
Hi Szymon, not sure why xdotools would not work, but there are i3-specific solutions to your use case. Have a look at http://faq.i3wm.org/question/228/how-do-i-find-an-app-buried-in-some-workspace-by/ Cheers, Joep On Fri, 21 Dec 2012 19:24:49 +0100 Szymon Olewniczak szymon.olewnic...@rid.pl wrote: Hi, I asked this question on the irc but noone can help me. So I decided to ask this on the mailing list and add more details. Xdotool is very useful software that allows you to automatize common tasks running on the X windows. It's home page is: http://www.semicomplete.com/projects/xdotool/ My problem begins when I want to use xdotool -search which is one of the most important xdotool feature. When I run any xdotool command with search: xdotool search - Vimperator windowactivate I getting the following error msg: XGetWindowProperty[_NET_WM_DESKTOP] failed (code=1) It's probably the xdotool issue according to(https://groups.google.com/forum/?fromgroups=#!topic/xdotool-users/UjChQlByTno) but since I don't know how x is implemented I'm not sure if this issue can be easy overcome. If you know how to use xdotool with i3 or you know why it cannot be used with i3, please let me know.
[i3] Fw: RFC: i3-dmenu-desktop
Begin forwarded message: Date: Sat, 15 Dec 2012 01:32:29 +0100 From: Joep van Delft joepvande...@xs4all.nl Wrongly assumed that clicking 'Reply' would go to the list. Cheers, joepd To: Michael Stapelberg mich...@i3wm.org Subject: Re: [i3] RFC: i3-dmenu-desktop Hallo Michael, On Fri, 14 Dec 2012 21:34:09 +0100 Michael Stapelberg mich...@i3wm.org wrote: In fact, the script is i3-specific. It starts applications via i3 to correctly use startup notifications. Fair enough. Ship it, make it default, enforce it, enlighten the masses :) Suggestion for key-combo: Use $mod+p (for program). As it provides access to Programs, in stead of dmenu_run. (I bound it to $mod+Shift+P, the complete and fancy version of $mod+p, which provides access to often used programs, for example pavucontrol on the machine that is wired to amplifiers) This probably is a question more suited for the FAQ, but how do you (plural) keep appearances and settings consistent with multiple and separate dmenu-commands? Cheers, Joep
Re: [i3] RFC: i3-dmenu-desktop
Hi there, Just replaced my hotkey to dmenu_run to i3-dmenu-desktop, as it for sure is more useful. In my experience, starting the [-command from dmenu_run retains bad karma at least until the next reboot. Maybe it would better to not name it after our beloved window manager, as, imho, it sucks less than dmenu_run. Why not try and get it distributed from over there? Cheers, joepd On Sun, 09 Dec 2012 17:10:38 +0100 Michael Stapelberg mich...@i3wm.org wrote: Hi, I have written a script which extracts the “Name” key from .desktop files, asks you to make a choice by starting dmenu, then runs the chosen application via i3. You can read more about it in its documentation at http://code.stapelberg.de/git/i3/tree/contrib/i3-dmenu-desktop?h=next#n375 From the commit message: See pod2man --utf8 contrib/i3-dmenu-desktop | man /dev/stdin for documentation. Use a line like this in your i3 config file: bindsym Mod1+p exec --no-startup-id ~/i3/contrib/i3-dmenu-desktop I would love to hear your comments about this. Do you find it useful or not, and why? I am toying with shipping this with i3 (as in: installing it on the system so that it ends up in packages) and making it the default instead of just using dmenu_run. Thoughts?
Re: [i3] firefox stealing focus on startup
For what it's worth, an answer that bypasses your question: For most of my browsing tasks, I use dwb (http://portix.bitbucket.org/dwb/) nowadays. I figured that I prefer to have my window manager to take care of window/tab management over some inconsistent and extraneous implementation. There are some rough edges with sharing cookies among different instances of the browser and sharing history etc., but those are most likely due to part of my lack of interest to configure it correctly. Cheers, Joep On Thu, 04 Oct 2012 19:08:55 +0200 Oliver Kiddle okid...@yahoo.co.uk wrote: Michael Stapelberg wrote: It should only be able to grab focus when it’s on a visible workspace. If it happens when firefox is invisible, that’s not with i3’s help, so nothing we can do about it. I've got a two monitor setup and assign Firefox to start on one of them. So it is often on a visible workspace when I start it. Maybe this helps, though? http://www.techsupportalert.com/content/how-stop-firefox-stealing-window-focus.htm That only helps for the case when I open a URL in an existing firefox such as by clicking on one in my e-mail. Thanks for the pointer though as that does help a bit. Oliver
Re: [i3] How to report a bug explained?
On Wed, 20 Jun 2012 22:13:05 +0200 Michael Stapelberg mich...@i3wm.org wrote: Hi Bruno, Quoting BRAGA, Bruno (2012-06-20 07:43:21) But I felt a bit discouraged to report bugs because of lack of feedback (many of them without response or follow up). Maybe there is a resource problem, and I totally understand that, but it would be nice to receive any type of feedback (even a hell, we don't care about that would be fine). :-) Ugh, I’m terribly sorry. This was one of the things I could do easily when the project was still small and I had a lot more time. Lately I need to focus on my studies, so I can’t answer to every ticket in a reasonable timeframe. Sure thing. Respect and appreciation to the time you manage to put in. I’m uncertain whether a ticket status A human skimmed over your ticket and it’s not total bullshit would make things any better. Any comments? You are blazingly fast when something pops up on the irc channel. If it were possible, it would probably be better to increase the lag on irc, for the sake of being a bit faster on the bug reports. I don't know for real, but the people who report something have put a bit more effort in it. But, there is this saying in my language: The best sailors are standing ashore :) I could join a bug triaging party on irc on some lazy sunday, but be aware that my participation will possibly cost more time than it will gain :) Cheers, joepd
Re: [i3] Predefined Layouts
You can also separate the commands with a : i3-msg split h \ i3-msg exec urxvt \ i3-msg exec urxvt \ i3-msg split v \ i3-msg exec urxvt joep On Wed, 25 Apr 2012 17:17:53 +1000 James Robertson j...@mesrobertson.com wrote: Use: i3-msg split h i3-msg exec urxvt i3-msg exec urxvt i3-msg split v i3-msg exec urxvt That doesn't work and it simply opens 3 terminals vertically for me. I had a hunch that it was executing faster than urxvt could load and so added some sleeps as follows: i3-msg split h i3-msg exec urxvt sleep 1 i3-msg exec urxvt sleep 1 i3-msg split v i3-msg exec urxvt This works exactly as intended and the terminals are loaded in the right positions, albeit slowly... The following is logged when I run the command with the sleeps: Apr 25 17:09:46 sidbox x-session: should execute /tmp/foo.sh, no_startup_id = 0 Apr 25 17:09:46 sidbox x-session: single command completely parsed, dropping state... Apr 25 17:09:46 sidbox x-session: done, json output = (null) Apr 25 17:09:46 sidbox x-session: splitting in direction h Apr 25 17:09:46 sidbox x-session: single command completely parsed, dropping state... Apr 25 17:09:46 sidbox x-session: done, json output = (null) Apr 25 17:09:46 sidbox x-session: {success:true} Apr 25 17:09:46 sidbox x-session: anything else: *u* Apr 25 17:09:46 sidbox x-session: should execute urxvt, no_startup_id = 0 Apr 25 17:09:46 sidbox x-session: single command completely parsed, dropping state... Apr 25 17:09:46 sidbox x-session: done, json output = (null) Apr 25 17:09:46 sidbox x-session: {success:true} Apr 25 17:09:47 sidbox x-session: anything else: *u* Apr 25 17:09:47 sidbox x-session: should execute urxvt, no_startup_id = 0 Apr 25 17:09:47 sidbox x-session: single command completely parsed, dropping state... Apr 25 17:09:47 sidbox x-session: done, json output = (null) Apr 25 17:09:47 sidbox x-session: {success:true} Apr 25 17:09:48 sidbox x-session: splitting in direction v Apr 25 17:09:48 sidbox x-session: single command completely parsed, dropping state... Apr 25 17:09:48 sidbox x-session: done, json output = (null) Apr 25 17:09:48 sidbox x-session: {success:true} Apr 25 17:09:48 sidbox x-session: anything else: *u* Apr 25 17:09:48 sidbox x-session: should execute urxvt, no_startup_id = 0 Apr 25 17:09:48 sidbox x-session: single command completely parsed, dropping state... Apr 25 17:09:48 sidbox x-session: done, json output = (null) Apr 25 17:09:48 sidbox x-session: {success:true} Apr 25 17:09:49 sidbox x-session: single command completely parsed, dropping state... Apr 25 17:09:49 sidbox x-session: done, json output = (null) Without the sleeps... Apr 25 17:11:49 sidbox x-session: should execute /tmp/foo.sh, no_startup_id = 0 Apr 25 17:11:49 sidbox x-session: single command completely parsed, dropping state... Apr 25 17:11:49 sidbox x-session: done, json output = (null) Apr 25 17:11:49 sidbox x-session: splitting in direction h Apr 25 17:11:49 sidbox x-session: single command completely parsed, dropping state... Apr 25 17:11:49 sidbox x-session: done, json output = (null) Apr 25 17:11:49 sidbox x-session: {success:true} Apr 25 17:11:49 sidbox x-session: anything else: *u* Apr 25 17:11:49 sidbox x-session: should execute urxvt, no_startup_id = 0 Apr 25 17:11:49 sidbox x-session: single command completely parsed, dropping state... Apr 25 17:11:49 sidbox x-session: done, json output = (null) Apr 25 17:11:49 sidbox x-session: {success:true} Apr 25 17:11:49 sidbox x-session: anything else: *u* Apr 25 17:11:49 sidbox x-session: should execute urxvt, no_startup_id = 0 Apr 25 17:11:49 sidbox x-session: single command completely parsed, dropping state... Apr 25 17:11:49 sidbox x-session: done, json output = (null) Apr 25 17:11:49 sidbox x-session: {success:true} Apr 25 17:11:49 sidbox x-session: splitting in direction v Apr 25 17:11:49 sidbox x-session: single command completely parsed, dropping state... Apr 25 17:11:49 sidbox x-session: done, json output = (null) Apr 25 17:11:49 sidbox x-session: {success:true} Apr 25 17:11:49 sidbox x-session: anything else: *u* Apr 25 17:11:49 sidbox x-session: should execute urxvt, no_startup_id = 0 Apr 25 17:11:49 sidbox x-session: single command completely parsed, dropping state... Apr 25 17:11:49 sidbox x-session: done, json output = (null) Apr 25 17:11:49 sidbox x-session: {success:true} I cannot make out any difference except the execution delay between them. Is there anything I can do to troubleshoot this? Thanks