You are not logged in.

#1 2015-11-15 05:11:49

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,812

Config menu

Was thinking about config files and this might be useful

#!/bin/bash
# pipemenu for openbox to edit key archlinux files
# by mrgreen - mrgreen(at)archbang(dot)org

# You need to create a  file in ~/.config/openbox/pipemenus/arch_configs.txt
# add files that you edit such as mirrorlist and pacman.conf or other key config files.

# path too config text file
config_path="$HOME/.config/openbox/pipemenus/arch_configs.txt"

# start pipe menu
echo "<openbox_pipe_menu>"

while read line
do

# extract filename for label
fn="${line##*/}"

# edit command change to suit ... sudo may required depending on file
editcom="lxterminal -e 'sudo nano ${line}'"

# set up openbox menu item
echo "<item label=\"${fn}\" <action name=\"Execute\"><execute>${editcom}</execute></action></item>"
done <${config_path}

# close pipemenu
echo "</openbox_pipe_menu>"

Needs testing!!!!

Basically allows you too edit config file from openbox menu, this may not be the best idea to use for some files but things list mirrorlist pacman.conf etc... backup option might be needed!!!


Comments, suggestions, donations please feel free to contact me mrgreen(at)archbang(dot)org

Offline

#2 2015-11-15 11:13:32

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,812

Re: Config menu

For i3 users something like this might help... has sudo option

https://bbs.archlinux.org/viewtopic.php … 5#p1118255


Comments, suggestions, donations please feel free to contact me mrgreen(at)archbang(dot)org

Offline

Board footer

Powered by FluxBB