Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
i3wm is the greatest wm of all time and made tmux pointless
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 17503

PostPosted: Sat Nov 03, 2018 2:11 am    Post subject: Reply with quote

Trying to figure out fonts reminds me very much of my *box experiences from the early 2000s. ~15 years later, it doesn't seem to have improved. At all. I haven't given up on i3 (yet), but for now, I'm still relying on xfce.
_________________
It is what it is out there. So whatever it is, it is.
Back to top
View user's profile Send private message
Muso
l33t
l33t


Joined: 22 Oct 2002
Posts: 804
Location: The Holy city of Honolulu

PostPosted: Sat Nov 03, 2018 2:21 am    Post subject: Reply with quote

pjp wrote:
Trying to figure out fonts reminds me very much of my *box experiences from the early 2000s. ~15 years later, it doesn't seem to have improved. At all. I haven't given up on i3 (yet), but for now, I'm still relying on xfce.


Fonts are assigned in the ~/.config/i3/config file. Here's my snippet :
Code:
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:System San Francisco Display 13


Terminal fonts are assigned via the terminal emulator's settings,. Using urxvt, it's controlled in .Xdefaults (Boney's favorite file).
_________________
Chemtrails don't actually exist.
The optical illusion of seeing white streaks crisscrossing a blue background in the presence of sunlight is a common hallucination that comes from drinking fluoridated water.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 17503

PostPosted: Sat Nov 03, 2018 3:35 am    Post subject: Reply with quote

I'm going to try more testing this weekend. Although xmoad may support Alt+Tab functionality, so I have to test that too :).

My i3 config file has these sections, which appear to work:
Code:
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
#font pango:monospace 8
font pango:Liberation Mono, Icons 14

Code:
bindsym $mod+d exec --no-startup-id i3-dmenu-desktop --dmenu="dmenu -fn 'Liberation Mono-14'"

Code:
bar {
        status_command i3status
#        font -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
        font pango:Liberation Mono, Icons 14
}
Terminal fonts are a different matter. I've tried .Xresources and .Xdefaults with conflicting results. Sometimes the settings seem to apply, other times they don't.

Then there's the issue of dpi. I believe that had affected some of my results from an earlier post. 'xrandr --dpi <n>' will increase or decrease the effective size of a font. There's an easy setting in xfce for this (as well as MS Windows). In general terms, it gives the appearance of 'magnifying' everything.

So I just need to find the correct information that describes how it all (should) work together. Then there are issues with apps. Currently firefox-bin, but that may be due to it being a -bin (planning to install firefox tonight).

Oh, and it seems i3 doesn't play well with i3 (or vice versa). Some small dialog windows open up larger than the screen area such that critical usage areas aren't accessible. So far that's only one app, so it may be an isolated issue.
_________________
It is what it is out there. So whatever it is, it is.
Back to top
View user's profile Send private message
Muso
l33t
l33t


Joined: 22 Oct 2002
Posts: 804
Location: The Holy city of Honolulu

PostPosted: Sat Nov 03, 2018 3:56 am    Post subject: Reply with quote

Instead of dmenu, try rofi.

Code:
emerge rofi


Then make this file in ~/.config/rofi.sh
Code:
#!/bin/sh

bg_color=#2f343f
text_color=#f3f4f5
htext_color=#9575cd

rofi -show run -lines 3 -eh 2 -width 100 -padding 420 -opacity "85" -bw 0 -color-window "$bg_color, $bg_color, $bg_color" -color-normal "$bg_color,
$text_color, $bg_color, $bg_color, $htext_color" -font "San Francisco Display 16"


Change font to your desired, colors are handled in ~/.config/i3/config
Code:
set $bg-color            #2f343f
set $inactive-bg-color   #2f343f
set $text-color          #f3f4f5
set $inactive-text-color #676E7D
set $urgent-bg-color     #E53935

# window colors
#                       border              background         text                 indicator
client.focused          $bg-color           $bg-color          $text-color          #00ff00
client.unfocused        $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00
client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00
client.urgent           $urgent-bg-color    $urgent-bg-color   $text-color          #00ff00


And simply replace the dmenu with rofi in ~/.config/i3/config
Code:
# start dmenu (a program launcher)
#bindsym $mod+d exec dmenu_run
bindsym $mod+d exec /home/rasalom/.config/rofi.sh

(Obviously replacing the absolute path with your own)

Rofi screen shot : https://ibb.co/kpOOoL
_________________
Chemtrails don't actually exist.
The optical illusion of seeing white streaks crisscrossing a blue background in the presence of sunlight is a common hallucination that comes from drinking fluoridated water.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 17503

PostPosted: Sat Nov 03, 2018 5:30 am    Post subject: Reply with quote

Waiting on firefox now so I'll install it tomorrow. I haven't actually done much to interact with i3 yet. Although I did notice that I wanted to remove most of what was in the dmenu :).

