You are not logged in.
I'm using a conky-json configuration and this is more about json than either of the two. I am attempting to get rid of as much whitespace between my json lines while still maintaining readability. For example this is a portion of my configuration.
{ "full_text" : "C:" , "separator" : false , "color" : "\#ededed" }, { "full_text" : "${cpu cpu0}%" , "separator" : false , "color" : "\#d31717" }, { "full_text" : "M:" , "separator" : false , "color" : "\#ededed" }, { "full_text" : "${memperc}%" , "separator" : false , "color" : "\#d31717" }, { "full_text" : "B:" , "separator" : false , "color" : "\#ededed" },
The output ends up looking like as it does in the following screenshot.
http://i.imgur.com/1MLgcUC.png
In comparison, the json above has no white space between the characters but when rendered there are whitespaces in the locations where the code is written on a new line. Is there a json definition i'm missing so I can omit the extra whitespace?
Try adding '\' at the end of each line, right after the coma.
Offline
I've got an sh script that handles locking the screen, how can I set it to run when I shut the lid?
Offline
I've got an sh script that handles locking the screen, how can I set it to run when I shut the lid?
This unit should do the trick, in /etc/systemd/system/screen_lock.service
[Unit]
Description=Lock the screen
Before=sleep.target
User=$YOU
Type=simple
Environment=DISPLAY=:0
ExecStart=/path/to/screen_lock/script
[Install]
WantedBy=sleep.target
That comes from the wiki somewhere
Offline
hippieben wrote:I've got an sh script that handles locking the screen, how can I set it to run when I shut the lid?
This unit should do the trick, in /etc/systemd/system/screen_lock.service
[Unit] Description=Lock the screen Before=sleep.target User=$YOU Type=simple Environment=DISPLAY=:0 ExecStart=/path/to/screen_lock/script [Install] WantedBy=sleep.target
That comes from the wiki somewhere
Some issues here...
[ben@benjamindaines system]$ systemctl status -l i3lock
● i3lock.service - Lock the screen
Loaded: loaded (/etc/systemd/system/i3lock.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2015-08-27 12:44:03 EDT; 1min 35s ago
Process: 7830 ExecStart=/home/ben/Documents/i3/lock.sh (code=exited, status=1/FAILURE)
Main PID: 7830 (code=exited, status=1/FAILURE)
CGroup: /system.slice/i3lock.service
Aug 27 12:44:03 benjamindaines lock.sh[7830]: convert: unable to open image `lockbg.png': No such file or directory @ error/blob.c/OpenBlob/2695.
Aug 27 12:44:03 benjamindaines lock.sh[7830]: convert: unable to open file `lockbg.png' @ error/png.c/ReadPNGImage/3913.
Aug 27 12:44:03 benjamindaines lock.sh[7830]: convert: unable to open image `lock.png': No such file or directory @ error/blob.c/OpenBlob/2695.
Aug 27 12:44:03 benjamindaines lock.sh[7830]: convert: unable to open file `lock.png' @ error/png.c/ReadPNGImage/3913.
Aug 27 12:44:03 benjamindaines lock.sh[7830]: convert: no images defined `lockfinal.png' @ error/convert.c/ConvertImageCommand/3230.
Aug 27 12:44:03 benjamindaines lock.sh[7830]: Could not load image "lockfinal.png": file not found
Aug 27 12:44:03 benjamindaines lock.sh[7830]: rm: cannot remove ‘lockfinal.png’: No such file or directory
Aug 27 12:44:03 benjamindaines systemd[1]: i3lock.service: Main process exited, code=exited, status=1/FAILURE
Aug 27 12:44:03 benjamindaines systemd[1]: i3lock.service: Unit entered failed state.
Aug 27 12:44:03 benjamindaines systemd[1]: i3lock.service: Failed with result 'exit-code'.
[Unit]
Description=Lock the screen
Before=sleep.target
[Service]
User=ben
Type=simple
Environment=DISPLAY=:0
ExecStart=/home/ben/Documents/i3/lock.sh
[Install]
WantedBy=sleep.target
#!/bin/bash
scrot 'lockbg.png' -e 'convert -resize 20% -fill "#282828" -colorize 50% -blur 0x1 -resize 500% $f lockbg.png';
convert -gravity center -composite lockbg.png lock.png lockfinal.png;
i3lock -u -i lockfinal.png;
rm lockfinal.png lockbg.png lockbg.png;
exit;
The script does work when executed normally.
EDIT: I changed the script with absolute paths rather than assuming it will be run within the directory, and it works... however it only shows for a few seconds before i3lock is killed without the user needing to enter the password.
DOUBLE EDIT: Ok, I fixed it now. Removed the rm line and exit lines from the script. Also made the Unit type forking (not sure if this is actually required, but it was part of my experimentation and things work now.
Thanks for your help.
Last edited by hippieben (2015-08-27 17:02:28)
Offline
I'm attempting to pipe some conky content to i3blocks, I hope this is a good place to ask, but I am running into problems getting the output to appear in i3bar. Funny thing is that I can pipe conky content to lemonbar just fine. For example this configuration outputs exactly as intended to lemonbar.
background no
out_to_console yes
out_to_x no
update_interval 1.0
total_run_times 0
TEXT
CPU ${cpu cpu0}% MEM ${memperc}%
Now when I add my command to my i3blocks.conf it doesn't display anything at all.
[mem]
label=
command=conky -c .i3block.conky
interval=5
[/mem]
Is there something I am missing here? Perhaps an unspecified configuration in conky, or a modification to my command. I imagine i3blocks should be able to handle this, and im curious if anyone is able to pipe conky to i3blocks. Thanks!
EDIT: Well after a bit of research it looks like i3blocks doesn't accept conky input. A bit of a bummer so I better get to writing a script then.
Last edited by barefly (2015-08-28 20:35:08)
Offline
IS it possible to have 10 workspace numbers visible in menubar no matter if its empty or not ?
Last edited by lounge (2015-08-29 15:08:11)
Offline
Hey all. How do I switch the time format to be 12 hours instead of 24?
Offline
Suspecting you are using i3status? Change the time format from %H to %I in your config file. If you are still using the default one, copy it and then edit it. The time format should apply to other status programs like conky, ... as well.
See man i3status and man date for additional info
Offline
Hey all. How do I switch the time format to be 12 hours instead of 24?
Check out:
man i3status
and
man strftime
Edit: I'm getting slow
Last edited by ewaller (2015-09-07 22:50:57)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
man date for all the format's. and then edit tztime local in /etc/i3status.conf.
late to the punch I didnt know about strftime.
Last edited by bleach (2015-09-07 23:01:55)
Offline
Ah, thanks you three!! And @karlch, yes I am using i3status, and I'll keep that in mind for conky and others . I just installed i3 today and am getting the hang of it. Thanks for suggesting man strfime, ewaller. I need to learn these man pages xD
Last edited by Alkaiser (2015-09-08 04:25:21)
Offline
Hello, new i3 user since yesterday.
I'm using i3pystatus now, how can I make it update less often?
Also is it possible to change the update time per item in the bar?
If not, what would be a good alternative for i3pystatus?
Offline
I am running Arch on a Surface Pro 1, pretty new so I am still working on getting things hammered out quite how I like them to be. Anyways, was running Plasma but it felt a little too much like I was running back to Windows.
Anways, I got turned onto i3 and I haven't looked back, just having a bit of an issue with the dual displays. Everything I have read says that it should display workspace 1 on the first monitor and workspace 2 on the second monitor but all that is happening is I get twin displays. This thing doesn't have an Nvidia video card
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
Subsystem: Microsoft Corporation Device 0166
Kernel driver in use: i915
but I updated the driver anyways in just like the "fix" says to do (in case there was something in the background that the update would fix) and of course, no change. I tried using this command:
xrandr --output HDMI1 --auto --left-of LVDS1
Now this split the screens up finally but I was unable to use any commands to move a workspace to the second monitor, I even used a keybind command that moves the workspace to the next display and another that simply forces a container to that output.
#Moves workspace to the next display
bindsym $mod+m move workspace to output right
#moves container to the specified output
bindsym $mod+x move container to output LVDS1
The blank display did not have an i3bar at the bottom and did not show a workspace number in the bottom left, the only interaction I could have with it is to move my mouse over to it. After tinkering around for a while I found that if I created a second workspace while in twin mode, and then used the above command, I was able to get separate workspaces on both monitors (both displaying their own i3bar btw.) So, in an attempt to fix this on startup, I added these lines to the config file.
#Splits screens on startup
exec xrandr --output HDMI1 --auto --left-of LVDS1
#Manually assigns workspaces
workspace 1 output LVDS1
workspace 2 output HDMI1
Now, this almost works on startup, but now both i3bars are stacked at the bottom on the "left" display, which is the HDMI1 above. Not a big deal for my current situation since my HDMI1 is the larger of the two displays, but has anyone else ran into this kind of issue and worked out any alternate fixes that get the displays working correctly?
Last edited by JoeFri85 (2015-09-28 04:01:32)
Offline
i3pystatus stopped working ,After huge python update yesterday i got Error status_command process exited unexpectedly
Offline
IS it possible to have 10 workspace numbers visible in menubar no matter if its empty or not ?
I think you can try opening 10 workspaces, and 1 term on each of them to keep them open. Then save the layout to a file. Don't worry, only the layout is saved, not the terms.
Everytime you open that layout you'll have 10 workspaces. I never tried that by the way
Last edited by tigrezno (2015-10-05 19:06:16)
Offline
my i3 configuration
https://github.com/emanuellopes/dotfiles
Offline
Is possible to change i3bar tray app icons (like nm-applet) with my chosen ones?
Offline
Is possible to change i3bar tray app icons (like nm-applet) with my chosen ones?
those are not specific to i3bar if i understand correctly and you can if willing build a icon theme. or modify an existing one to use the icons you wish.
Offline
Is possible to change i3bar tray app icons (like nm-applet) with my chosen ones?
a GTK+ icon theme should do the trick for that one, i personally hide the tray entirely myself
Offline
New user here, coming from Cinnamon.
How do I set my GTK3 theme and icon set? The ones I set in cinnamon don't seem to have carried over. White themes in firefox -> ouch my eyes.
My display's (2nd gen lenovo x1 carbon) scaling is quite strange and things are too small. Cinnamon auto-adjusted it all for me but as an Arch user I'd love to learn how to do it myself in i3. For clarification, I can resize i3 features like the bar and window titles just fine, but applications themselves are still scaled too small.
Thanks!
Last edited by williewillus (2015-10-19 06:28:38)
Offline
An easy graphical way to set the themes would be to use lxappearance.
You can scale your display using xrandr: https://wiki.archlinux.org/index.php/Xrandr
Offline
applications themselves are still scaled too small
Set your DPI correctly.
Probably the easiest way is to add it as an option to startx(1):
startx -dpi 96
Or you can use `xrandr --dpi xx`, as suggested above.
Para todos todo, para nosotros nada
Offline
I would like to use i3, but still have a desktop (beneath all the windows on every workspace). Could anyone help me out with any recommendations for small lightweight tools that merely provide a desktop? I've only ever used windowmanagers without any desktop environment, so I have no clue how to go about this.
I've put together a PC for my girlfriend with Arch Linux on it, and I'm configuring i3 for her now since she was interested in using it - but I still want her to have a desktop beneath it all, but I have no clue how to set it up. When I started using Linux 5-6 years ago with a full Debian install (+ Gnome), I switched to i3 pretty much right away, and when I launched Nautilus under i3 it also displayed a GNOME desktop underneath it all, but without any panels or bars or whatever, just icons and a wallpaper, persistent across all screens - if a window opened, it'd be occupying the entire space and obstructing it this way. Now, I of course don't want to install Gnome at all.
Sorry for the vague question, but I have no clue how to get started on displaying a lightweight desktop while using i3. There's nothing in both the i3 manual and the i3 ArchWiki page. Does anyone have any idea how to display a lightweight desktop in i3?
Offline
How do you want that to work? You can set a wallpaper with xsetroot, or feh, or any number of other tools. But if you display icons on the desktop they'll only ever be accessible if no windows are open - so what purpose would it serve?
If you really want this - I might suggest Rox. It's lightweight and simple, but can provide desktop icons. But this still wouldn't make any sense to me. What might make more sense is to have one window automatically open to a graphical filemanager open to a "Desktop" folder. This way those desktop icons will be available even when other windows are opened (they'll just take up their tiled portion of the screen).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Awesome, thanks for your response! I'll try Rox, it sounds perfect.
It does sound a bit weird, but it's mostly to ease the transition for someone who has never used a tiling window manager before and would like to try it actively. If you open a window and hide the desktop that way, you can just switch to a workspace without windows to see the desktop again. That's actually the exact behaviour I would want, so you can just switch to a new workplace and be presented with your Desktop to just launch an application the clicky way. I've only used it like this for a very very short while lots of years ago, but the way I remember the desktop, it was entirely unobtrusive this way, sliding back when you didn't need it but always being there beneath everything. It's not a poweruser setup though obviously, but it fits if you were gifted a system and have no clue what applications or games you could launch.
Offline