You are not logged in.
To be honest I haven't looked at focus following mouse for ages. I guess you want an unfocused window on another monitor to be focused if you move the mouse into it ?
Just to be sure, you are reloading the wm after editing the apps.conf file?
Have you checked with xprop that QTerminal is the right thing to call it?
You're just jealous because the voices only talk to me.
Offline
I will get back to you as soon as I can with answers!
Offline
To be honest I haven't looked at focus following mouse for ages. I guess you want an unfocused window on another monitor to be focused if you move the mouse into it ?
If that's easy to do then yes, I'd like that feature. But I'm not here to make you work either so if it's too much trouble I'll manage just fine with click-to-focus.
Just to be sure, you are reloading the wm after editing the apps.conf file?
Yes I did that with the alt-u hotkey. Just to be sure I also closed SnapWM properly with the alt-shift-q hotkey and restarted it. No joy.
Have you checked with xprop that QTerminal is the right thing to call it?
I did but, in case I was wrong, I installed Thunar and just uncommented your lines in the apps.conf file and started up SnapWM to see if Thunar would load properly and it did not.
This is my apps.conf file, identical on two separate computers (my desktop and my netbook), just to show you what I've done:
: ~ : cat .config/snapwm/apps.conf
# USAGE :
# DESKTOP wm_class;desktop number;0=follow 1=don't;
#
DESKTOP Thunar;1;0;
# DESKTOP MPlayer;4;1;
#
# USAGE :
# POSITION wm_class;x;y;width;height;
#
POSITION Thunar;100;100;800;400;
# DESKTOP QTerminal;2;1;
My rc.conf:
# rc.conf
# lines starting with a hash are ignored
# Number of DESKTOPS should be first
DESKTOPS 5
# Desktop to start on: default is 0
DEFAULT_DESK 0
# Desktop switcher background colours
# switchertheme colours are :
# focused desktop in switcher
# unfocused desktop in switcher
# unfocused desktop in switcher with opened windows
# the bars border
SWITCHERTHEME #443311;#002030;#004060;#001020;
# Font and bar backgrounds colours
# statustheme colours are :
# default bar background
# focused desktop font in switcher
# unfocused desktop font in switcher
# unfocused desktop with opened windows font in switcher
# the focused window name font in the status bar
# five more colours for the external text
STATUSTHEME #002030;#000000;#ffffff;#999999;#777755;#339933;#aa6644;#ffffff;#dddddd;#999999;
# windowtheme colours are :
# focused window border and unfocused window border
WINDOWTHEME #443311;#002030;
# Background colour for the focused window's name in the bar from STATUSTHEME
WNAMEBG 7
# left align the focused window's name in the bar
LEFT_WINDOWNAME 0
# max length for the window's name
WINDOWNAMELENGTH 35
#
BORDERWIDTH 2
# percentage of the desktop for the main window
MASTERSIZE 52
# default tiling modes for each desktop(defaults to 0):
# must end in semicolon
# 0=vert,1=fullscreen,2=horiz,3=grid,4=stacking
DEFAULTMODE 1;4;0;1;3;4;
# Set number of extra window/s in the master area(defaults to 0)
# must end in semicolon
NMASTER 0;0;1;0;2;0;
# open new windows in the stack? 0=yes,1=no
ATTACHASIDE 1
# if new window is in the stack add it at the top
TOPSTACK 1
# if in stacking mode center window # (1) is best for gimp
CENTER_STACK 0
# Key to use when moving/resizing windows in stacking mode.
# Default is Alt; other choice is Super, so only uncomment if
# you want to use the Super key
#RESIZEMOVEKEY Super
# Select monitor the bar will be on, not needed with one monitor
#BAR_MONITOR 1
# Change from stacking mode to new mode when reaching this many
# open windows - Off by default
AUTO_NUM_OPEN 4
AUTO_MODE 3
# For semi transparent unfocused windows if using a compositor e.g. compton
# 100 is opaque
UF_WIN_ALPHA 65
# For semi transparent bar if using a compositor e.g. compton
# 100 is opaque
BAR_ALPHA 75
# only one of FOLLOWMOUSE and CLICKTOFOCUS should be zero, but none have to be
FOLLOWMOUSE 1
CLICKTOFOCUS 0
TOPBAR 0
SHOW_BAR 0
# Show the number of opened windows in the desktop switcher?
SHOWNUMOPEN 1
# How to display the current tiling mode in the bar
MODENAME [V];[F];[H];[G];[C];
DESKTOP_NAMES one;two;three;four;five;six;
FONTNAME "-*-inconsolata-g-*-*-*-*-14-*-*-*-*-*-*-*"
#
Honestly, I don't understand why this is not working either. It seems like a simple thing to do that should, by default, just work! It's not the end of the world if we can't get this thing to work but I am curious as to what's going on here.
Offline
I've recently made a change to how snapwm parses the config files. Lines that start with a space are now ignored.
So your POSITION entry for Thunar will do nothing.
You have Thunar opening on the first desktop, which desktop do you expect it to open on?
This is my apps.conf just as a reference:
DESKTOP Xfe;2;0;
DESKTOP Firefox;3;0;
DESKTOP Dwb;3;0;
DESKTOP SNOOZER;3;1;
DESKTOP SNOOZER-MARK;3;0;
DESKTOP Thunderbird;5;1;
DESKTOP mpv;4;0;
DESKTOP Pysol;6;0;
DESKTOP Leafpad;2;0;
DESKTOP NowUrgent;1;1;
POSITION Dwb;100;60;1150;650;
POSITION Firefox;100;60;1150;650;
POSITION Xfe;100;100;800;400;
POSITION Leafpad;500;60;550;600;
POSITION URxvt;100;320;820;400;
POSITION WallClock;1050;550;200;200;
I'll have a look at focus following the mouse with multiple monitors when I get a bit of time. The option is there so I should have it working. Just laziness on my part there.
Cheers
You're just jealous because the voices only talk to me.
Offline
I put Thunar on desktop 1 just so I could see at a glance whether it is there or not. Thus far it has failed to appear. Thanks for the info about spaces that's one thing I can avoid in the future.
Well, obviously your set up works so maybe I'll snag the Firefox lines and see if it works here too. I'll try to get back to you as soon as I can test it.
[Edit] I just copy/pasted your line for Firefox to my own apps.conf file and I still get nothing. I'm going to post my .xinitrc and .bashrc just in case something (who knows what...) is mucking this up.
.xinitrc:
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
###
xset +fp /usr/share/fonts/local/ # Prepend a custom font path to Xorg's list of known font paths
xset fp rehash
## Resets the default X cursor
xsetroot -cursor_name left_ptr &
## For a dramatic 2D graphics performance increase in pixmap-intensive applications, e.g. Firefox,
## set the InitialPixmapPlacement parameter to 2:
nvidia-settings -a InitialPixmapPlacement=2 &
## use customisations from the nvidia-generated file in your home directory
nvidia-settings --load-config-only &
## To have the touchpad disabled automatically when you begin typing
#syndaemon -t -k -i 2 -d &
###
### xrdb -merge ~/.Xresources &
exec snapwm
#exec xterm
# Use this command as the last line in .xinitrc
# Attach to an tmux session that is in-progress OR
# Start a new session within your preferred terminal replacing xfce4-terminal with - for example:
# lxterminal -e ...
qterminal -e bash -c "tmux -q has-session && exec tmux attach-session -d || exec tmux new-session -n$USER -s$USER@$HOSTNAME" &&
###
.bashrc:
# ~/.bashrc
######################################################################
# #
# This file is sourced by all *interactive* bash shells on startup, #
# including some apparently interactive shells such as scp and rcp #
# that can't tolerate any output. So make sure this doesn't display #
# anything or bad things will happen ! #
# #
# If not running interactively, don't do anything #
# #
######################################################################
[[ $- != *i* ]] && return
#################################################################################
# #
# If the connection to the system is a remote connection 'ssh' will be #
## appended to the prompt. Otherwise the prompt will be displayed normally #
# See: remote.colourful.prompt_how-to on /media/lynwyn/networking/ssh #
# #
# Default prompt from the above-named document: #
# export PS1='\[\e[0;31m\]\u@\h:\w${text}$\[\e[m\]' # # #
#################################################################################
if [ -n "$SSH_CLIENT" ]; then text=":ssh:"
fi
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
### [User Prompts]
### White Yunzi
export PS1='\[\e[0;37m\]: \[\e[1;92m\]\W\[\e[0;37m\] :\[\e[m\] \[\e[0;37m\]'
#### Silver Yunzi
#export PS1='\[\e[0;37m\]: \[\e[1;94m\]\W\[\e[0;37m\] :\[\e[m\] \[\e[0;37m\]'
### Pink Yunzi
#export PS1='\[\e[0;37m\]: \[\e[1;95m\]\W\[\e[0;37m\] :\[\e[m\] \[\e[1;95m\]'
### [Root Prompts]
### White Yunzi Root
#export PS1='\[\e[1;37m\]:\[\e[1;92m\]\u\[\e[1;37m\]:\[\e[1;92m\]\W\[\e[1;37m\]:\[\e[m\] \[\e[0;37m\]'
### Silver Yunzi Root
#export PS1='\[\e[0;37m\]:\[\e[1;94m\]\u\[\e[0;37m\]:\[\e[1;94m\]\W\[\e[0;37m\]:\[\e[m\]\[\e[0;37m\]'
### Pink Yunzi Root
#export PS1='\[\e[0;37m\]:\[\e[1;95m\]\u\[\e[0;37m\]:\[\e[1;95m\]\W\[\e[0;37m\]:\[\e[m\] \[\e[0;37\]'
### * BASH options * ###
### Last edited January 2014 by H.L.
# Bash won't get SIGWINCH if another process is in the foreground.
# Enable checkwinsize so that bash will check the terminal size when
# it regains control.
# [check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.]
# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
shopt -s checkwinsize
# automatically prepend cd when entering just a path in the shell
shopt -s autocd
# Enable history appending instead of overwriting.
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=10000
HISTFILESIZE=20000
## erase duplicate entries in your history file
## and force Bash History to ignorespace
export HISTCONTROL=erasedups:ignorespace
###
# set variable identifying the chroot you work in (used in the prompt below)
#if [ -z "$arch_chroot" ] && [ -r /etc/arch_chroot ]; then
# debian_chroot=$(cat /etc/arch_chroot)
#fi
# make "less" more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
###
# TMUX
# Put this this snippet BEFORE the aliases in .bashrc.
# This code starts TMUX with only one session (unless you start some manually), on login;
# it will try to attach to a currently running session.
# If there isn't a currently running session then TMUX will create one.
# if which tmux 2>&1 >/dev/null; then
# if not inside a tmux session, and if no session is started start a new session
# test -z "$TMUX" && (tmux attach || tmux new-session)
# fi
###
# environment variables using gedit and nano
export EDITOR="$(if [[ -n $DISPLAY ]]; then echo 'gedit'; else echo 'nano'; fi)"
###
### Coloured man pages with explanations of colours in comments
# Note to self: all of the colour & escape statements work ONLY by using double quote marks, e.g. " ... "
## Coloured man pages with explanations of colours in comments
# 67: Primary colour for program names is Dark Green [old 80's CRT green!]
# 68: Optional arguments and/or separate options for arguments is Bright Green
# 69: Text Reset
# 70: Text Reset
# 71: man page info bottom of page is Dark Red on Black background (net effect is transparent background with red writing)
# 72: Text Reset
# 73: References to other programs (and their respective man page(s)) are Bright Yellow [good neutral yellow]
man() {
env LESS_TERMCAP_mb=$(printf "\e[1;31m") \
LESS_TERMCAP_md=$(printf "\e[1;31m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;32m") \
man "$@"
}
###
## To get a skin of your choice loaded instead of mc's default
## skin, you might consider the following solution:
## Multi-User: Create an alias for mc in your ~/.bashrc, like:
if [ $TERM = "screen-256color" ]; then
if [ $USER = "root" ]; then
myMCSkin="modarcon16root-defbg"
else
myMCSkin="modarcon16-defbg"
fi
alias mc='mc --skin $myMCSkin'
alias mcedit="mcedit --skin $myMCSkin"
alias mcview="mcview --skin $myMCSkin"
alias mcdiff="mcdiff --skin $myMCSkin"
fi
###
I am running out of ideas here...this is getting silly.
Last edited by MoonSwan (2014-06-18 00:36:01)
Offline
You said when you tried with Thunar it failed to appear and when you tried with firefox you got nothing.
An entry in the apps.conf file won't stop them from showing up.
Remove/comment any entries in the apps.conf file and update the wm.
Open a terminal and start Thunar from there.
Make sure it shows up. If it doesn't that's nothing to do with the wm.
If it does then add an entry in the apps.conf file for it to open on the same desktop as the terminal and update the wm then start Thunar from the terminal.
If that works then change the entry in the apps.conf file to have Thunar open on a different desktop then the terminal, update the wm and start Thunar from the terminal.
Luck
You're just jealous because the voices only talk to me.
Offline
Remove/comment any entries in the apps.conf file and update the wm.
Open a terminal and start Thunar from there. Make sure it shows up. If it doesn't that's nothing to do with the wm.
I did this exactly as you wrote and Thunar started up just fine in the same desktop as QTerminal.
If it does then add an entry in the apps.conf file for it to open on the same desktop as the terminal and update the wm then start Thunar from the terminal.
This did work just fine.
If that works then change the entry in the apps.conf file to have Thunar open on a different desktop then the terminal, update the wm and start Thunar from the terminal.
I did this as well and Thunar opened on a different terminal correctly (I had assigned it to Desktop 2 and QTerminal was on Desktop 1).
However, restarting the wm wasn't always consistent as, once in a while and seemingly randomly, X would crash especially if I had QTerminal and Gedit open. Quite odd but I put that down to software bugs within X or those programs. I found that quitting the wm then restarting it was more reliable than updating it with a hotkey.
Now comes the interesting part: If I enabled "click to focus" my wm would act strangely. Once, when I had Firefox open on one desktop and Gedit and QTerminal on two others, I could swap to the different desktops. But when I did sometimes my cursor got "stuck" on a desktop. Even weirder was that on the Firefox desktop my cursor literally could not move from the middle of the screen on that desktop! For giggles I disabled the "click to focus" and enabled "focus follows mouse." Now the cursor acts as if I have "click to focus" enabled! I can literally click different apps I have open and it acts as if my "click to focus" is working. This is very strange. Might this be an issue with the Nvidia drivers or something else entirely I don't know but it is intriguing that those two modes seem to act in the wrong "order."
[edit] I have found a small annoyance with popup windows. Sometimes when I start Firefox the text box that comes up asking if I want to restore my session is un-clickable. I have to send the main Firefox window to another desktop and then I can click the popup window. This happens in fullscreen mode at least, I haven't tried to duplicate the behaviour in other modes. Is this normal for a tiler?
Thanks!
Last edited by MoonSwan (2014-06-19 02:00:28)
Offline
I'll say it again, you are having hardware issues.
You're the only one having these random issues with various software.
Run memcheck and check the smart status of you're hard drives.
You're just jealous because the voices only talk to me.
Offline
After investigating further I have to say you're right. I found a web page that describes similar issues to what I've seen and it is something to do with X and the mouse I use. I'm sorry for the noise I was getting frustrated and really not understanding why things were happening.
Thank you for your time and patience.
Offline
I'm happy to help. The more "noise" you made the more obvious it became that you need to check your hardware.
Luck
You're just jealous because the voices only talk to me.
Offline
Some snapwm news.
I have rewritten how the config files are read. Just the source code, nothing in the config files needs to be changed.
At least here it didn't.
Let me know if something stops working.
Cheers
You're just jealous because the voices only talk to me.
Offline
Hello again,
Would it be possible to add a restart/redraw function that would "restart" snapwm?
When I connect a monitor to my laptop, I need to relog which forces me to close open applications, which can be annoying.
Amateur web developer & Linux enthusiast
Offline
Hello again,
Would it be possible to add a restart/redraw function that would "restart" snapwm?
When I connect a monitor to my laptop, I need to relog which forces me to close open applications, which can be annoying.
The point of the reloadable configs is to never have to restart snapwm so lets call it reread screen info.
I have an idea on a simple method for doing this but as always "the devil is in the details". I'm a bit pressed for time so it might be the end of the weekend before I have it sorted or have given up on it
Cheers
You're just jealous because the voices only talk to me.
Offline
Hi moetunes,
seems the max number of desktops is hardcoded as 10 in snapwm. Is it because there's no need to have more desktops as there are only 10 number keys, and the default config uses them to access the desktops? Some users tend to prefer the F-keys for that, and as there are 12 of them on most keyboards, it would be nice if snapwm could utilize all of them. I'm by no means a programmer, but I tried to get some naive idea of the code, and if it is not more than changing one line in readrc.c from "if(DESKTOPS > 10) DESKTOPS = 10;" to "if(DESKTOPS > 12) DESKTOPS = 12;" I would gladly apply that change myself for my private install. Nevertheless, I imagine there might be more than this one user appreciating such a modification.
Offline
Hi walex,
there was a few places in the code that needed changing but it wasn't too hard. A `grep -rn 12` through the snapwm directory should show what I changed if you're interested.
I went with ten desktops 'cause ten seemed enough.
Cheers
You're just jealous because the voices only talk to me.
Offline
Thanks a lot, moetunes. I suppose you're right, ten desktops should be enough in most cases, and even me, I could make do with ten, no problem. But with twelve F-keys, it's nice to have twelve desktops.
Still, I have another one for the wishlist, and this time I'm a bit reluctant to ask - this could require some more work, I don't know. Window-matching in apps.conf is a nice and useful feature, and I use it a lot. But with my most-used application, I do hit its limits. Imagine LibreOffice Base and a bunch of tables you're working on at the same time. Because they all share the same class and instance, there's no way to get the tables sent to their respective desktops per the apps.conf file. Now a few keypresses are not really hard work, but those windows opening on one desktop and changing the layout there only to be manually sent to some other desktop and so changing the layout again... I wouldn't call it annoying, maybe ergo-esthetically unsatisfactory. Well, what I would love to see in snapwm is that it matches not only against the class/instance but also against the window title or the NET_WM_NAME in the apps.conf, much like it has been implemented in wmfs2 or subtle.
No hard feelings if it can't be done or is against the concept or too much work. Snapwm is a fine piece of software as it is. Its well-considered feature set, easy configuration, intuitive operation, and low memory consumption already make it the window manager closest to what I would consider perfect for my use cases.
Last edited by walex (2014-09-25 17:43:11)
Offline
While we're talking about apps.conf, I just found something I don't quite understand. Xsane doesn't completely remember its window positions if I have it in my apps.conf. Usually I launch it from gimp, which lives on desktop 8. In apps.conf I have this line:
DESKTOP xsane;9;1;
Desktop 9 is in C-mode, and rc.conf has CENTER_STACK 1, which makes apps that are not programmed to remember their positions open in the top left corner. Xsane has that feature, so you'd expect the four xsane windows to open where you last closed them. Strangely enough, only one of them does. The other three open up top left. Just for testing purposes I commented out the xsane line in my apps.conf, and xsane had no problem remembering and restoring all its window positions. So my question is, if it works for one window, shouldn't it work for all four windows with apps.conf?
Last edited by walex (2014-09-26 08:52:23)
Offline
Using WM_NAME in apps.conf wasn't that much work. Whatever the name of the window is in the bar will work in apps.conf.
I don't know what's up with xsane but I'll have a look at it.
Cheers
You're just jealous because the voices only talk to me.
Offline
Has anyone managed to get a tray to work with Snapwm? Like trayer
I am embarrased to say that although Moetunes made it possilbe to have a bar that doesn't take up the whole width I still find that trayer is pushed below for some reason. I tried all kinds of setting combos in the tray config. Just asking out of curiosity if anyone uses a tray app? It was the only thing that made me go back to DWM.
You can like linux without becoming a fanatic!
Offline
Thanks again, moetunes. A friendly and helpful developer is one of the most valuable features any software can have.
WM_NAME matching does indeed work, but only if there's no blanks involved. So DESKTOP "homan";5;1; is okay, while DESKTOP "ho man";5;1; fails. Contemplating this, an idea occurred to me: Why not do regex matching. Would require an additional module I suppose, and so increase memory footprint a bit, but it would boost snapwm's matching capabilities on the other hand. LibO Base names its table and query windows something like "Query_alpha - TestDB - LibreOffice Base: Table Data View". So DESKTOP "^Query.*;5;1;" would send all my queries to desktop 5, or with DESKTOP ".*_alpha.*";6;1; all tables and all queries from my alpha project would show up on desktop 6.
Offline
Hi again moetunes,
as for the xsane issue, I thought this could be worked around using the POSITION keyword in apps.conf. But xsane turned out to be another case of software writing blanks in their WM_NAME fields. So for the time being I can't find out if the workaround is valid until the WM_NAME matching accepts blanks (or we have regex matching).
Cheers
Offline
Hi chickenPie4tea, sorry to here you struggled with trayer. Try
trayer --edge top --widthtype pixel --width 200 --height 18 --distance -18 --SetDockType true --align right
Notice the --distance is a negative. Dunno why it needs that...
Hi walex, if you check your "ho man" app with xprop more than likely both WM_NAME and _NET_WM_NAME will be the same - just the first word, maybe in brackets or something - and that'll be all you can use for a match. Dunno how regexing would help... It's down to the application - firefox has no problems with spaces in it's name in the bar. Things like "(word)" work ok for a name in apps.conf.
On another note I made a couple of little bug fixes like an extra character showing up on the end of the bar.
Cheers
You're just jealous because the voices only talk to me.
Offline
Hi moetunes,
you're right, WM_NAME or _NETWM_NAME is the same with any app I checked with xprop.
You say that firefox has no problems with spaces in WM_NAME. Well, maybe it's some issue with my system, but here it doesn't work. In my apps.conf I have this:
DESKTOP (dminiwm);2;1;
# DESKTOP Navigator;12;1;
I update the snapwm config, and now the Navigator line is commented out firefox starts on the current desktop. That's fine. Then I open this page (and at least one other page, otherwise firefox wouldn't show the next option), right-click on the tab of this page and select 'Move to New Window'. The first word of the window title is 'dminiwm', and so I'd expect the new firefox window to open on desktop 2. Matter of fact, it doesn't. It opens on the current desktop instead. Does this really work on your system? I'm going to continue experimenting with this and give you feedback. I don't mean to bug you, this is just user feedback to help you make a fine piece of software even finer.
Offline
Edit: Working fine now after I installed very latest (NextWm)
Very happy now back to SnapWm.
Thanks for the suggestion moetunes but still not working for me.
It seems to show up correctly on startup but then if I move to another workspace and then back to workspace 1 trayer is taking the full screen.
I have not updated my Snapwm for months so will try a new install of it first.
Last edited by chickenPie4tea (2014-09-30 11:58:22)
You can like linux without becoming a fanatic!
Offline
Having done a bit of googling I found something that may or may not matter for snapwm. While WM_NAME looks the same as _NETWM_NAME in xprop, they actually do differ. Not only that _NETWM_NAME is the more modern variant - it is an utf8-string, much more surprisingly WM_NAME is not an ASCII string at all, but uses what seems to be an old and obscure encoding called compound text. I am not a programmer and have no idea if that affects window matching in snapwm, but I can imagine that it might cause some problem when comparing a utf8 or ASCII string as you get from the apps.conf file with compound text WM_NAME, which may only look identical because xprop has converted it for display.
Offline