updated scripts, added configs, new screenshot

Former-commit-id: 80e5a611d9
Former-commit-id: d6d963dd470140b7a955399ff22fec885ddace30
This commit is contained in:
elena 2017-08-29 02:28:24 +03:00
parent b633e81511
commit e43cf1ccde
437 changed files with 46670 additions and 22 deletions

View file

@ -1,2 +1,27 @@
#upower -i $(upower -e | grep 'BAT') | grep -E "state|to\ full|percentage"
echo -n " "; upower -i $(upower -e | grep 'BAT') | grep -E "percentage" | awk '{print $2;}'
#!/bin/zsh
# upower -i $(upower -e | grep 'BAT') | grep -E "state|to\ full|percentage"
# glyphs:     
INFO="$(upower -i "$(upower -e | grep 'BAT')")"
STATE="$(echo $INFO | grep "state" | awk '{print $2}')"
# Note: I cut off the percentage sign so i can later compare POWER as an int
POWER="$(echo $INFO | grep "percentage" | awk '{print $2}' | head -c -2)"
# TODO!
if [[ "$STATE" = "discharging" ]]; then
if [ "$POWER" -ge "85" ]; then
echo "$POWER%"
elif [ "$POWER" -ge "60" ]; then
echo "$POWER%"
elif [ "$POWER" -ge "35" ]; then
echo "$POWER%"
elif [ "$POWER" -ge "10" ]; then
echo "$POWER%"
else
echo "$POWER%"
fi
else
# State = fully charged or charging
echo "$POWER%"
fi

View file

@ -1,3 +1,11 @@
#!/bin/bash
#   
CPU="$[100-$(vmstat 1 2|tail -1|awk '{printf "%d", $15}')]"
echo "$CPU%"
GOVERNOR="$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)"
if [[ "$GOVERNOR" == "performance" ]]; then
echo "$CPU%"
else
echo "$CPU%"
fi

9
Scripts/flux-toggle Executable file
View file

@ -0,0 +1,9 @@
#NEEDS WORK!
redshift -p > /home/elena/redtemp
CURRENT="$(cat /home/elena/redtemp | grep "temp" | awk '{print $3;}')"
DAY = "5500K"
if [ "$CURRENT" == "$DAY" ]
then echo "REDSHIFT OFF"
else echo "REDSHIFT ON"
fi

View file

@ -1 +1 @@
rofi -show combi -combi-modi "window,run" -lines 10 -width 100 -padding 10 -fullscreen -font "Hurmit Nerd Font 18" -separator-style "none"
rofi -show combi -combi-modi "window,run" -lines 12 -width 100 -padding 80 -fullscreen -font "Hurmit Nerd Font 30" -separator-style "none"

3
Scripts/hello_world.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
# For testing purposes
notify-send 'Hello world!' 'This is an example notification.' --icon=dialog-information

17
Scripts/inet.sh Executable file
View file