In general, I like it. The main issue I see for adjusting to it will be having to shift out of what I'm thinking to select the next window. Which direction? Right, then down. Alt-Tab to toggle between recent apps is just so much easier. And then a few key presses or just holding down the keys seems to have much less friction.
_________________
It is what it is out there. So whatever it is, it is.
Back to top
View user's profile Send private message
Muso
l33t
l33t


Joined: 22 Oct 2002
Posts: 804
Location: The Holy city of Honolulu

PostPosted: Sat Nov 03, 2018 5:37 am    Post subject: Reply with quote

I dislike dmenu. Rofi is better. Also, i3blocks is nice, just copy the config from /etc/i3blocks.conf to ~/.config/i3/i3blocks.conf
Code:
cp /etc/i3blocks.conf ~/.config/i3/i3blocks.conf


Look at the top of this screenshot : https://ibb.co/hGEudL

To fix the slow clock, change 5 to 1 :
Code:
# Date Time
#
[time]
command=date '+%Y-%m-%d %H:%M:%S'
interval=1

_________________
Chemtrails don't actually exist.
The optical illusion of seeing white streaks crisscrossing a blue background in the presence of sunlight is a common hallucination that comes from drinking fluoridated water.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1606
Location: U.S.A.

PostPosted: Sat Nov 03, 2018 5:47 am    Post subject: Reply with quote

Proinsias wrote:
i3 + tmux makes a nice combo, easy to set up quickly in most distros. i3 is my preference for multi-monitor, but with a single screen & gentoo dwm is solid.

Portage is suckless friendly out of the box with savedconfig use and automagic for patches, my dwm & st build times are ~5-15s on an old i3.

dwm/i3+dmenu+st+tmux+ranger has been my goto for a few years now.

now here's a man who knows what he's talking about. He probably has an Xresources file too, unlike the rest of you pud-whackers.
_________________
patrix_neo wrote:
The human thought: I cannot win.
The ratbrain in me : I can only go forward and that's it.
Back to top
View user's profile Send private message
Muso
l33t
l33t


Joined: 22 Oct 2002
Posts: 804
Location: The Holy city of Honolulu

PostPosted: Sat Nov 03, 2018 5:54 am    Post subject: Reply with quote

Bones McCracker wrote:
Proinsias wrote:
i3 + tmux makes a nice combo, easy to set up quickly in most distros. i3 is my preference for multi-monitor, but with a single screen & gentoo dwm is solid.

Portage is suckless friendly out of the box with savedconfig use and automagic for patches, my dwm & st build times are ~5-15s on an old i3.

dwm/i3+dmenu+st+tmux+ranger has been my goto for a few years now.

now here's a man who knows what he's talking about. He probably has an Xresources file too, unlike the rest of you pud-whackers.


You will use an .Xdefaults file, and like it.
_________________
Chemtrails don't actually exist.
The optical illusion of seeing white streaks crisscrossing a blue background in the presence of sunlight is a common hallucination that comes from drinking fluoridated water.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 17503

PostPosted: Sat Nov 03, 2018 4:46 pm    Post subject: Reply with quote

rofi installed. I'll have to play with it to find what seems the least imbalanced with its layout. As a demonstration, if the padding is 0, the bottom of the window has an extra blank line (it is the line opposite "run"). I'm sure I'll eventually ignore it, but it is currently distracting since I'm paying attention to it while configuring it. The main thing I like about it so far is that it is only visible when needed. I'm off to see if I can find a status bar which similarly is only visible when wanted.
_________________
It is what it is out there. So whatever it is, it is.
Back to top
View user's profile Send private message
Muso
l33t
l33t


