You are not logged in.
hello you all;
Today I patched and installed snapwm in FreeBSD -10-stable-x64. the problem is I just got the simple binary after make and I don't have ~/.config/snapwm/{rc.conf, key.conf, apps.conf}.
If anyone could share those files with me I would be very happy.
Thanks
Last edited by krax (2014-04-20 08:20:17)
Offline
Hi krax, when you pulled/cloned the github repo there would have been samples of those files downloaded.
You can see here there's sample.apps.conf, sample.key.conf and sample.rc.conf. Just make the directory ~/.config/snapwm and copy the 3 files there removing the sample dot from the filenames then edit them as you see fit.
There's an issue raised on github here where A. Bloke had an issue building snapwm on freebsd 10 since it has moved to using clang instead of gcc. If that wasn't you can you post the changes you made? It'll save me some work.
Cheers
You're just jealous because the voices only talk to me.
Offline
The build issue on Freebsd is sorted. I was suprised at how little needed to be changed when clang is used instead of gcc.
Last edited by moetunes (2014-04-21 19:18:55)
You're just jealous because the voices only talk to me.
Offline
I read this mini review of snapwm and I don't think it's fully correct.
http://crunchbang.org/forums/viewtopic. … 94#p201694
I made a comment about keybindings having a .conf file now - you may want to look it over and inform the author if he is wrong in other aspects?
You can like linux without becoming a fanatic!
Offline
Thanks for taking the time to point that out.
For 30 days in the begining of 2012 2manydogs had some fun trying out lots of wm's and did a good job making a thread about it. I'm sure there's lots of info in that thread now that's out of date, not just the stuff about snapwm and diminiwm.
I don't think it would be appropriate to expect 2manydogs to go through setting up those 30 wm's on a regular basis to make sure the info is still valid. Most of those wm's will have their own guides for setting them up and that should be used first.
You're not the first to post in that thread about the snapwm info being out of date but since the thread is about 30 days of experimenting 2 years ago there's not alot that can/should be done.
Cheers
You're just jealous because the voices only talk to me.
Offline
Hello again,
I have now used this WM as my primary WM for over a month now, and it is my favourite from the ones I've used so far
I do have one question though, is it possible to use space in the key.conf?
I want to make this work:
KEY Super;Space;last_desktop;
but I can't seem to figure a way to achieve this.
Is this not implemented, or am I overlooking something?
Thanks in advance,
~frash
Last edited by frash23 (2014-05-12 08:20:05)
Amateur web developer & Linux enthusiast
Offline
Hello again,
I have now used this WM as my primary WM for over a month now, and it is my favourite from the ones I've used so far
I do have one question though, is it possible to use space in the key.conf?
I want to make this work:KEY Super;Space;last_desktop;
but I can't seem to figure a way to achieve this.
Is this not implemented, or am I overlooking something?Thanks in advance,
~frash
Checking in xev says you need space with a small ess.
This works for me:
KEY Super;space;last_desktop;
Cheers
You're just jealous because the voices only talk to me.
Offline
frash23 wrote:-snip-
Checking in xev says you need space with a small ess.
This works for me:KEY Super;space;last_desktop;
Cheers
Ah, that's embarrasing, I should've tried that!
It works, thanks a lot!
Amateur web developer & Linux enthusiast
Offline
It was mentioned on github that windows that set the urgent hint aren't raised. I replied that you don't get that sort of thing with light wm's... but I added it anyway.
If a window sets the urgent hint it will be raised and the desktop it's on in the switcher will change colour. That colour can be set in rc.conf
# switchertheme colours are :
# focused desktop in switcher
# unfocused desktop in switcher
# unfocused desktop in switcher with opened windows
# the bars border
# desktop with window that's set the urgent hint
SWITCHERTHEME #443311;#002030;#004060;#001020;#00FF00;
If it's not needed nothing needs to be done.
Edit: Set the colour to change on focused as well as unfocused desktops
Cheers
Last edited by moetunes (2014-05-24 18:11:07)
You're just jealous because the voices only talk to me.
Offline
Hi again Moe, sorry I haven't responded in a very long time about the Slim thing but I got waylaid by university projects. I did try to use a .desktop file (copied from a template on the wiki) and it didn't seem to work. I kind of gave up on Slim and SWM at that point.
But I have encountered some odd behaviour with SnapWM that is quite confusing. I don't know if this is because I have a mouse with a "default" profile set in its flash memory or if this issue is a setting I've used in my SnapWM configs.
When I run the WM I quite often have a situation where I cannot re-focus my mouse on an app and use the mouse with that app. Setting my rc.conf file to either "focus follows mouse" or "click to focus" makes no difference. For example, if I had Firefox on desktop 1 and I then open a new xfce4-terminal on desktop 2 my mouse will not interact with my 2nd desktop's app (e.g. xfce4-terminal) and it also won't necessarily interact with Firefox again even if I change desktops. This behaviour isn't limited to having two separate apps on one desktop either. It occurs even if I switch apps while on a single desktop; e.g. having a terminal and a text editor open on one desktop, if I give focus to either one I still can't interact with them using the mouse. Switching from one desktop to the other doesn't help either it seems. I found that switching to my last desktop (using alt-tab) sometimes "unsticks" this behaviour but it isn't guaranteed to work every time either. A quirk I've found is that sometimes right-clicking on an the last focused app will sometimes reset this behaviour. It's quite odd.
I'm posting my keys.conf and rc.conf in case I'm blind and missed something (a not unsual occurence I'm afraid).
# rc.conf
lines starting with a hash are ignored
# Number of DESKTOPS should be first
DESKTOPS 6
# 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 3;4;0;1;2;3;
# 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 0
CLICKTOFOCUS 1
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 "-*-clean-*-*-*-*-14-*-*-*-*-*-*-*"
#
k# Possible Mods are Alt, Control, CtrlAlt, ShftAlt, Super,
# ShftSuper, CtrlSuper, ALTSuper, NULL(for no Mod key)
#
# Set external commands ; use with spawn
CMD dmenucmd;dmenu_run;-i;-nb;#666622;-nf;white;NULL;
CMD xfce4termcmd;xfce4-terminal;NULL;
#
# Shortcut for dmenu_run
KEY Alt;v;spawn;dmenucmd;
#
# Add/remove a window to/from the master area in vertical/horizontal mode
KEY ShftAlt;m;more_master;1;
KEY ShftAlt;l;more_master;-1;
#
# Shortcut for xterm
KEY Super;t;spawn;xfce4-terminal;
#
# Shortcut to exit the window manager
KEY CtrlAlt;q;quit;
#
KEY Super;1;change_desktop;0;
KEY Super;2;change_desktop;1;
KEY Super;3;change_desktop;2;
KEY Super;4;change_desktop;3;
KEY Super;5;change_desktop;4;
KEY Super;6;change_desktop;5;
KEY Super;7;change_desktop;6;
KEY Super;8;change_desktop;7;
KEY Super;9;change_desktop;8;
KEY Super;0;change_desktop;9;
#
KEY Super;Right;rotate_desktop;1;
KEY Super;Left;rotate_desktop;-1;
#
# Send an app to another desktop and follow it
KEY ShftAlt;1;follow_client_to_desktop;0;
KEY ShftAlt;2;follow_client_to_desktop;1;
KEY ShftAlt;3;follow_client_to_desktop;2;
KEY ShftAlt;4;follow_client_to_desktop;3;
KEY ShftAlt;5;follow_client_to_desktop;4;
KEY ShftAlt;6;follow_client_to_desktop;5;
KEY ShftAlt;7;follow_client_to_desktop;6;
KEY ShftAlt;8;follow_client_to_desktop;7;
KEY ShftAlt;9;follow_client_to_desktop;8;
KEY ShftAlt;0;follow_client_to_desktop;9;
#
# Send an app to another desktop but dont't follow it
KEY ShftSuper;1;client_to_desktop;0;
KEY ShftSuper;2;client_to_desktop;1;
KEY ShftSuper;3;client_to_desktop;2;
KEY ShftSuper;4;client_to_desktop;3;
KEY ShftSuper;5;client_to_desktop;4;
KEY ShftSuper;6;client_to_desktop;5;
KEY ShftSuper;7;client_to_desktop;6;
KEY ShftSuper;8;client_to_desktop;7;
KEY ShftSuper;9;client_to_desktop;8;
KEY ShftSuper;0;client_to_desktop;9;
#
KEY Alt;a;rotate_mode;1;
KEY Alt;c;kill_client;
KEY Alt;j;next_win;
KEY Alt;k;prev_win;
KEY Alt;h;resize_master;10;
KEY Alt;l;resize_master;-10;
KEY Alt;p;resize_stack;10;
KEY Alt;o;resize_stack;-10;
KEY Alt;u;update_config;
KEY Alt;Tab;last_desktop;
#
# move windows
KEY ShftAlt;k;move_down;10;
KEY ShftAlt;j;move_up;-10;
KEY ShftAlt;o;move_left;-10;
KEY ShftAlt;p;move_right;10;
KEY ShftAlt;Return;swap_master;
# Switch tiling mode to vertical
KEY ShftAlt;v;switch_mode;0;
# Switch tiling mode to fullscreen
KEY ShftAlt;f;switch_mode;1;
# Switch tiling mode to horizontal
KEY ShftAlt;h;switch_mode;2;
# Switch tiling mode to grid
KEY ShftAlt;g;switch_mode;3;
# Switch tiling mode to center stacking
KEY ShftAlt;c;switch_mode;4;
#
# Show/hide the bar
KEY Super;b;toggle_bar;
#
Offline
Hi MoonSwan
Apart from a line that should be starting with a hash not starting with a hash your confs look ok.
I haven't come across an issue where the mouse wouldn't function in snapwm here. I use it with one monitor on the laptop and two on the desktop machine.
When you click in an unfocused window does the border colour change but you can't scroll or does nothing change?
If nothing changes then X and snapwm are getting nothing from the mouse.
First thing to check with the the mouse is that it is actually working. xev run from a terminal is good for this. Move the mouse into the xev window and there should be new lines printed in the terminal about the mouse entering the window and moving. Click some mouse buttons and again new lines should be printed in the terminal.
Alt+c will close the xev window.
Let me know how it goes.
Cheers
You're just jealous because the voices only talk to me.
Offline
Damnit this thing's making a complete liar out of me! I re-copied my original post's rc.conf contents and put it into a "new" rc.conf file. So far, for some ungodly reason, things are working as they're supposed to. Now I don't know why things were messed up earlier! Well, if things go weird again I will implement your suggestions and try to post (again) with new information (if I have any). Thank you for the quick reply.
Offline
OK this silliness is happening again so I'm going to do my best to help you (and, in turn I hope, help me).
First of all I have the "click to focus" option ON in rc.conf. I don't know if that matters or not but I thought it was worth mentioning. Secondly, I re-mapped my keys to use the "Super" key to change desktops and, curiously, the "next window" (alt-j) and "prev window" (alt-k) keys don't work.
When you click in an unfocused window does the border colour change but you can't scroll or does nothing change?
To answer your question, yes the border does change colour on the screen. And with my "click to focus" on the cursor will raise and focus any open apps on a desktop. I have tried this with "grid" and "vertical" modes so far if that helps at all.
First thing to check with the the mouse is that it is actually working. xev run from a terminal is good for this. Move the mouse into the xev window and there should be new lines printed in the terminal about the mouse entering the window and moving.
I did try this and if my cursor is in the big white box the numbers do change. But if I put the cursor into any of my e.g. terminals, which are running tmux with several windows open, I get zero output from xev. Is this normal?
Offline
So you had issues, they went away and then came back. Since the software didn't change i.e. you didn't make a new snapwm binary with edits to the source, I'm going to say you have hardware issues. Either the memory or hard disk would be my guess.
Check for typos in the keys file to see if that's why the shortcuts stopped working. If not it could be hard disk read write issues.
Xev only reports mouse events when the cursor is in the xev window so it is normal to have no output when the cursor is in another window.
You could start with the sample confs and just change one thing at a time to see if the problem is from the edits you make.
You're just jealous because the voices only talk to me.
Offline
I agree it's either hardware or some it's a different piece of software. I realised, while messing around last night, that I had installed 1 new piece of software, an editor called Medit. I think this may be causing the issues because a few hours after installing it X began to crash and I suspect Medit is the culprit. I'll post back after I do some more debugging and thank you for your advice.
Offline
Well, after some testing with Medit and SWM, it seems that Medit is indeed the problem when it comes to X crashing. I switched to Mousepad as a result and X seems to be stable again.
I just realised that I omitted (accidentally) a (perhaps) key piece of information in my previous posts. I apologise for that as I forgot to say that I run dual monitors with slightly different resolutions. I don't know that that will help but it may be useful. I also run a tiny script to place my xfce terminal as a wallpaper background. It lands on Desktop 1 (by default atm) and I usually send it to Desktop 2 with the "move window and follow" shortcut (shift-alt-[desktop #]" and, again, I don't know if that's at all relevant but I may as well post it just in case.
When I talked about swapping desktops I meant that I keep Desktop 1 on the left (larger) monitor and Desktop 2 on the smaller (right hand) one. This morning I booted into Snap and immediately swapped my terminal wallpaper to desktop 2. I switched back to desktop 1 and used dmenu to open Firefox on Dekstop 1. At this point things get a bit odd and this is reproducible here (I think). Every time I hit my hotkeys to swap focus to either desktop my cursor jumps to the middle of my dual screens and it focuses only desktop 2! No matter what I do I cannot get desktop 1 to be in focus. I have tried to kill SnapWM entirely then re-start it but that made no difference. I have tried to swap to desktop 3/4 (3 on the left and 4 on the right) then re-focus to desktop 1/2 and sometimes that fixes iirc. I'll have to try that again and re-post perhaps.
If it would be helpful I'll share my terminal-masquerading-as-wallpaper script though I think it is unlikely that is the culprit. The hardware works on Windows 7 (e.g. it's not a mechanical issue) and until very recently I ran an Xfce desktop which performed just fine. Should I try another tiling wm? Would i3 be a useful thing to try?
I don't know what else to try and I don't know what I'm doing wrong. I do love SnapWM but this is driving me nuts!
Offline
I don't suffer anything like that on my multi monitor setup here, but I don't use xfce4-terminal and a script to set that as the desktop background. If you post the script I'll see if I can replicate the issue and come up with a fix.
You can set the desktop to start on in rc.conf. See if starting on the second desktop has the xfce4-terminal opening on there and if that sorts things out.
# Desktop to start on: default is 0
#DEFAULT_DESK 0
If you can send the terminal to desktop 2 then it's not really working as a background, it's a window snapwm manages so I suspect there's a conflict happening there. Sounds like if you set desktop 2 to fullscreen and opened the terminal there it would have the same affect as your script, that's just a guess until I see your script.
You're just jealous because the voices only talk to me.
Offline
Thank you for the quick reply! I'm pasting the script's code below because it's short & easy to read. Just to be clear - I didn't write this code I found it on the forums here and have forgotten his name and all the credit goes to him. *makes mental note to search for the author*
#######################################################
# Pink Yunzi's Term as Wallpaper Config #
# Display Size: 1024 x 600 #
# HxW size [Terminal]given in # of charactors. #
# DIMENSIONS=80x20 #
# X+Y position given in pixels. #
# POSITION=180+135 #
#######################################################
#!/bin/bash
#Give a name to the terminal window.
TITLE="wallpaper"
#HxW size given in # of charactors. Example: 25x60
DIMENSIONS=110x25
#X+Y position given in pixels. Example: 100+200
POSITION=280+250
TERMOPTS="--hide-borders --hide-toolbar --hide-menubar --title=$TITLE"
if [[ -z $DIMENSIONS || -z $POSITION ]] || [[ -z $TITLE ]] ; then
echo "wallterm has not been configured! Please edit this script before running it."
exit 1
fi
xfce4-terminal $TERMOPTS --geometry=$DIMENSIONS+$POSITION &
#gnome-terminal $TERMOPTS --geometry=$DIMENSIONS+$POSITION &
opt1="-r "$TITLE" -b add,below,sticky"
opt2="-r "$TITLE" -b add,skip_taskbar,skip_pager"
while true
do
if [[ "$(wmctrl -l | grep -o "$TITLE")" = $TITLE ]] ; then
wmctrl $opt1 && wmctrl $opt2
echo 'done!'
break
fi
done
There are other lines above this which resemble the first part to tell the terminal where to go and its size. Everything within the comment box is a template I use for different machines.
I will try your idea and get back to you as soon as I can.
Last edited by MoonSwan (2014-06-10 21:54:03)
Offline
Your idea seems to have been correct! When I changed the number for the terminal's starting desktop I can indeed swap desktops. I've also figured out that my terminal will display on all of the odd numbered desktops. Kind of neat in a way. However I have encountered some seemingly odd behaviour.
If I start with desktop 1 then switch (using Super #) I can pick any other desktop. However, I do focus that desktop I cannot go back to desktop 1 with my hotkey. Instead my number (1 in this case) simply shows up in the open terminal on desktop 2.
Edit: I figured out that I can use the use the alt-tab hotkey to change between desktop 1 and 2.
Last edited by MoonSwan (2014-06-11 01:21:49)
Offline
That script is a waste of time.
In light wm's the opt1 and opt2 args will do nothing so you can get rid of them, the while loop and wmctl.
If you have snapwm set desktop 2 to fullscreen mode you won't need to worry about borders or geometry.
So all you need to do is run xfce4-terminal with the "--hide-toolbar --hide-menubar --title=wallpaper" options which you shouldn't need a script to do.
Terminals that use gnomes' vte package don't work well in tilers so you should consider doing what most people do and use a better terminal like urxvt or xterm.
Cheers
You're just jealous because the voices only talk to me.
Offline
Thanks very much for the information, I'll definitely look at getting another terminal then. I do wonder why Gnome's VTs don't work well in tiling wms though. Seems kind of strange. I'll test out a different terminal. If I may ask why is urxvt better? I see people on here using it a lot so I always wondered what made it so popular in the Arch community. I always assumed it was because it handled UTF better somehow.
Edit: Off topic but do you know of any other terminals that do not work with tilers or any that might be good aside from urxvt ? I've looked at the Arch wiki page about terminals but it is all simply information about one particular terminal or another which doesn't tell me much of anything.
Last edited by MoonSwan (2014-06-11 23:48:55)
Offline
Gnome makes its' apps for a stacking window manager and doesn't care about small increments in window sizes which causes issues in tilers. Have a look at the bottom of page 23 in this thread where that issue was covered.
I prefer to use urxvt as it has a daemon mode which means less memory used for each opened terminal, is well documented, is popular so there are different patches and plugins available for it and it is easily setup via ~/.Xresources/.Xdefaults.
Here are some non vte terminals. Below that listing are some vte terminals which I would avoid.
Cheers
You're just jealous because the voices only talk to me.
Offline
Thanks for the info! I have tried urxvt in the past but honestly I thought it was pretty complicated (at the time) to set up but I can see your point about its ubiquitousness. I'll definitely have to look at that discussion if I can find it (my thread size is huge so I'm on page 8 here.)
Offline
Cheers
You're just jealous because the voices only talk to me.
Offline
Merci and much thanks!
I think I'll have to give urxvt another go just because you said it's simple.
Edit: OK I lied ... I ended up installing urxvt and it was just so harsh and un-decorated I decided I'll use it as a last resort terminal. I went back to that list of terminals and decided to give QTerminal a shot. I had to makepkg 2 different dependencies before QTerminal would build but I got it. You said that GTK/Gnome terminals don't play nice with tilers sooooo...I got the enemy of Gtk: QT!
I do have one more question: I have "focus follow mouse." Does that mean that focusing a window only works on the desktop currently being used? Sorry for the inquiries but this is my first real exposure to a tiling wm. And I did use the wiki but I don't recall seeing anything on there about focusing windows.
Edit: I'm trying to get the app-on-a-desktop on startup using the apps.conf file. So far it hasn't worked properly. As a test I uncommented the "Thunar" entry, which I do have installed and succesfully launched using dmenu, but still no dice. Here's the file's contents:
# USAGE :
# DESKTOP wm_class;desktop number;0=follow 1=don't;
# DESKTOP Thunar;2;0;
# DESKTOP MPlayer;4;1;
#
# USAGE :
# POSITION wm_class;x;y;width;height;
#
# POSITION Thunar;100;100;800;400;
DESKTOP QTerminal;2;1;
So far everything seems to work as intended aside from the apps issue that is. I never thought a window manager could be fun to "play with."
Have a good day/evening/solar year...
Last edited by MoonSwan (2014-06-13 01:24:03)
Offline