Skip to content

u/bdrum

In this archive from Mar 2016 to May 2018

10
posts
61
comments
3
media
394
score
1 saved before deletion

Oh. You could also try something like

#!/bin/sh
# special_urxvt

xrdb -merge $XRESOURCES_CUSTOM
urxvt $@ &
xrdb -load ~/.Xresources

# fg   # uncomment if you want to retain control of urxvt? assuming this works?

and run

XRESOURCES_CUSTOM="ssh_Xresources" special_urxvt [arguments]

I haven't tested this, but might work? I'm thinking you could just temporarily load the colors, start urxvt, and revert back to standard immediately after launching. Not sure if the & fg trick will actually work, but you can probably safely ignore the fg

2 points

I'm not an imagemagick expert, so there might be a better solution, but this seems to be ok

convert -size 1x2  gradient:"#b6c4dc"-"#fbe3e1" -resize 1920x1080\!  gradient.png

(I just used grabc to extract the top and bottom color)

7 points

Also, it's not too hard to compile dmenu from scratch with defaults you like, and even to add xresources support. The nice thing with suckless code is that it's very hackable (even if they might disapprove of me hacking it to add bloat with colors and such). You can avoid the whole alias dmenu_run thing so that it doesn't depend on other scripts (it's nice to keep things decoupled, when possible)

1 points

There are solutions to avoid refreshing the terminal. a) there are terminal emulators that support this pkill -USR1 -x st will automatically reload xresources in every running instance.

b) In urxvt there are also (more involved) ways

 # Run whatever script you need in every running terminal
 for term in $(ls /dev/pts/ | grep "[0-9][0-9]*"); do
     echo "`chtheme refresh-terminal`" > /dev/pts/$term
 done

combining this with code like you can find in dynamic colors you can pull this off, though the solution obviously isn't as nice.

2 points

I have always liked bitmap wallpapers, but I never knew where people found nice bitmaps. I tracked this down and wanted to share. Maybe this is old news to some.

For those who don't know, you can use xsetroot to set your background with a bitmap file (.xbm) with xsetroot -bg $bg_color -fg $fg_color -bitmap file.xbm

1 points

Bspwm is nice in that you can write your own rules that let you set up the behavior of certain windows. I'm not sure, but this might be useful for you if there is a particular type of window that your are trying to manage. To be honest, I don't know exactly how to force the floating windows to go into the background.

Two other alternatives: wmutils lets you do anything; so if you are comfortable with designing how your window manager works from scratch, then that is always an option. The other thing is that with herbstluftwm "monitors" are virtual. So you can have two monitors on top of one-another on the same screen. Meaning that you can have all floating windows in the lower monitor, and tiled windows in the surface monitor. It's involved to set this up though, as you have to mess with a lot of keybindings, and it also doesn't play the best with multi-screen setups, but I have done it before, and it works well with one screen systems.

2 points

My favorite fonts atm are Dina, CtrlD, and Gohufont. All fairly similar, but they are available in slightly different sizes. Between Gohu and one of the others, you should have a nice font for any size (I use a small Gohu-9 in the terminal, and ctrlD-10 or Dina-8 in emacs (they're oddly the same size, and both larger than gohu-9)

2 points

I'm not sure if I was just missing something, but this didn't adjust my background color (it just floated an image in the center). These lines are a (really) shotty solution, but they do seem to work.

if [ $# -ne 1 ]; then
    echo 1>&2 Usage: $0 image.gif
    exit 1
fi

# Added this
color=$(convert $1 -crop 20x20+0+0 -scale 1x1\! -format '%[pixel:s]' info:- | sed 's/\w\+(\([0-9,]\+\)).*/\1/')
hex_color=$(python -c "r,g,b='$color'.split(',')[0:3]; print('#%02x%02x%02x' % (int(r),int(g),int(b)))")
xsetroot -solid "$hex_color"

#get screen resolution
SCRH=`xrandr | awk '/current/ { print $8 }'`
SCRW=`xrandr | awk '/current/ { print $10 }'`
SCRW=${SCRW%\,}
4 points

In case you are interested (though you may not be), you can use this to do cool stuff in imagemagick. For instance, if your image is too square for your aspect ratio, but looks odd zoomed or stretched, in some cases you can "expand the canvas" using this trick. It will work best on "framed" pieces like this. Just 3 lines of imagemagick

color=$(convert $file -crop 20x20+0+0 -scale 1x1\! -format '%[pixel:s]' info:-)
convert $file -resize 1920x1080  "output.$file"
convert "output.$file" -gravity center -background $color -extent 1920x1080  "output.$file
1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.