Joined: 22 Oct 2002
Posts: 804
Location: The Holy city of Honolulu

PostPosted: Sat Nov 03, 2018 5:09 pm    Post subject: Reply with quote

pjp wrote:
rofi installed. I'll have to play with it to find what seems the least imbalanced with its layout. As a demonstration, if the padding is 0, the bottom of the window has an extra blank line (it is the line opposite "run"). I'm sure I'll eventually ignore it, but it is currently distracting since I'm paying attention to it while configuring it. The main thing I like about it so far is that it is only visible when needed. I'm off to see if I can find a status bar which similarly is only visible when wanted.


++

It's just so much faster than using a menu. There also seems to be a command memory associated with the different work spaces.
_________________
Chemtrails don't actually exist.
The optical illusion of seeing white streaks crisscrossing a blue background in the presence of sunlight is a common hallucination that comes from drinking fluoridated water.
Back to top
View user's profile Send private message
Proinsias
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2014
Posts: 90
Location: UK

PostPosted: Sat Nov 03, 2018 6:05 pm    Post subject: Reply with quote

Bones McCracker wrote:
Proinsias wrote:
i3 + tmux makes a nice combo, easy to set up quickly in most distros. i3 is my preference for multi-monitor, but with a single screen & gentoo dwm is solid.

Portage is suckless friendly out of the box with savedconfig use and automagic for patches, my dwm & st build times are ~5-15s on an old i3.

dwm/i3+dmenu+st+tmux+ranger has been my goto for a few years now.

now here's a man who knows what he's talking about. He probably has an Xresources file too, unlike the rest of you pud-whackers.

Nope, no Xdefaults either. I just set x11-terms/st font & colourscheme in the config.def.h.
pjp wrote:
rofi installed. I'll have to play with it to find what seems the least imbalanced with its layout. As a demonstration, if the padding is 0, the bottom of the window has an extra blank line (it is the line opposite "run"). I'm sure I'll eventually ignore it, but it is currently distracting since I'm paying attention to it while configuring it. The main thing I like about it so far is that it is only visible when needed. I'm off to see if I can find a status bar which similarly is only visible when wanted.

https://i3wm.org/docs/userguide.html#_display_mode
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 17503

PostPosted: Sat Nov 03, 2018 9:47 pm    Post subject: Reply with quote

Muso wrote:
There also seems to be a command memory associated with the different work spaces.
Yeah, that's on my list. It seems to include too much (every executable).


Quote:
https://i3wm.org/docs/userguide.html#_display_mode
Thanks, but not quite. I'd like it on or off like a light switch. That requires the key to be pressed. I've also tried i3bar control, but it doesn't seem to work "correctly." Even though it lists $mod+m or $mod+n, it reacts on the $mod alone. That's annoying. Maybe I'm misunderstanding the intent.

I'm actually thinking I don't really want it at all, but instead, configurable pop-up windows like rofi $mod+d. Show me the workspace pop-up. Show me the network pop-up. Show me the clock, etc. Maybe bring a pop-up like status bar when the wifi drops, and something like that.
_________________
It is what it is out there. So whatever it is, it is.
Back to top
View user's profile Send private message
Proinsias
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2014
Posts: 90
Location: UK

PostPosted: Sat Nov 03, 2018 10:29 pm    Post subject: Reply with quote

dwm does the lightswitch thing by default, mod+b, to switch the bar on & off
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 17503

PostPosted: Thu Nov 08, 2018 12:43 am    Post subject: Reply with quote

So overall I like i3. But I find that I just want to do things they seem unwilling or uninterested in adding.

On my 14" laptop screen, I like to keep a primary terminal at 80 characters in width. i3 can't (I think that's what I read) actually manage character width based on how it does things. That's fine. But as far as I can tell, they don't support a way to "memorize" a width. Related to that situation, with a full height terminal and the width of ~80 characters, the remaining width of the screen doesn't provide terminals of much value. The remaining width allows for two (over / under) terminals of 58x19 character dimensions. I was looking for a way to either automatically, or by keystroke, adjust one of the 58x19 terminals to take full width, and at the same time, reduce the height of the primary terminal.