@ -0,0 +1,17 @@
# needs work! not thoroughly tested...
# Replace with your own interface names here
WIRELESS_IF="wlp3s0"
WIRED_IF="enp2s0f0"
WIFI="$(ifconfig | grep -A 1 $WIRELESS_IF | grep "inet" | awk '{print $2}')"
ETHER="$(ifconfig | grep -A 1 $WIRED_IF | grep "inet" | awk '{print $2}')"
if [ ${#ETHER} -eq "0" ]; then
if [ ${#WIFI} -eq "0" ]; then
echo "  "
else
echo "$WIFI"
fi
else
echo "$ETHER"
fi

1
Scripts/mail Executable file
View file

@ -0,0 +1 @@
chromium-browser --new-window https://mail.google.com/mail/u/0/#inbox https://outlook.live.com/owa/ https://webmail.uth.gr/login.php https://mail.yahoo.com/

12
Scripts/print_xcolors Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
declare -a color
declare -a XCOLOR_OLD
declare -a XCOLOR_NEW
# Create array with old colors
for (( i = 0; i < 8; i++ )); do
color[$i]="$(echo color$i)"
XCOLOR_OLD[$i]="$(cat ~/.Xresources | grep -m 1 ${color[$i]} | awk '{print $2}')"
echo ${XCOLOR_OLD[$i]}
done

View file

@ -1 +1,2 @@
free -m | awk 'NR==2{printf " %d%%\n", $3*100/$2 }'
free -m | awk 'NR==2{printf " %d%%\n", $3*100/$2 }'
#  

25
Scripts/scrollingtext.sh Executable file
View file

@ -0,0 +1,25 @@
# Scrolling text v2
LIMIT=12
SEPERATOR=" ~~~ "
SEPERATOR_LENGTH="$(echo ${#SEPERATOR})"
i=1
while :
do
# Get input and create the full string that will be used
INPUT="$@"
INPUT_LENGTH="$(echo ${#INPUT})"
LOOPTAIL="$(echo $INPUT | cut -c -$LIMIT)"
FULLSTRING="$(echo $INPUT | sed "s/$/$SEPERATOR/" | sed "s/$/$LOOPTAIL/" )"
# Show only LIMIT characters. Output scrolls due to incrementing i
echo -n $FULLSTRING | cut -c $i-$(($LIMIT+$i))
# If we have shown the full string, start over
if [ $i -eq $(($INPUT_LENGTH+$SEPERATOR_LENGTH)) ]; then
i=0
fi
i=$(($i+1))
sleep 1
done

3
Scripts/temperature.sh Executable file
View file

@ -0,0 +1,3 @@
#
TEMP="$(sensors | grep "Package" | awk '{print $4}' | cut -c 2-3,6-8)"
echo "$TEMP"

View file

@ -1 +1,3 @@
killall tint2 && sleep 1 && tint2 &
killall tint2
sleep 1
tint2 &

View file

@ -1 +1 @@
amixer get Master | grep "${snd_cha}" | awk -F'[]%[]' '/%/ {if ($7 == "off") {print " xxx\n"} else {printf " %d%%\n", $2}}'
amixer get Master | grep "${snd_cha}" | awk -F'[]%[]' '/%/ {if ($7 == "off") {print " \n"} else {printf " %d%%\n", $2}}'

View file

@ -1,4 +1,5 @@
#!/bin/bash
# Requires wal or pywal (github)
# Run like this
# wally /path/to/wallpaper/or/directory
@ -13,6 +14,7 @@ if [ $# == 0 ]; then
exit 0;
fi
# Declare arrays
declare -a color
declare -a XCOLOR_OLD
declare -a XCOLOR_NEW
@ -48,7 +50,8 @@ for (( i = 0; i < 8; i++ )); do
done
# Restart tint2 to reload config file
# The grep is to supress tint2 output (doesn't work very well though)
# The grep is to supress tint2 output
# (doesn't work very well because tint2 is run in the background and can bypass this)
tint2restart | grep shutup! &
echo "> tint2 has restarted!"
@ -57,13 +60,6 @@ echo "> tint2 has restarted!"
openbox --reconfigure
echo "> Openbox is reconfigured!"
# Customize login screen: REQUIRES SUDO :(
# (needs to happen after oomox has generated a gtk theme with the name wally)
#
# echo "> Attempting to change login theme (you will be prompted for a password)"
# gksu cp -r ~/.themes/oomox-wally /usr/share/themes/wally
# gksu lightdm-gtk-greeter-settings
# Copy new wallpaper path to wally's directory
cp ~/.cache/wal/wal ~/.wally/path_to_wallpaper
WALLPAPER="$(cat ~/.wally/path_to_wallpaper)"

11
Scripts/wally-setlogintheme Executable file
View file

@ -0,0 +1,11 @@
# Copies the gtk theme created by oomox to /usr/share/icons
# so that it can be used by lightdm greeter
echo -n "> Replacing gtk theme and icons... "
rm -rf /usr/share/themes/wally
rm -rf /usr/share/icons/wally
cp -r ~/.themes/oomox-wally /usr/share/themes/wally
cp -r ~/.icons/oomox-wally-flat /usr/share/icons/wally
echo "Done!"
echo "> Starting lightdm-gtk-greeter-settings..."
lightdm-gtk-greeter-settings
echo "> All done :)"

60
Scripts/weather.sh Executable file
View file

@ -0,0 +1,60 @@
#!/bin/bash
# needs work
CITY="Hamburg"
# glyphs (TODO)
#  day cloud
#  storm
#  night cloud
#  rain
# umbrella 
#  snow 
#  sun
#  cloud
#  moon  star
#   house
#  globe
#  bed
# curl -4 http://wttr.in/@$(curl -s 'https://api.ipify.org?format=plaintext')
TEMP="$(curl -s -A "Mozilla/5.0" wttr.in/$CITY | grep -m 1 '°C'| awk '{print $(NF-1)}' | cut -d ">" -f2 | cut -f1 -d "<")"
# NOTE: Currently weather state disabled. Uncomment to reenable
# STATE="$(curl -s -A "Mozilla/5.0" wttr.in/$CITY | grep -m 1 -B 1 '°C' | sed '$d' | awk '{printf "%s %s", $(NF-1), $NF}')"
# PRELAST="$(echo $STATE | awk '{print $1}')"
# HOUR="$(date +%H)"
# # Check if state is only one word
# if [[ "$PRELAST" = "</span>" ]]; then
# STATE="$(echo $STATE | awk '{print $2}')"
# fi
# if [[ "$STATE" = "Clear" ]]; then
# if [ $HOUR -lt 20 ] && [ $HOUR -gt $5 ]; then
# echo " $TEMP°C"
# else
# echo " $TEMP°C"
# fi
# elif [[ "$STATE" = "Partly cloudy" ]]; then
# if [ $HOUR -lt 20 ] && [ $HOUR -gt 5 ]; then
# echo " $TEMP°C"
# else
# echo " $TEMP°C"
# fi
# elif [[ "$STATE" = "Cloudy" ]]; then
# echo " $TEMP°C"
# elif [[ "$STATE" = "Sunny" ]]; then
# echo " $TEMP°C"
# else
# echo " $TEMP°C"
# fi
# City+degrees
#echo $CITY $TEMP°C
# Degrees only
echo "$TEMP°C"

View file

@ -1,13 +1,92 @@
# Prints the title of the first open YouTube window
#!/bin/bash
# Prints the title of the first open YouTube window, while scrolling (sexy!)
# It works if the tab is in focus, so seperate the youtube tab from
# the rest of the browser so you don't have to keep it in focus and the script will work.
OUTPUT="$(wmctrl -l | grep -v "wmctrl" | grep -m 1 YouTube | awk -v skipstart=3 -v skipend=4 '{delim = ""; for (i=skipstart+1;i<=NF-skipend;i++) {printf delim "%s", $i; delim = OFS};}')"
if [ "$OUTPUT" = "" ]; then
echo " "
else
echo "$OUTPUT" | head -c 35
fi
# Note: on tint2, set interval=0 and continuous output=2 or larger
# (in general continuous output should be larger than sleep time)
# TODO: start from the beginning if the output has changed (if the song has changed)
# Another way
# b=${a:12:5}
# (where 12 is the offset (zero-based) and 5 is the length)
# Limit for scrolling text
LIMIT=16
#SEPERATOR=" --- "
#SEPERATOR=" -- "
SEPERATOR=" ~~~ "
#SEPERATOR=" ~~ "
#SEPERATOR=" <> "
SEPERATOR_LENGTH="$(echo ${#SEPERATOR})"
# for multibyte chars (idk if it works):
# iconv -sc -t UTF-8 -f cp1251
# tr -dc '[:print:]'
i=1
while :
do
# Seach for youtube and pandora windows
YOUTUBE="$(wmctrl -l | grep -v "wmctrl" | grep -m 1 "YouTube")"
PANDORA="$(wmctrl -l | grep -v "wmctrl" | grep -m 1 "Pandora Radio")"
# Get input and create the full string that will be used
#INPUT="$(echo $YOUTUBE | awk -v skipstart=3 -v skipend=4 '{delim = ""; for (i=skipstart+1;i<=NF-skipend;i++) {printf delim "%s", $i; delim = OFS};}')"
INPUT="$(echo $YOUTUBE | awk -v skipstart=3 -v skipend=4 '{delim = ""; for (i=skipstart+1;i<=NF-skipend;i++) {printf delim "%s", $i; delim = OFS};}' | tr -dc '[:print:]')"
INPUT_LENGTH="$(echo ${#INPUT})"
# If the song has changed, start from the beginning (buggy if you use $INPUT with trimmed multibyte characters)
# if [[ "$INPUT" != "$OLD_INPUT" ]]; then
# i=1
# fi
# todo: if i > length, i=1
# If no youtube window is found (+pandora)
if [ ${#YOUTUBE} -eq "0" ]; then
if [ ${#PANDORA} -eq "0" ]; then
#echo "  "
echo "  "
else
echo " Pandora Radio"
fi
elif [ $INPUT_LENGTH -le $LIMIT ]; then
echo -n " "
echo $INPUT
else
LOOPTAIL="$(echo $INPUT | cut -c -$LIMIT)"
FULLSTRING="$(echo $INPUT | sed "s/$/$SEPERATOR/" | sed "s/$/$LOOPTAIL/" )"
# This is to prevent the bug when song changes and current i is larger than current song length
if [ $i -gt "${#FULLSTRING}" ]; then
i=1
fi
echo -n " "
# Show only LIMIT characters, from i to i+LIMIT. Output scrolls due to incrementing i
echo -n $FULLSTRING | cut -c $i-$(($LIMIT+$i))
#echo -n $FULLSTRING | awk -v charlimit="$LIMIT" -v start="$i" '{print substr($0,start,charlimit)}'
# If we have shown the full string, start over
if [ $i -eq $(($INPUT_LENGTH+$SEPERATOR_LENGTH)) ]; then
i=0
fi
i=$(($i+1))
fi
OLD_INPUT="$(echo $INPUT)"
# for fat bars, I add this newline so the previous output is not visible
echo ""
sleep 1
done
# general method to exlude fields
# awk -v skipstart=1 -v skipend=1 '{delim = ""; for (i=skipstart+1;i<=NF-skipend;i++) {printf delim "%s", $i; delim = OFS}; printf "\n"}'

92
Xresources Normal file
View file

@ -0,0 +1,92 @@
! Cursor theme
xcursor.theme: Vanilla-DMZ
! URxvt config
URxvt*termName: rxvt-unicode
URxvt.scrollBar: off
URxvt.font: xft:Hurmit Nerd Font:size=9:antialias=true:hinting=true:autohint=true
!URxvt.font: xft:mononoki Nerd Font:size=10:antialias=true
URxvt.letterSpace: 0
URxvt.internalBorder: 8
URxvt.geometry: 80x16
URxvt*selectToClipboard: true
URxvt*saveLines: 10000
URxvt.perl-ext-common: default,matcher,tabbedex,searchable-scrollback
URxvt.urlLauncher: /usr/bin/chromium
URxvt.matcher.button: 1
URxvt.tabbed.tabbar-fg: 8
URxvt.tabbed.tabbar-bg: 0
URxvt.tabbed.tab-fg: 2
URxvt.tabbed.tab-bg: 0
URxvt.tabbed.new-button: no
URxvt.tabbed.title: no
! For Transparency
urxvt*depth: 32
!urxvt*background: rgba:0200/1000/1700/c700
!URxvt*background: #050509
!urxvt*background: rgba:0500/0500/0900/e00f
!urxvt*background: rgba:0100/0000/0B00/e00f
!urxvt*background: rgba:0000/0000/0b00/f00f
!urxvt*background: rgba:0200/0000/0a00/ffff
! xscreensaver
xscreensaver.fade: false
xscreensaver.unfade: false
rofi.font: Hurmit Nerd Font Bold 11
rofi.bw: 2
rofi.width: 50
rofi.lines: 10
rofi.scroll-method: 1
!!! COLORS UNDER HERE !!!
URxvt*foreground: #DBDCDF
XTerm*foreground: #DBDCDF
URxvt*background: #0D0D0D
XTerm*background: #0D0D0D
URxvt*cursorColor: #DBDCDF
XTerm*cursorColor: #0D0D0D
*color0: #0D0D0D
*.color0: #0D0D0D
*color1: #8C776C
*.color1: #8C776C
*color2: #657985
*.color2: #657985
*color3: #758892
*.color3: #758892
*color4: #9EA4A9
*.color4: #9EA4A9
*color5: #B7BDC2
*.color5: #B7BDC2
*color6: #BDC1C6
*.color6: #BDC1C6
*color7: #DBDCDF
*.color7: #DBDCDF
*color8: #666666
*.color8: #666666
*color9: #8C776C
*.color9: #8C776C
*color10: #657985
*.color10: #657985
*color11: #758892
*.color11: #758892
*color12: #9EA4A9
*.color12: #9EA4A9
*color13: #B7BDC2
*.color13: #B7BDC2
*color14: #BDC1C6
*.color14: #BDC1C6
*color15: #DBDCDF
*.color15: #DBDCDF
*color66: #0D0D0D
rofi.color-window: argb:FF0D0D0D, #0D0D0D, #657985
rofi.color-normal: argb:FF0D0D0D, #DBDCDF, #0D0D0D, #657985, #0D0D0D
rofi.color-active: argb:FF0D0D0D, #DBDCDF, #0D0D0D, #657985, #0D0D0D
rofi.color-urgent: argb:FF0D0D0D, #8C776C, #0D0D0D, #8C776C, #DBDCDF
emacs*background: #0D0D0D
emacs*foreground: #DBDCDF

2
config/openbox/autostart Executable file
View file

@ -0,0 +1,2 @@
~/.fehbg &
tint2 &

138
config/openbox/menu.xml Normal file
View file

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/ file:///usr/share/openbox/menu.xsd">
<menu id="root-menu" label="Openbox 3.5">
<!-- <menu id="openbox-menu" label="Applications" execute="/usr/bin/openbox-menu lxde-applications.menu"/> -->
<menu execute="~/.config/openbox/pipemenus/obpipemenu-places ~/" id="places" label="Places"/>
<menu execute="~/.config/openbox/pipemenus/obrecent.sh ~/" id="recent" label="Recent Files"/>
<menu id="Preferences" label="Preferences">
<menu id="root-menu-525118" label="Openbox Config">
<item label="Edit autostart">
<action name="Execute">
<execute>
subl ~/.config/openbox/autostart
</execute>
</action>
</item>
<!-- <item label="GUI Menu Editor">
<action name="Execute">
<execute>
obmenu
</execute>
</action>
</item> -->
<item label="GUI Config Tool">
<action name="Execute">
<execute>
obconf
</execute>
</action>
</item>
<item label="Key Editor">
<action name="Execute">
<!-- <execute>
obkey
</execute> -->
<execute>
subl ~/.config/openbox/rc.xml
</execute>
</action>
</item>
<item label="Menu Editor">
<action name="Execute">
<execute>
subl ~/.config/openbox/menu.xml
</execute>
</action>
</item>
<item label="Reconfigure">
<action name="Reconfigure"/>
</item>
<item label="Restart">
<action name="Restart"/>
</item>
</menu>
<menu id="root-menu-23433" label="Take Screenshot">
<item label="Now">
<action name="Execute">
<execute>
scrot '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/Pictures/Screenshots/ &amp; feh ~/Pictures/Screenshots/$f'
</execute>
</action>
</item>
<item label="In 5 Seconds...">
<action name="Execute">
<execute>
scrot -d 5 '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/Pictures/Screenshots/ &amp; feh ~/Pictures/Screenshots/$f'
</execute>
</action>
</item>
<item label="In 10 Seconds...">
<action name="Execute">
<execute>
scrot -d 10 '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/Pictures/Screenshots/ &amp; feh ~/Pictures/Screenshots/$f'
</execute>
</action>
</item>
<item label="Selected Area... (click &amp; drag mouse)">
<action name="Execute">
<execute>
scrot -s '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/Pictures/Screenshots/ &amp; feh ~/Pictures/Screenshots/$f'
</execute>
</action>
</item>
</menu>
<menu id="root-menu-571948" label="tint2 config">
<item label="Edit tint2rc">
<action name="Execute">
<execute>
subl ~/.config/tint2/tint2rc
</execute>
</action>
</item>
<item label="tint2conf">
<action name="Execute">
<execute>
tint2conf
</execute>
</action>
</item>
</menu>
<item label="Input Device Preferences">
<action name="Execute">
<execute>
lxinput
</execute>
</action>
</item>
<item label="Screen Resolution">
<action name="Execute">
<execute>
arandr
</execute>
</action>
</item>
<item label="User Interface Settings">
<action name="Execute">
<execute>
lxappearance
</execute>
</action>
</item>
<item label="Wallpaper">
<action name="Execute">
<execute>
nitrogen
</execute>
</action>
</item>
</menu>
<separator/>
<item label="Exit">
<action name="Execute">
<execute>
lxsession-logout
</execute>
</action>
</item>
</menu>
</openbox_menu>

View file

@ -0,0 +1,105 @@
#!/usr/bin/perl
# Recursively browse filesystem through openbox3 pipe menus
#### Usage: add
# <menu id="browse" label="Browse" execute="obpipemenu-places ~" />
# to your .config/openbox/menu.xml
#### CAVEAT ####
# This script was hacked on exclusively in stints between the hours of
# 4 and 5 in the morning. Quality may have suffered.
####
# Script by dircha from ob list on 05/17/04
# suggested improvements by John Russell on 05/17/04 implemented
# a year later by Kacper Wysocki.
# 05/30/05 - Kacper Wysocki
# - opens files with 'rox', which launches appropriate file handler
# - hidden directories now stay hidden
# - spaces, ampersands in dir- and filenames are escaped
# - newlines at each entry to make output a little readable
# 06/04/05 - Kacper Wysocki
# - use $0 for scriptname
# - use $ENV{'HOME'} as default path
# - now follows symlinks
# 09/07/16 - g00dy
# - handle special characters in path
# - unbroke detecting symlinked folders
# - use xdg-open to open files
use strict;
# Command to lauch files with
my $cmd = "pcmanfm";
my $path = $ARGV[0];
$path = "$ENV{'HOME'}" if $path eq "";
$path = rpl_path($path);
my @files = split /\n/, `ls -1pL $path`;
mk_menu_element($path, @files);
sub mk_menu_element {
my ($path, @files) = @_;
print "<openbox_pipe_menu>\n";
# "Browse here..." lauches this dir
my $mpath = rpl_xml($path);
print "<item label=\"Browse here..\">".
"\n\t<action name=\"Execute\">".
"\n\t\t<execute>$cmd $mpath</execute>".
"\n\t</action>".
"\n</item>\n".
"<separator />";
foreach $_ (@files) {
my $length = length $_;
my $last_c = substr $_, $length - 1, 1;
if ($last_c eq "/") {
print mk_dir_element($path, substr $_, 0, $length - 1);
} else {
print mk_file_element($path, $_);
}
}
print "</openbox_pipe_menu>\n";
}
sub mk_dir_element {
my ($path, $name) = @_;
# escape ampersand and space in pathnames
my $lbl = rpl_xml(rpl_lbl($name));
my $pathname = rpl_xml($path . "/" . rpl_path($name));
return "<menu id=\"$pathname\" label=\"$lbl\" execute=\"$0 $pathname\" />\n";
}
sub mk_file_element {
my ($path, $name) = @_;
my $lbl = rpl_xml(rpl_lbl($name));
my $pathname = rpl_xml($path . "/" . rpl_path($name));
return "<item label=\"$lbl\">".
"\n\t<action name=\"Execute\">".
"\n\t\t<execute>xdg-open $pathname</execute>".
"\n\t</action>".
"\n</item>\n";
}
sub rpl_path {
my ($path) = @_;
$path =~ s/([ "'&\(\)\[\]])/\\$+/g;
return $path;
}
sub rpl_lbl {
my ($path) = @_;
$path =~ s/_/__/g;
return $path;
}
sub rpl_xml {
my ($lbl) = @_;
$lbl =~ s/&/&amp;/g;
$lbl =~ s/'/&apos;/g;
$lbl =~ s/\"/&quot;/g;
$lbl =~ s/[^\x09\x0A\x0D\x20-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]/ /go;
return $lbl;
}

View file

@ -0,0 +1,17 @@
#!/bin/sh
echo "<openbox_pipe_menu>"
files=$(
cat ~/.local/share/recently-used.xbel | grep file:/// | tail -n15 | cut -d "\"" -f 2 | tac | while read line;
do
file=$(echo "$line")
name=$(echo -en "$file" | sed 's,.*/,,' | sed 's/%20/ /g' | sed 's/%/\\x/g' | sed 's/_/__/g')
echo -e "<item label=\"$name\">
\t<action name=\"Execute\"><command>xdg-open $line</command></action>
</item>"
done);
echo "$files"
echo "<separator />"
echo "<item label=\"Clear Recent Documents\">
<action name=\"Execute\"><command>rm ~/.local/share/recently-used.xbel</command></action>
</item>"
echo "</openbox_pipe_menu>"

1111
config/openbox/rc.xml Normal file

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
2fa96d82ce40ac1b4f05a9e9e9798bc9eec76c81

Some files were not shown because too many files have changed in this diff Show more