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

Topics - a

#1
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
#2
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
#3
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?