Going to check out awesome. I've come across it while looking for i3 solutions.

EDIT:

awesome: uses Lua for configuration. Not terribly interested in learning Lua just for that.
dwm: Similar.

Meanwhile, I'm testing floating windows in i3.
_________________
It is what it is out there. So whatever it is, it is.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 17503

PostPosted: Thu Nov 08, 2018 5:36 am    Post subject: Reply with quote

Proinsias wrote:
dwm does the lightswitch thing by default, mod+b, to switch the bar on & off
Interestingly, while it does turn the bar off, the screen space is not automatically "reused".
_________________
It is what it is out there. So whatever it is, it is.
Back to top
View user's profile Send private message
Proinsias
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2014
Posts: 90
Location: UK

PostPosted: Thu Nov 08, 2018 6:25 pm    Post subject: Reply with quote

Switch off the bar in /etc/portage/savedconfig/x11-wm/dwm-version-number:
Code:
static const int showbar            = 0;        /* 0 means no bar */

Then the bar only appears when called for and the window snaps back nicely when you put it away.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 17503

PostPosted: Fri Nov 09, 2018 4:21 am    Post subject: Reply with quote

I thought I had done that, but either I overwrote it, or only changed the top/bottom setting. Works now, thanks.

During initial exposure and setup, having to recompile is extremely annoying. The ability to reload minor changes to a config is a huge win.

In general, I'm liking the tiling approach. I was getting tired of trying to find various solutions to make something work, so I briefly went into xfce4. I clicked whatever the equivalent is of the Start menu to launch an app but logged out instead. :)
_________________
It is what it is out there. So whatever it is, it is.
Back to top
View user's profile Send private message
Muso
l33t
l33t


Joined: 22 Oct 2002
Posts: 804
Location: The Holy city of Honolulu

PostPosted: Fri Nov 09, 2018 4:27 am    Post subject: Reply with quote

Indeed. Tiling is just so perfect for *nix.
_________________
Chemtrails don't actually exist.
The optical illusion of seeing white streaks crisscrossing a blue background in the presence of sunlight is a common hallucination that comes from drinking fluoridated water.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1606
Location: U.S.A.

PostPosted: Fri Nov 09, 2018 2:07 pm    Post subject: Reply with quote

I made my own status bar for dwm (multithreaded, using xcb):
Code:
#include <stdio.h>        // snprintf()
#include <stdlib.h>       // getloadavg()
#include <unistd.h>       // sleep()
#include <time.h>
#include <string.h>
#include <xcb/xcb.h>
#include <pthread.h>
#include <semaphore.h>

// global variable
sem_t sem;


// function prototypes
static size_t append_load(char *st);

static size_t append_ram(char *st);

static size_t append_time(char *st);

void * timer();



// main function
int main() {

  const size_t outsize = 70;
  char status[outsize];
  size_t len;
  xcb_connection_t *c;
  xcb_screen_t *s;
  pthread_t thread;

  c = xcb_connect(NULL,NULL);
  s = xcb_setup_roots_iterator(xcb_get_setup(c)).data;

  sem_init(&sem, 0, 0);
  pthread_create(&thread, NULL, &timer, NULL);


  while(1) {

    len = append_load(status);
    len += append_ram(status + len);
    len += append_time(status + len);


    xcb_change_property(c, XCB_PROP_MODE_REPLACE, s->root,
                        XCB_ATOM_WM_NAME, XCB_ATOM_STRING, 8, len, status);

    sem_wait(&sem);
    xcb_flush(c);

  }

  xcb_disconnect(c);
  pthread_cancel(thread);
  return 0;

}



// Reads system load (1 min avg) and appends to passed status string.
static size_t append_load(char *st) {

  static const size_t max = 14;
  static double load;

  getloadavg(&load, 1);

  return snprintf(st, max, "  Load: %.2f ", load);

}



