Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - a

#16
Zenity & Yad / Re: zenity wm chooser
February 18, 2016, 11:01:08 AM
I have had it not grab focus, very rarely, fortunately my mouse still works so I just click on it then choose.
I finally remembered where I got it!
arch-forum-thread
was written by " u_no_hu"
so you could go to the thread and email him?
I wonder if it was put in a separate script that was called from .xinitrc  if then it would keep focus better.
It does work for me if I do it that way but as it rarely looses focus using it the previous way I have no way of telling if it will make
a difference. Maybe there is something you can put in a bash script that makes it keep active?
or use of wmctrl or
xdotool windowfocus <  >
OR, you could try using xmessage instead of zenity, this script could easily be changed to start window managers
link to script
Yes I have tested it and it works; just put your wm choices in there instead
case $? in
    101)    # Normal
    exec i3       # Start my WindowManager
    break ;;            # End our world as we know it

    110)    # bspwm
    exec /home/dka/bin/start-bspwm
    break ;;            # End our world as we know it

    111)    # whatever
    exec /home/dka/bin/start-whatever
    break ;;

    1)    # Exit
    exit 0  ;;



esac

done
#17
Zenity & Yad / Re: zenity wm chooser
February 17, 2016, 05:40:18 PM
No I think once you choose what wm you want it runs it and exits, cant find anything running when I look at htop.
When you startup, you get  little menu, you can use arrow keys are start typing the first letter or two and then enter key
#18
Zenity & Yad / image resizer
February 17, 2016, 07:57:19 AM
This one is made by gotbletu from youtube, I just changed it slightly to suit myself
#!/bin/bash
#             _   _     _      _         
#  __ _  ___ | |_| |__ | | ___| |_ _   _
# / _` |/ _ \| __| '_ \| |/ _ \ __| | | |
#| (_| | (_) | |_| |_) | |  __/ |_| |_| |
# \__, |\___/ \__|_.__/|_|\___|\__|\__,_|
# |___/                                 
#       https://www.youtube.com/user/gotbletu
#       https://twitter.com/gotbletu
#       https://plus.google.com/+gotbletu
#       https://github.com/gotbletu
#       gotbleu@gmail.com

# Tutorial video: https://www.youtube.com/watch?v=4LouA5E76FM
# Custom Actions that can be used on any File Manager with Custom Actions Support
# This script is to resize images to different resolution
# Requirements: imagemagick, zenity
# Works with jpg png, works with tiff but sometimes gives fault messages but still does it.

# thunar custom actions
# command: /path/to/script %N
# note: %N is the selected filenames (without paths)
# conditions: image files

PICKSIZE=$(zenity --list --radiolist --height "255" --name="Image-Resizer" --title="Resize" --text "<b>Please</b> make a selection:" --hide-header --column "Pick" --column "Item" FALSE "96x96" FALSE "128x128" FALSE "640x480" TRUE "800x600" FALSE "1024x768" FALSE "1280x720" FALSE "1280x960" FALSE "1920x1080")
#changed line below so that there is a dir created specifically for the chosen size
#
mkdir -p resized-images/$PICKSIZE
#mkdir -p resized-images
FILES="$@"
myArray=( "$@" )
for arg in "${myArray[@]}"; do
convert "$arg" -resize "$PICKSIZE" -unsharp 0x0.75+0.75+0.008 "${arg%.*}"_"$PICKSIZE"_RESIZED."${arg##*.}"
#convert "$arg" -resize "$PICKSIZE" "${arg%.*}"_"$PICKSIZE"_RESIZED."${arg##*.}"
#find . -name "*_800x600_resized.jpg" -print0 | xargs -0 -I {} mv {} /home/dka/Pictures/converted_images/
find . -maxdepth 1 -iname "*_resized*" -type f -print0 | xargs -0 -I {} mv {} ~/Pictures/resized-images/$PICKSIZE
done
#19
Zenity & Yad / zenity wm chooser
February 17, 2016, 07:48:41 AM
When I startup my computer I get a zenity box popup to let me choose what wm to start.
I didn't come up with this idea but forgot where I go it.
I put this in my .xinitrc
PROGRAM=$(zenity --width=0\
           --height=0\
           --list\
           --title "SelectWm"\
            --text "Select Window manager"\
            --column ""\
"openbox"\
"snapwm"\
            "dwm"\
            "awesome"\
            "herbstluft"\
            "i3"\
            "Bspwm"\
            "Opossum"\
            "ratpoison"\
            "cwm"\
"notion"\
            "windowmaker"\
            "spectrwm"\
            "jwm"\
            "monster"\
            "fluxbox"\
            "subtle"\
            "franken"\
            "fvwm"\
                )


case $PROGRAM in
    (snapwm)
         while true; do sleep 1; line=$(date +%a:%b:%d:%I:%M); xsetroot -name "$line"; done &
         exec /home/dka/bin/startup-apps &
         exec /home/dka/bin/snapwm;;
    (herbstluft)
         exec /home/dka/bin/dwm-startup-apps &
         exec herbstluftwm --locked;;
    (ratpoison)
exec /home/dka/bin/rat-apps &
exec ratpoison;;
    (cwm)
exec /home/dka/bin/startup-apps &
exec /home/dka/bin/cwm;;
    (notion)
exec /home/dka/bin/dwm-startup-apps &
exec notion;;
    (windowmaker)
exec /home/dka/bin/dwm-startup-apps &
exec wmaker;;
  (dwm)
         while true
            do
            xsetroot -name  "$(date +"%a %b %d %I:%M")"
            sleep 1s
            done &
         exec /home/dka/bin/dwm-startup-apps &
         exec /home/dka/bin/dwm-6.0/dwm;;
    (awesome)
exec /home/dka/bin/startup-apps &
exec awesome;;
    (monster)
         exec /home/dka/bin/dwm-startup-apps &
         exec monster2bar;;
    (i3)
         #exec /home/dka/bin/dwm-startup-apps &
         exec i3;;
    (spectrwm)
exec /home/dka/bin/dwm-startup-apps &
exec spectrwm;;
    (openbox)
         exec openbox-session;;
    (jwm)
exec /home/dka/bin/dwm-startup-apps &
exec /usr/bin/jwm;;
    (fluxbox)
         exec /home/dka/bin/dwm-startup-apps &
         exec fluxbox;;
(Opossum)
exec tint2 &
exec /home/dka/bin/startup-apps &
exec opossum;;
(Bspwm)
# /home/dka/.config/bspwm/startthefuckingpanel &
exec /home/dka/bin/start-bspwm;;
    (fvwm)
         exec /home/dka/bin/startup-apps &
         exec fvwm;;
esac
#20
Introductions / Re: howdy
February 02, 2016, 10:46:04 AM
Thanks for the welcome!  yeah just thought I would mention the register problem as I didn't know what was wrong and almost just gave up, so I wonder how many non native english speakers would have bigger problems and just give up.
#21
Introductions / howdy
February 01, 2016, 10:54:20 AM
just joined, was member on crunchbang forum.
is it just me or are some of the sign up questions strange!
Q: Can birds of prey fly
the correct? answer is NO!!!  So  hawks can't fly, do they chase down their prey on roller blades?