// Calculates RAM in use and appends to passed status string.
static size_t append_ram(char *st) {

  static const size_t max = 32;
  static FILE *fp;
  static char label[11];
  static int value;
  static int found;
  static int memstats[6] = {0};
  static int ram_used;
  static int swap_used;

  memset(label, 0, sizeof(label));
  found = 0;

  fp = fopen("/proc/meminfo", "r");

  // search by label because /proc/meminfo entries vary
  while ( fscanf(fp, "%10s %d %*s", label, &value) != EOF ) {

    if ( strcmp(label, "MemTotal:") == 0 ) {
      memstats[0] = value;
      found ++;
    } else if ( strcmp(label, "MemFree:") == 0 ) {
      memstats[1] = value;
      found ++;
    } else if ( strcmp(label, "Buffers:") == 0 ) {
      memstats[2] = value;
      found++;
    } else if ( strcmp(label, "Cached:") == 0 ) {
      memstats[3] = value;
      found++;
    } else if ( strcmp(label, "SwapTotal:") == 0 ) {
      memstats[4] = value;
      found++;
    } else if ( strcmp(label, "SwapFree:") == 0 ) {
      memstats[5] = value;
      found++;
    }

    if ( found >=6 ) break;

  }

  fclose(fp);

  ram_used = memstats[0] - ( memstats[1] + memstats[2] + memstats[3] );
  swap_used = memstats[4] - memstats[5];

  return snprintf(st, max, "  RAM: %d MiB  Swap: %d MiB ", ram_used/1024, swap_used/1024);

}



// Creates formatted local time and appends to status string.
static size_t append_time(char *st) {

  static const size_t max = 24;
  static time_t now;
  static struct tm ltm;

  time(&now);
  localtime_r(&now, &ltm);
  return strftime(st, max, "  %a %b %-e  %T ", &ltm);

}



// separate thread to measure time interval in parallel
void* timer() {

  while(1) {

    sem_post(&sem);
    sleep(1);

  }

  return NULL;

}

_________________
patrix_neo wrote:
The human thought: I cannot win.
The ratbrain in me : I can only go forward and that's it.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 17503

PostPosted: Fri Nov 09, 2018 10:10 pm    Post subject: Reply with quote

OK, so I've been fighting with rofi for a while now, seemingly finding features listed in the man page which weren't working. Specifically "window" mode (and uses an ugly label "combi").
Code:
rofi -modi combi,window -show combi -combi-modi window
Turns out rofi requires the "windowmode" USE flag. Unfortunately, that still only brings up a list of windows. I'll try that or maybe settle for switching between workspaces. That should give me something usable until I make more progress with dwm.


Bones McCracker wrote:
I made my own status bar for dwm (multithreaded, using xcb):
Thanks. I'll check it out. I suspect I'll eventually end up using dwm, unless it has a fork with dynamically reloadable configs :)
_________________
It is what it is out there. So whatever it is, it is.
Back to top
View user's profile Send private message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 459
Location: NRW, Germany

PostPosted: Sat Nov 10, 2018 5:40 pm    Post subject: Reply with quote

Proinsias wrote:
dwm/i3+dmenu+st+tmux+ranger has been my goto for a few years now.

Actually for very low end systems (RPi) I've started to use lf as a ranger replacement.
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2045
Location: Germany

PostPosted: Tue Nov 13, 2018 2:12 am    Post subject: Reply with quote

why a wm at all?

just load chrome via startx and done.

Reminds me, why an init? Just add /usr/bin/xemacs to your kernel command line. Done.
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
Muso
l33t
l33t


Joined: 22 Oct 2002
Posts: 804
Location: The Holy city of Honolulu

PostPosted: Tue Nov 13, 2018 2:17 am    Post subject: Reply with quote

energyman76b wrote:
Just add /usr/bin/xemacs to your kernel command line. Done.


:lol: :lol: :lol:
_________________
Chemtrails don't actually exist.
The optical illusion of seeing white streaks crisscrossing a blue background in the presence of sunlight is a common hallucination that comes from drinking fluoridated water.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 17503

PostPosted: Tue Nov 13, 2018 4:27 am    Post subject: Reply with quote

spectrwm seems decent, although documentation / examples seem difficult to find.
_________________
It is what it is out there. So whatever it is, it is.
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2045
Location: Germany

PostPosted: Wed Nov 14, 2018 1:56 am    Post subject: Reply with quote

Muso wrote:
energyman76b wrote:
Just add /usr/bin/xemacs to your kernel command line. Done.


:lol: :lol: :lol:


I did it a couple of years ago. Just for shit and giggles. Worked better than expected.
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum