First DotFiles
This commit is contained in:
parent
ce30bab262
commit
8f45c275e3
|
@ -0,0 +1,154 @@
|
||||||
|
# Oklomsy's .bashrc file
|
||||||
|
# Includes snippets from the following sites:
|
||||||
|
# https://gitlab.com/FallFur/config-files-bashrc-vimrc/-/blob/master/.bashrc
|
||||||
|
# https://gitlab.com/dwarmstrong/dotfiles/blob/master/.bashrc
|
||||||
|
# https://gitlab.com/only_vip/mxtest-dope-dots/-/blob/master/.bashrc
|
||||||
|
# http://bashrcgenerator.com/
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
case $- in
|
||||||
|
*i*) ;;
|
||||||
|
*) return;;
|
||||||
|
esac
|
||||||
|
# Colour codes
|
||||||
|
red='\[\e[0;31m\]'
|
||||||
|
RED='\[\e[1;31m\]'
|
||||||
|
blue='\[\e[0;34m\]'
|
||||||
|
BLUE='\[\e[1;34m\]'
|
||||||
|
cyan='\[\e[0;36m\]'
|
||||||
|
CYAN='\[\e[1;36m\]'
|
||||||
|
green='\[\e[0;32m\]'
|
||||||
|
GREEN='\[\e[1;32m\]'
|
||||||
|
yellow='\[\e[0;33m\]'
|
||||||
|
YELLOW='\[\e[1;33m\]'
|
||||||
|
PURPLE='\[\e[1;35m\]'
|
||||||
|
purple='\[\e[0;35m\]'
|
||||||
|
nc='\[\e[0m\]'
|
||||||
|
WHITE="\\[\\e[1;37m\\]"
|
||||||
|
RESET="\\[\\e[0m\\]"
|
||||||
|
|
||||||
|
# (Un)mount usb devices
|
||||||
|
mu() { sudo mountusb -m $1 ; }
|
||||||
|
umu() { sudo mountusb -u $1 ; }
|
||||||
|
# LUKS-encrypted usb device
|
||||||
|
muc() { sudo cryptset -o $1 && sudo mountusb -m $1 ; }
|
||||||
|
umuc() { sudo mountusb -u $1 && sudo cryptset -c $1 ; }
|
||||||
|
|
||||||
|
|
||||||
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
|
# See bash(1) for more options
|
||||||
|
HISTCONTROL=ignoreboth:ignoredups:erasedups
|
||||||
|
|
||||||
|
# Unlimited history
|
||||||
|
HISTSIZE=
|
||||||
|
HISTFILESIZE=
|
||||||
|
|
||||||
|
# Change the history file location because certain bash sessions truncate
|
||||||
|
# ~/.bash_history upon close
|
||||||
|
HISTFILE=~/.bash_unlimited_history
|
||||||
|
|
||||||
|
# After each command, append to the history file and reread it
|
||||||
|
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
|
||||||
|
|
||||||
|
# Append to the history file, don't overwrite it.
|
||||||
|
shopt -s histappend
|
||||||
|
|
||||||
|
# Set colours
|
||||||
|
eval `dircolors`
|
||||||
|
|
||||||
|
# check the window size after each command and, if necessary,
|
||||||
|
# update the values of LINES and COLUMNS.
|
||||||
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
### Useful aliases
|
||||||
|
|
||||||
|
alias aaa="sudo apt update && apt list --upgradable && sudo apt full-upgrade && sudo apt-get autoclean && sudo apt autoremove"
|
||||||
|
alias shutdown="/usr/sbin/shutdown now"
|
||||||
|
alias suspend="systemctl suspend"
|
||||||
|
alias reboot="/usr/sbin/shutdown -r now"
|
||||||
|
alias hibernate="systemctl hibernate"
|
||||||
|
alias ls="exa"
|
||||||
|
alias x="exit"
|
||||||
|
alias cat="bat"
|
||||||
|
|
||||||
|
# enable programmable completion features (you don't need to enable
|
||||||
|
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||||
|
# sources /etc/bash.bashrc).
|
||||||
|
if ! shopt -oq posix; then
|
||||||
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||||
|
. /usr/share/bash-completion/bash_completion
|
||||||
|
elif [ -f /etc/bash_completion ]; then
|
||||||
|
. /etc/bash_completion
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# set variable identifying the chroot you work in.
|
||||||
|
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||||
|
debian_chroot=$(cat /etc/debian_chroot)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||||
|
# off by default to not distract the user: the focus in a terminal window
|
||||||
|
# should be on the output of commands, not on the prompt
|
||||||
|
force_color_prompt=yes
|
||||||
|
|
||||||
|
if [ -n "$force_color_prompt" ]; then
|
||||||
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||||
|
# a case would tend to support setf rather than setaf.)
|
||||||
|
color_prompt=yes
|
||||||
|
else
|
||||||
|
color_prompt=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$color_prompt" = yes ]; then
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||||
|
else
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||||
|
fi
|
||||||
|
unset color_prompt force_color_prompt
|
||||||
|
|
||||||
|
# color GCC warning and errors
|
||||||
|
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||||
|
|
||||||
|
# Separate aliases file... I don't need it now but maybe later.
|
||||||
|
if [ -f ~/.bash_aliases ]; then
|
||||||
|
. ~/.bash_aliases
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add sbin directories to PATH. This is useful on systems that have sudo
|
||||||
|
echo $PATH | grep -Eq "(^|:)/sbin(:|)" || PATH=$PATH:/sbin
|
||||||
|
echo $PATH | grep -Eq "(^|:)/usr/sbin(:|)" || PATH=$PATH:/usr/sbin
|
||||||
|
|
||||||
|
|
||||||
|
# Archive extraction (Usage: ex <file>)
|
||||||
|
ex ()
|
||||||
|
{
|
||||||
|
if [ -f $1 ] ; then
|
||||||
|
case $1 in
|
||||||
|
*.tar.bz2) tar xjf $1 ;;
|
||||||
|
*.tar.gz) tar xzf $1 ;;
|
||||||
|
*.bz2) bunzip2 $1 ;;
|
||||||
|
*.rar) unrar x $1 ;;
|
||||||
|
*.gz) gunzip $1 ;;
|
||||||
|
*.tar) tar xf $1 ;;
|
||||||
|
*.tbz2) tar xjf $1 ;;
|
||||||
|
*.tgz) tar xzf $1 ;;
|
||||||
|
*.zip) unzip $1 ;;
|
||||||
|
*.Z) uncompress $1;;
|
||||||
|
*.7z) 7z x $1 ;;
|
||||||
|
*.deb) ar x $1 ;;
|
||||||
|
*.tar.xz) tar xf $1 ;;
|
||||||
|
*.tar.zst) unzstd $1 ;;
|
||||||
|
*) echo "'$1' cannot be extracted via ex()" ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "'$1' is not a valid file"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export PS1="\[\033[38;5;13m\]\u\[$(tput sgr0)\]@\[$(tput sgr0)\]\[\033[38;5;14m\]\H\[$(tput sgr0)\]:\[$(tput sgr0)\]\[\033[38;5;10m\][\w]\[$(tput sgr0)\]:\[$(tput sgr0)\]\[\033[38;5;11m\]\\$\[$(tput sgr0)\] "
|
|
@ -0,0 +1,40 @@
|
||||||
|
# System-wide support stuff
|
||||||
|
. $GLOBALAUTOSTART &
|
||||||
|
|
||||||
|
# Compositor
|
||||||
|
compton &
|
||||||
|
|
||||||
|
# Pulseaudio insanity
|
||||||
|
pulseaudio --kill &
|
||||||
|
/usr/sbin/alsactl restore &
|
||||||
|
pulseaudio --start &
|
||||||
|
|
||||||
|
# Networking
|
||||||
|
nm-applet &
|
||||||
|
|
||||||
|
# Restore background.
|
||||||
|
nitrogen --restore &
|
||||||
|
|
||||||
|
# Screensaver
|
||||||
|
xscreensaver -no-splash &
|
||||||
|
|
||||||
|
# Clock, panel, everything.
|
||||||
|
tint2 &
|
||||||
|
|
||||||
|
# Notifications
|
||||||
|
dunst &
|
||||||
|
|
||||||
|
# Power manager
|
||||||
|
xfce4-power-manager &
|
||||||
|
|
||||||
|
# Clipboard
|
||||||
|
parcellite &
|
||||||
|
|
||||||
|
# Volume manager
|
||||||
|
pnmixer &
|
||||||
|
|
||||||
|
# Gnome Keyring
|
||||||
|
gnome-keyring-daemon -r &
|
||||||
|
|
||||||
|
# Play startup audio
|
||||||
|
mplayer ~/.config/openbox/login.ogg
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
<openbox_menu xsi:schemaLocation="http://openbox.org/ file:///usr/share/openbox/menu.xsd">
|
||||||
|
<menu execute="~/.config/openbox/obamenu.py" id="root-menu" label="Applications" />
|
||||||
|
</openbox_menu>
|
|
@ -0,0 +1,330 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
#
|
||||||
|
# Version 3.0.0
|
||||||
|
# Revised: onuronsekiz (overlord)
|
||||||
|
# Original Author: rmoe (v1.1.7)
|
||||||
|
#
|
||||||
|
# / revisions and additions:
|
||||||
|
#
|
||||||
|
# - recoded for python 3.9+
|
||||||
|
# - menu sort for both categories and programs
|
||||||
|
# - finding all possible icons by searching deeply in themes
|
||||||
|
# - icon search algorithm for faster approach
|
||||||
|
# - desktop item ignored if Exec command not found in system
|
||||||
|
# - automatic and direct theme selection if possible
|
||||||
|
# - flatpak applications support
|
||||||
|
# - duplicate icon handling
|
||||||
|
#
|
||||||
|
# ----- config ---
|
||||||
|
|
||||||
|
import subprocess, glob, os
|
||||||
|
|
||||||
|
userhome = os.path.expanduser('~')
|
||||||
|
applications_dirs = ("/usr/share/applications", userhome + "/.local/share/applications","/var/lib/flatpak/exports/share/applications")
|
||||||
|
image_dir_base = ("/usr/share", "/var/lib/flatpak/exports/share") # without "pixmaps" -/usr/local/share in FreeBSD, /usr/share on linux
|
||||||
|
try: #automatic theme selection
|
||||||
|
with open(userhome + "/.gtkrc-2.0", 'r') as readobj:
|
||||||
|
for line in readobj:
|
||||||
|
if "gtk-icon-theme-name" in line:
|
||||||
|
selected_theme=line.split("\"")[1]
|
||||||
|
except IOError:
|
||||||
|
selected_theme = "Adwaita" #fallback theme
|
||||||
|
|
||||||
|
selected_theme = "Adwaita" # direct theme selection, don't make it hicolor. ***** SOME DISTRIBUTIONS REQUIRES THIS OPTION UNCOMMENTED.
|
||||||
|
application_groups = ("AudioVideo", "Development", "Editors", "Engineering", "Games", "Graphics", "Internet", "Multimedia", "Office", "Other", "Settings", "System", "Utilities") # enter here new category as you wish, it will be sorted
|
||||||
|
group_aliases = {"Audio":"Multimedia","Video":"Multimedia","AudioVideo":"Multimedia","Network":"Internet","Game":"Games", "Utility":"Utilities", "Development":"Editors","GTK":"", "GNOME":""}
|
||||||
|
ignoreList = ("gtk3-icon-browser","evince-previewer", "Ted", "wingide3.2", "python3.4", "feh","xfce4-power-manager-settings", "picom","compton","yad-icon-browser" )
|
||||||
|
prefixes = ("legacy","categories","apps","devices","mimetypes","places","preferences","actions", "status","emblems") #added for prefered icon dirs and sizes. could be gathered automatically but wouldn't be sorted like this
|
||||||
|
iconSizes = ("48","32","24","16","48x48","40x40","36x36","32x32","24x24","64x64","72x72","96x96","16x16","128x128","256x256","scalable","apps","symbolic")
|
||||||
|
terminal_string = "xfce4-terminal -e " # your favourites terminal exec string
|
||||||
|
simpleOBheader = True # print full xml style OB header
|
||||||
|
# --- End of user config ---
|
||||||
|
|
||||||
|
#constants and list for icon list generating
|
||||||
|
image_file_prefix = (".png", ".svg", ".xpm")
|
||||||
|
image_cat_prefix = ("applications-", "accessories-dictionary", "accessories-text-editor","preferences-desktop.","audio-speakers")
|
||||||
|
iconThemes=os.listdir(image_dir_base[0]+"/icons")
|
||||||
|
tmplst=[s for s in iconThemes if selected_theme in s]
|
||||||
|
selected_theme = iconThemes[0] if tmplst == [] else tmplst[0]
|
||||||
|
iconThemes.sort(key=str.lower)
|
||||||
|
#iconThemes = ("hicolor", "breeze", "Adwaita", "Papirus", "Tango") #you can manually enter icon names here with your own sorting
|
||||||
|
iconThemes.remove(selected_theme)
|
||||||
|
iconThemes.remove('hicolor') if 'hicolor' in iconThemes else False
|
||||||
|
iconThemes.insert(0, selected_theme) if selected_theme != 'hicolor' else False
|
||||||
|
iconThemes.insert(0, "hicolor")
|
||||||
|
iconList=[]
|
||||||
|
|
||||||
|
#getting icons to lists for faster menu generate
|
||||||
|
def addIconsToList(List, theme): # skip to next icon theme if any icon couldn't found on current
|
||||||
|
for path in reversed(image_dir_base):
|
||||||
|
for prfx in prefixes:
|
||||||
|
for size in iconSizes:
|
||||||
|
tmp = path + "/icons/" + theme + "/" + size + "/" + prfx
|
||||||
|
if theme == "breeze" or theme == "breeze-dark":
|
||||||
|
tmp = path + "/icons/" + theme + "/" + prfx + "/" + size
|
||||||
|
try:
|
||||||
|
List.extend(tmp + "/" + x for x in os.listdir(tmp) if x.lower().endswith(image_file_prefix))
|
||||||
|
except IOError:
|
||||||
|
continue
|
||||||
|
return List
|
||||||
|
|
||||||
|
def which(program): #check if program exist
|
||||||
|
def is_exe(fpath):
|
||||||
|
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
|
||||||
|
fpath, fname = os.path.split(program)
|
||||||
|
if fpath:
|
||||||
|
if is_exe(program):
|
||||||
|
return program
|
||||||
|
else:
|
||||||
|
for path in os.environ["PATH"].split(os.pathsep):
|
||||||
|
exe_file = os.path.join(path, program)
|
||||||
|
if is_exe(exe_file):
|
||||||
|
return exe_file
|
||||||
|
return None
|
||||||
|
|
||||||
|
class dtItem(object):
|
||||||
|
def __init__(self, fName):
|
||||||
|
self.fileName = fName
|
||||||
|
self.Name = ""
|
||||||
|
self.Comment = ""
|
||||||
|
self.Exec = ""
|
||||||
|
self.Terminal = None
|
||||||
|
self.Type = ""
|
||||||
|
self.Icon = ""
|
||||||
|
self.Categories = ()
|
||||||
|
|
||||||
|
def addName(self, data):
|
||||||
|
self.Name = xescape(data)
|
||||||
|
|
||||||
|
def addComment(self, data):
|
||||||
|
self.Comment = data
|
||||||
|
|
||||||
|
def addExec(self, data):
|
||||||
|
if len(data) > 3 and data[-2] == '%': # get rid of filemanager arguments in dt files
|
||||||
|
data = data[:-2].strip()
|
||||||
|
self.Exec = data
|
||||||
|
|
||||||
|
def addIcon(self, data):
|
||||||
|
self.Icon = ""
|
||||||
|
if image_cat_prefix == "":
|
||||||
|
return
|
||||||
|
image_dir = image_dir_base[0] + "/pixmaps/"
|
||||||
|
di = data.strip()
|
||||||
|
if len(di) < 3:
|
||||||
|
#"Error in %s: Invalid or no icon '%s'" % (self.fileName, di)
|
||||||
|
return
|
||||||
|
dix = di.find("/") # is it a full path?
|
||||||
|
if dix >= 0 and dix <= 2: # yes, its a path (./path or ../path or /path ...)
|
||||||
|
self.Icon = di
|
||||||
|
return
|
||||||
|
#else a short name like "myapp"
|
||||||
|
tmp = glob.glob(image_dir + di + ".*")
|
||||||
|
if len(tmp) == 0: #if there is not correct icon in pixmap, check for icon theme
|
||||||
|
for theme in iconThemes:
|
||||||
|
tmp=[s for s in iconList if di in s] #check program name in icon list
|
||||||
|
if len(tmp) > 0:
|
||||||
|
break # end loop if found
|
||||||
|
else:
|
||||||
|
addIconsToList(iconList, theme)
|
||||||
|
if len(tmp) == 1 and tmp[0] != "/":
|
||||||
|
self.Icon = tmp[0]
|
||||||
|
if len(tmp) > 1: # if there are duplicated icons take one that has the shortest name
|
||||||
|
temp=tmp[0] # assign first item to a temp path
|
||||||
|
flen=len(temp.split("/")[-1]) # split filepath with "/" and take last element of list
|
||||||
|
for fpath in tmp: # check filepath list for shortest filename
|
||||||
|
tlen=len(fpath.split("/")[-1]) # split filepath with / and take last element of list
|
||||||
|
if tlen<flen: # replace icon path with shorter filename path
|
||||||
|
flen=tlen # reallocate shortest filename length
|
||||||
|
temp=fpath # reallocate temp path
|
||||||
|
self.Icon = temp
|
||||||
|
return
|
||||||
|
|
||||||
|
def addTerminal(self, data):
|
||||||
|
if data == "True" or data == "true":
|
||||||
|
self.Terminal = True
|
||||||
|
else:
|
||||||
|
self.Terminal = False
|
||||||
|
|
||||||
|
def addType(self, data):
|
||||||
|
self.Type = data
|
||||||
|
|
||||||
|
def addCategories(self, data):
|
||||||
|
self.Categories = data
|
||||||
|
|
||||||
|
def getCatIcon(cat):
|
||||||
|
theme = selected_theme
|
||||||
|
cat = image_cat_prefix[0] + cat.lower()
|
||||||
|
#some category icons don't appear, for major icon themes, fixes for them
|
||||||
|
if theme == "breeze" or theme == "breeze-dark":
|
||||||
|
if cat == "applications-editors":
|
||||||
|
cat = "applications-education-language"
|
||||||
|
if cat == "applications-settings":
|
||||||
|
cat = "applications-development"
|
||||||
|
if theme != "Adwaita" and theme != "gnome":
|
||||||
|
if cat == "applications-editors":
|
||||||
|
cat = "applications-development"
|
||||||
|
if theme == "Adwaita":
|
||||||
|
if cat == "applications-multimedia":
|
||||||
|
cat = "audio-speakers"
|
||||||
|
if theme == "Adwaita" or theme == "Papirus" or theme == "gnome":
|
||||||
|
if cat == "applications-editors":
|
||||||
|
cat = "accessories-text-editor"
|
||||||
|
if cat == "applications-settings":
|
||||||
|
cat = "preferences-desktop"
|
||||||
|
if cat == "applications-education":
|
||||||
|
cat = "accessories-dictionary"
|
||||||
|
if theme != "breeze" or theme != "breeze-dark":
|
||||||
|
if cat == "applications-settings":
|
||||||
|
cat = "preferences-desktop"
|
||||||
|
if theme == "Tango":
|
||||||
|
if cat == "applications-utilities":
|
||||||
|
cat = "applications-accessories"
|
||||||
|
tmp = [s for s in iconList if cat in s]
|
||||||
|
if len(tmp) > 0:
|
||||||
|
return tmp[0]
|
||||||
|
return ""
|
||||||
|
|
||||||
|
def xescape(s):
|
||||||
|
Rep = {"&":"&", "<":"<", ">":">", "'":"'", "\"":"""}
|
||||||
|
for p in ("&", "<", ">", "'","\""):
|
||||||
|
sl = len(s); last = -1
|
||||||
|
while last < sl:
|
||||||
|
i = s.find(p, last+1)
|
||||||
|
if i < 0:
|
||||||
|
done = True
|
||||||
|
break
|
||||||
|
last = i
|
||||||
|
l = s[:i]
|
||||||
|
r = s[i+1:]
|
||||||
|
s = l + Rep[p] + r
|
||||||
|
return s
|
||||||
|
|
||||||
|
def process_category(cat, curCats, aliases=group_aliases, appGroups=application_groups):
|
||||||
|
# first process aliases
|
||||||
|
if aliases.__contains__(cat):
|
||||||
|
if aliases[cat] == "":
|
||||||
|
return "" # ignore this one
|
||||||
|
cat = aliases[cat]
|
||||||
|
if cat in appGroups and cat not in curCats: # valid categories only and no doublettes, please
|
||||||
|
curCats.append(cat)
|
||||||
|
return cat
|
||||||
|
return ""
|
||||||
|
|
||||||
|
def process_dtfile(dtf, catDict): # process this file & extract relevant info
|
||||||
|
active = False # parse only after "[Desktop Entry]" line
|
||||||
|
fh = open(dtf, "r")
|
||||||
|
lines = fh.readlines()
|
||||||
|
this = dtItem(dtf)
|
||||||
|
for l in lines:
|
||||||
|
l = l.strip()
|
||||||
|
if l == "[Desktop Entry]":
|
||||||
|
active = True
|
||||||
|
continue
|
||||||
|
if active == False: # we don't care about licenses or other comments
|
||||||
|
continue
|
||||||
|
if l == None or len(l) < 1 or l[0] == '#':
|
||||||
|
continue
|
||||||
|
if l[0] == '[' and l != "[Desktop Entry]":
|
||||||
|
active = False
|
||||||
|
continue
|
||||||
|
# else
|
||||||
|
eqi = l.split('=',1)
|
||||||
|
if len(eqi) < 2:
|
||||||
|
print ("Error: Invalid .desktop line'" + l + "'")
|
||||||
|
continue
|
||||||
|
# Check what it is ...
|
||||||
|
if eqi[0] == "Name":
|
||||||
|
this.addName(eqi[1])
|
||||||
|
elif eqi[0] == "Comment":
|
||||||
|
this.addComment(eqi[1])
|
||||||
|
elif eqi[0] == "Exec":
|
||||||
|
# check if appExec command in desktop file is installed in system
|
||||||
|
eqx=eqi[1].split(" ", 1)[0]
|
||||||
|
if which(eqx) == None:
|
||||||
|
return #don't add anything to menu if executable not found, goto next desktop file
|
||||||
|
this.addExec(eqi[1]) # add appExec to list
|
||||||
|
elif eqi[0] == "Icon":
|
||||||
|
this.addIcon(eqi[1])
|
||||||
|
elif eqi[0] == "Terminal":
|
||||||
|
this.addTerminal(eqi[1])
|
||||||
|
elif eqi[0] == "Type":
|
||||||
|
if eqi[1] != "Application":
|
||||||
|
continue
|
||||||
|
this.addType(eqi[1])
|
||||||
|
elif eqi[0] == "Categories":
|
||||||
|
if eqi[1] == '':
|
||||||
|
eqi[1] = "Other"
|
||||||
|
if eqi[1][-1] == ';':
|
||||||
|
eqi[1] = eqi[1][0:-1]
|
||||||
|
cats = []
|
||||||
|
dtCats = eqi[1].split(';')
|
||||||
|
for cat in dtCats:
|
||||||
|
result = process_category(cat, cats)
|
||||||
|
this.addCategories(cats)
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
# add to catDict
|
||||||
|
#this.dprint()
|
||||||
|
if len(this.Categories) > 0: # don't care about stuff w/o category
|
||||||
|
for cat in this.Categories:
|
||||||
|
catDict[cat].append(this)
|
||||||
|
#catDict[cat].sort() #python2 code, not working on py3
|
||||||
|
|
||||||
|
addIconsToList(iconList, selected_theme) # getting first icons for list
|
||||||
|
categoryDict = {}
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
# init the application group dict (which will contain list of apps)
|
||||||
|
application_groups=sorted(application_groups, key=str.lower)
|
||||||
|
for appGroup in application_groups:
|
||||||
|
categoryDict[appGroup] = []
|
||||||
|
# now let's look into the app dirs ...
|
||||||
|
#changed desktop files processing loops to add flatpak applications and sorting
|
||||||
|
dtFiles=[]
|
||||||
|
for appDir in applications_dirs:
|
||||||
|
appDir += "/*.desktop"
|
||||||
|
dtFiles+=glob.glob(appDir)
|
||||||
|
# process each .desktop file in dir
|
||||||
|
for dtf in dtFiles:
|
||||||
|
skipFlag = False
|
||||||
|
for ifn in ignoreList:
|
||||||
|
if dtf.find(ifn) >= 0:
|
||||||
|
skipFlag = True
|
||||||
|
if skipFlag == False:
|
||||||
|
process_dtfile(dtf, categoryDict)
|
||||||
|
# now, generate jwm menu include
|
||||||
|
if simpleOBheader == True:
|
||||||
|
print ("<openbox_pipe_menu>") # magic header
|
||||||
|
else:
|
||||||
|
print ('<?xml version="1.0" encoding="UTF-8" ?><openbox_pipe_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/" >') #magic header
|
||||||
|
appGroupLen = len(application_groups)
|
||||||
|
for ag in range(appGroupLen):
|
||||||
|
catList = categoryDict[application_groups[ag]]
|
||||||
|
if len(catList) < 1:
|
||||||
|
continue # don't create empty menus
|
||||||
|
# sort list
|
||||||
|
tmpList=[] #blank list to convert to tuple for sorting purpose
|
||||||
|
for app in catList:
|
||||||
|
app.Name= ' '.join([word[0].upper()+word[1:] for word in app.Name.split(' ')]) # fancy way to capitalize first letters
|
||||||
|
tmpList.append([app.Name, [app.Icon, app.Terminal, app.Exec]]) #creating a tuple to sort
|
||||||
|
catList=sorted(tmpList, key = lambda x: x[0].lower()) #recreating catList with sorted tuple list
|
||||||
|
#catList=sorted(tmpList, key=lambda (a,b): (a.lower(), b)) # sort with case ignore, py2 code, not working on py3
|
||||||
|
# end of sort
|
||||||
|
catStr = "<menu id=\"openbox-%s\" label=\"%s\" " % (application_groups[ag], application_groups[ag])
|
||||||
|
tmp = getCatIcon(application_groups[ag])
|
||||||
|
if tmp != "":
|
||||||
|
catStr += "icon=\"%s\"" % tmp
|
||||||
|
print (catStr + ">")
|
||||||
|
for app in catList:
|
||||||
|
progStr = "<item "
|
||||||
|
progStr += "label=\"%s\" " % app[0] #add app's name
|
||||||
|
if app[1][0] != "": #check if there is app icon
|
||||||
|
progStr += "icon=\"%s\" " % app[1][0] #adding icons path
|
||||||
|
progStr += "><action name=\"Execute\"><command><![CDATA["
|
||||||
|
if app[1][1] == True: #check if app run in terminal
|
||||||
|
progStr += terminal_string + " "
|
||||||
|
progStr += "%s]]></command></action></item>" % app[1][2] #adding exec command
|
||||||
|
print (progStr)
|
||||||
|
print ("</menu>")
|
||||||
|
print ("</openbox_pipe_menu>") # magic footer
|
||||||
|
pass # done/debug break
|
|
@ -0,0 +1,798 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Do not edit this file, it will be overwritten on install.
|
||||||
|
Copy the file to $HOME/.config/openbox/ instead. -->
|
||||||
|
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
<resistance>
|
||||||
|
<strength>10</strength>
|
||||||
|
<screen_edge_strength>20</screen_edge_strength>
|
||||||
|
</resistance>
|
||||||
|
<focus>
|
||||||
|
<focusNew>yes</focusNew>
|
||||||
|
<!-- always try to focus new windows when they appear. other rules do
|
||||||
|
apply -->
|
||||||
|
<followMouse>no</followMouse>
|
||||||
|
<!-- move focus to a window when you move the mouse into it -->
|
||||||
|
<focusLast>yes</focusLast>
|
||||||
|
<!-- focus the last used window when changing desktops, instead of the one
|
||||||
|
under the mouse pointer. when followMouse is enabled -->
|
||||||
|
<underMouse>no</underMouse>
|
||||||
|
<!-- move focus under the mouse, even when the mouse is not moving -->
|
||||||
|
<focusDelay>200</focusDelay>
|
||||||
|
<!-- when followMouse is enabled, the mouse must be inside the window for
|
||||||
|
this many milliseconds (1000 = 1 sec) before moving focus to it -->
|
||||||
|
<raiseOnFocus>no</raiseOnFocus>
|
||||||
|
<!-- when followMouse is enabled, and a window is given focus by moving the
|
||||||
|
mouse into it, also raise the window -->
|
||||||
|
</focus>
|
||||||
|
<placement>
|
||||||
|
<policy>Smart</policy>
|
||||||
|
<!-- 'Smart' or 'UnderMouse' -->
|
||||||
|
<center>yes</center>
|
||||||
|
<!-- whether to place windows in the center of the free area found or
|
||||||
|
the top left corner -->
|
||||||
|
<monitor>Primary</monitor>
|
||||||
|
<!-- with Smart placement on a multi-monitor system, try to place new windows
|
||||||
|
on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
|
||||||
|
the active window is, 'Primary' - only on the primary monitor -->
|
||||||
|
<primaryMonitor>1</primaryMonitor>
|
||||||
|
<!-- The monitor where Openbox should place popup dialogs such as the
|
||||||
|
focus cycling popup, or the desktop switch popup. It can be an index
|
||||||
|
from 1, specifying a particular monitor. Or it can be one of the
|
||||||
|
following: 'Mouse' - where the mouse is, or
|
||||||
|
'Active' - where the active window is -->
|
||||||
|
</placement>
|
||||||
|
<theme>
|
||||||
|
<name>E5150-Cyan</name>
|
||||||
|
<titleLayout>NLIMC</titleLayout>
|
||||||
|
<!--
|
||||||
|
available characters are NDSLIMC, each can occur at most once.
|
||||||
|
N: window icon
|
||||||
|
L: window label (AKA title).
|
||||||
|
I: iconify
|
||||||
|
M: maximize
|
||||||
|
C: close
|
||||||
|
S: shade (roll up/down)
|
||||||
|
D: omnipresent (on all desktops).
|
||||||
|
-->
|
||||||
|
<keepBorder>yes</keepBorder>
|
||||||
|
<animateIconify>yes</animateIconify>
|
||||||
|
<font place="ActiveWindow">
|
||||||
|
<name>sans</name>
|
||||||
|
<size>8</size>
|
||||||
|
<!-- font size in points -->
|
||||||
|
<weight>bold</weight>
|
||||||
|
<!-- 'bold' or 'normal' -->
|
||||||
|
<slant>normal</slant>
|
||||||
|
<!-- 'italic' or 'normal' -->
|
||||||
|
</font>
|
||||||
|
<font place="InactiveWindow">
|
||||||
|
<name>sans</name>
|
||||||
|
<size>8</size>
|
||||||
|
<!-- font size in points -->
|
||||||
|
<weight>bold</weight>
|
||||||
|
<!-- 'bold' or 'normal' -->
|
||||||
|
<slant>normal</slant>
|
||||||
|
<!-- 'italic' or 'normal' -->
|
||||||
|
</font>
|
||||||
|
<font place="MenuHeader">
|
||||||
|
<name>sans</name>
|
||||||
|
<size>9</size>
|
||||||
|
<!-- font size in points -->
|
||||||
|
<weight>normal</weight>
|
||||||
|
<!-- 'bold' or 'normal' -->
|
||||||
|
<slant>normal</slant>
|
||||||
|
<!-- 'italic' or 'normal' -->
|
||||||
|
</font>
|
||||||
|
<font place="MenuItem">
|
||||||
|
<name>sans</name>
|
||||||
|
<size>9</size>
|
||||||
|
<!-- font size in points -->
|
||||||
|
<weight>normal</weight>
|
||||||
|
<!-- 'bold' or 'normal' -->
|
||||||
|
<slant>normal</slant>
|
||||||
|
<!-- 'italic' or 'normal' -->
|
||||||
|
</font>
|
||||||
|
<font place="ActiveOnScreenDisplay">
|
||||||
|
<name>sans</name>
|
||||||
|
<size>9</size>
|
||||||
|
<!-- font size in points -->
|
||||||
|
<weight>bold</weight>
|
||||||
|
<!-- 'bold' or 'normal' -->
|
||||||
|
<slant>normal</slant>
|
||||||
|
<!-- 'italic' or 'normal' -->
|
||||||
|
</font>
|
||||||
|
<font place="InactiveOnScreenDisplay">
|
||||||
|
<name>sans</name>
|
||||||
|
<size>9</size>
|
||||||
|
<!-- font size in points -->
|
||||||
|
<weight>bold</weight>
|
||||||
|
<!-- 'bold' or 'normal' -->
|
||||||
|
<slant>normal</slant>
|
||||||
|
<!-- 'italic' or 'normal' -->
|
||||||
|
</font>
|
||||||
|
</theme>
|
||||||
|
<desktops>
|
||||||
|
<!-- this stuff is only used at startup, pagers allow you to change them
|
||||||
|
during a session
|
||||||
|
|
||||||
|
these are default values to use when other ones are not already set
|
||||||
|
by other applications, or saved in your session
|
||||||
|
|
||||||
|
use obconf if you want to change these without having to log out
|
||||||
|
and back in -->
|
||||||
|
<number>4</number>
|
||||||
|
<firstdesk>1</firstdesk>
|
||||||
|
<names>
|
||||||
|
<!-- set names up here if you want to, like this:
|
||||||
|
<name>desktop 1</name>
|
||||||
|
<name>desktop 2</name>
|
||||||
|
-->
|
||||||
|
</names>
|
||||||
|
<popupTime>875</popupTime>
|
||||||
|
<!-- The number of milliseconds to show the popup for when switching
|
||||||
|
desktops. Set this to 0 to disable the popup. -->
|
||||||
|
</desktops>
|
||||||
|
<resize>
|
||||||
|
<drawContents>yes</drawContents>
|
||||||
|
<popupShow>Nonpixel</popupShow>
|
||||||
|
<!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
|
||||||
|
<popupPosition>Center</popupPosition>
|
||||||
|
<!-- 'Center', 'Top', or 'Fixed' -->
|
||||||
|
<popupFixedPosition>
|
||||||
|
<!-- these are used if popupPosition is set to 'Fixed' -->
|
||||||
|
<x>10</x>
|
||||||
|
<!-- positive number for distance from left edge, negative number for
|
||||||
|
distance from right edge, or 'Center' -->
|
||||||
|
<y>10</y>
|
||||||
|
<!-- positive number for distance from top edge, negative number for
|
||||||
|
distance from bottom edge, or 'Center' -->
|
||||||
|
</popupFixedPosition>
|
||||||
|
</resize>
|
||||||
|
<!-- You can reserve a portion of your screen where windows will not cover when
|
||||||
|
they are maximized, or when they are initially placed.
|
||||||
|
Many programs reserve space automatically, but you can use this in other
|
||||||
|
cases. -->
|
||||||
|
<margins>
|
||||||
|
<top>0</top>
|
||||||
|
<bottom>0</bottom>
|
||||||
|
<left>0</left>
|
||||||
|
<right>0</right>
|
||||||
|
</margins>
|
||||||
|
<dock>
|
||||||
|
<position>TopLeft</position>
|
||||||
|
<!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
|
||||||
|
<floatingX>0</floatingX>
|
||||||
|
<floatingY>0</floatingY>
|
||||||
|
<noStrut>no</noStrut>
|
||||||
|
<stacking>Above</stacking>
|
||||||
|
<!-- 'Above', 'Normal', or 'Below' -->
|
||||||
|
<direction>Vertical</direction>
|
||||||
|
<!-- 'Vertical' or 'Horizontal' -->
|
||||||
|
<autoHide>no</autoHide>
|
||||||
|
<hideDelay>300</hideDelay>
|
||||||
|
<!-- in milliseconds (1000 = 1 second) -->
|
||||||
|
<showDelay>300</showDelay>
|
||||||
|
<!-- in milliseconds (1000 = 1 second) -->
|
||||||
|
<moveButton>Middle</moveButton>
|
||||||
|
<!-- 'Left', 'Middle', 'Right' -->
|
||||||
|
</dock>
|
||||||
|
<keyboard>
|
||||||
|
<chainQuitKey>C-g</chainQuitKey>
|
||||||
|
<!-- Keybindings for desktop switching -->
|
||||||
|
<keybind key="C-A-Left">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>left</to>
|
||||||
|
<wrap>no</wrap>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="C-A-Right">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>right</to>
|
||||||
|
<wrap>no</wrap>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="C-A-Up">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>up</to>
|
||||||
|
<wrap>no</wrap>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="C-A-Down">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>down</to>
|
||||||
|
<wrap>no</wrap>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="S-A-Left">
|
||||||
|
<action name="SendToDesktop">
|
||||||
|
<to>left</to>
|
||||||
|
<wrap>no</wrap>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="S-A-Right">
|
||||||
|
<action name="SendToDesktop">
|
||||||
|
<to>right</to>
|
||||||
|
<wrap>no</wrap>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="S-A-Up">
|
||||||
|
<action name="SendToDesktop">
|
||||||
|
<to>up</to>
|
||||||
|
<wrap>no</wrap>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="S-A-Down">
|
||||||
|
<action name="SendToDesktop">
|
||||||
|
<to>down</to>
|
||||||
|
<wrap>no</wrap>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="W-F1">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>1</to>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="W-F2">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>2</to>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="W-F3">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>3</to>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="W-F4">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>4</to>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="W-d">
|
||||||
|
<action name="ToggleShowDesktop"/>
|
||||||
|
</keybind>
|
||||||
|
<!-- Keybindings for windows -->
|
||||||
|
<keybind key="A-F4">
|
||||||
|
<action name="Close"/>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="A-Escape">
|
||||||
|
<action name="Lower"/>
|
||||||
|
<action name="FocusToBottom"/>
|
||||||
|
<action name="Unfocus"/>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="A-space">
|
||||||
|
<action name="ShowMenu">
|
||||||
|
<menu>client-menu</menu>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<!-- Take a screenshot of the current window with scrot when Alt+Print are pressed -->
|
||||||
|
<keybind key="A-Print">
|
||||||
|
<action name="Execute">
|
||||||
|
<command>scrot -s</command>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<!-- Keybindings for window switching -->
|
||||||
|
<keybind key="A-Tab">
|
||||||
|
<action name="NextWindow">
|
||||||
|
<finalactions>
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
<action name="Unshade"/>
|
||||||
|
</finalactions>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="A-S-Tab">
|
||||||
|
<action name="PreviousWindow">
|
||||||
|
<finalactions>
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
<action name="Unshade"/>
|
||||||
|
</finalactions>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="C-A-Tab">
|
||||||
|
<action name="NextWindow">
|
||||||
|
<panels>yes</panels>
|
||||||
|
<desktop>yes</desktop>
|
||||||
|
<finalactions>
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
<action name="Unshade"/>
|
||||||
|
</finalactions>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<!-- Keybindings for window switching with the arrow keys -->
|
||||||
|
<keybind key="W-S-Right">
|
||||||
|
<action name="DirectionalCycleWindows">
|
||||||
|
<direction>right</direction>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="W-S-Left">
|
||||||
|
<action name="DirectionalCycleWindows">
|
||||||
|
<direction>left</direction>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="W-S-Up">
|
||||||
|
<action name="DirectionalCycleWindows">
|
||||||
|
<direction>up</direction>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<keybind key="W-S-Down">
|
||||||
|
<action name="DirectionalCycleWindows">
|
||||||
|
<direction>down</direction>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<!-- Keybindings for running applications -->
|
||||||
|
<keybind key="W-e">
|
||||||
|
<action name="Execute">
|
||||||
|
<startupnotify>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
<name>Konqueror</name>
|
||||||
|
</startupnotify>
|
||||||
|
<command>kfmclient openProfile filemanagement</command>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
<!-- Launch scrot when Print is pressed -->
|
||||||
|
<keybind key="Print">
|
||||||
|
<action name="Execute">
|
||||||
|
<command>scrot</command>
|
||||||
|
</action>
|
||||||
|
</keybind>
|
||||||
|
</keyboard>
|
||||||
|
<mouse>
|
||||||
|
<dragThreshold>1</dragThreshold>
|
||||||
|
<!-- number of pixels the mouse must move before a drag begins -->
|
||||||
|
<doubleClickTime>500</doubleClickTime>
|
||||||
|
<!-- in milliseconds (1000 = 1 second) -->
|
||||||
|
<screenEdgeWarpTime>400</screenEdgeWarpTime>
|
||||||
|
<!-- Time before changing desktops when the pointer touches the edge of the
|
||||||
|
screen while moving a window, in milliseconds (1000 = 1 second).
|
||||||
|
Set this to 0 to disable warping -->
|
||||||
|
<screenEdgeWarpMouse>false</screenEdgeWarpMouse>
|
||||||
|
<!-- Set this to TRUE to move the mouse pointer across the desktop when
|
||||||
|
switching due to hitting the edge of the screen -->
|
||||||
|
<context name="Frame">
|
||||||
|
<mousebind button="A-Left" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="A-Left" action="Click">
|
||||||
|
<action name="Unshade"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="A-Left" action="Drag">
|
||||||
|
<action name="Move"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="A-Right" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
<action name="Unshade"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="A-Right" action="Drag">
|
||||||
|
<action name="Resize"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="A-Middle" action="Press">
|
||||||
|
<action name="Lower"/>
|
||||||
|
<action name="FocusToBottom"/>
|
||||||
|
<action name="Unfocus"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="A-Up" action="Click">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>previous</to>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="A-Down" action="Click">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>next</to>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="C-A-Up" action="Click">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>previous</to>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="C-A-Down" action="Click">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>next</to>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="A-S-Up" action="Click">
|
||||||
|
<action name="SendToDesktop">
|
||||||
|
<to>previous</to>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="A-S-Down" action="Click">
|
||||||
|
<action name="SendToDesktop">
|
||||||
|
<to>next</to>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="Titlebar">
|
||||||
|
<mousebind button="Left" action="Drag">
|
||||||
|
<action name="Move"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Left" action="DoubleClick">
|
||||||
|
<action name="ToggleMaximize"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Up" action="Click">
|
||||||
|
<action name="if">
|
||||||
|
<shaded>no</shaded>
|
||||||
|
<then>
|
||||||
|
<action name="Shade"/>
|
||||||
|
<action name="FocusToBottom"/>
|
||||||
|
<action name="Unfocus"/>
|
||||||
|
<action name="Lower"/>
|
||||||
|
</then>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Down" action="Click">
|
||||||
|
<action name="if">
|
||||||
|
<shaded>yes</shaded>
|
||||||
|
<then>
|
||||||
|
<action name="Unshade"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
</then>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="Titlebar Top Right Bottom Left TLCorner TRCorner BRCorner BLCorner">
|
||||||
|
<mousebind button="Left" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
<action name="Unshade"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Middle" action="Press">
|
||||||
|
<action name="Lower"/>
|
||||||
|
<action name="FocusToBottom"/>
|
||||||
|
<action name="Unfocus"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Right" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
<action name="ShowMenu">
|
||||||
|
<menu>client-menu</menu>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="Top">
|
||||||
|
<mousebind button="Left" action="Drag">
|
||||||
|
<action name="Resize">
|
||||||
|
<edge>top</edge>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="Left">
|
||||||
|
<mousebind button="Left" action="Drag">
|
||||||
|
<action name="Resize">
|
||||||
|
<edge>left</edge>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="Right">
|
||||||
|
<mousebind button="Left" action="Drag">
|
||||||
|
<action name="Resize">
|
||||||
|
<edge>right</edge>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="Bottom">
|
||||||
|
<mousebind button="Left" action="Drag">
|
||||||
|
<action name="Resize">
|
||||||
|
<edge>bottom</edge>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Right" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
<action name="ShowMenu">
|
||||||
|
<menu>client-menu</menu>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="TRCorner BRCorner TLCorner BLCorner">
|
||||||
|
<mousebind button="Left" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
<action name="Unshade"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Left" action="Drag">
|
||||||
|
<action name="Resize"/>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="Client">
|
||||||
|
<mousebind button="Left" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Middle" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Right" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="Icon">
|
||||||
|
<mousebind button="Left" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
<action name="Unshade"/>
|
||||||
|
<action name="ShowMenu">
|
||||||
|
<menu>client-menu</menu>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Right" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
<action name="ShowMenu">
|
||||||
|
<menu>client-menu</menu>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="AllDesktops">
|
||||||
|
<mousebind button="Left" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
<action name="Unshade"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Left" action="Click">
|
||||||
|
<action name="ToggleOmnipresent"/>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="Shade">
|
||||||
|
<mousebind button="Left" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Left" action="Click">
|
||||||
|
<action name="ToggleShade"/>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="Iconify">
|
||||||
|
<mousebind button="Left" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Left" action="Click">
|
||||||
|
<action name="Iconify"/>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="Maximize">
|
||||||
|
<mousebind button="Left" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
<action name="Unshade"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Middle" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
<action name="Unshade"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Right" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
<action name="Unshade"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Left" action="Click">
|
||||||
|
<action name="ToggleMaximize"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Middle" action="Click">
|
||||||
|
<action name="ToggleMaximize">
|
||||||
|
<direction>vertical</direction>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Right" action="Click">
|
||||||
|
<action name="ToggleMaximize">
|
||||||
|
<direction>horizontal</direction>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="Close">
|
||||||
|
<mousebind button="Left" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
<action name="Unshade"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Left" action="Click">
|
||||||
|
<action name="Close"/>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="Desktop">
|
||||||
|
<mousebind button="Up" action="Click">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>previous</to>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Down" action="Click">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>next</to>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="A-Up" action="Click">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>previous</to>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="A-Down" action="Click">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>next</to>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="C-A-Up" action="Click">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>previous</to>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="C-A-Down" action="Click">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>next</to>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Left" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Right" action="Press">
|
||||||
|
<action name="Focus"/>
|
||||||
|
<action name="Raise"/>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="Root">
|
||||||
|
<!-- Menus -->
|
||||||
|
<mousebind button="Middle" action="Press">
|
||||||
|
<action name="ShowMenu">
|
||||||
|
<menu>client-list-combined-menu</menu>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Right" action="Press">
|
||||||
|
<action name="ShowMenu">
|
||||||
|
<menu>root-menu</menu>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
<context name="MoveResize">
|
||||||
|
<mousebind button="Up" action="Click">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>previous</to>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="Down" action="Click">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>next</to>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="A-Up" action="Click">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>previous</to>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
<mousebind button="A-Down" action="Click">
|
||||||
|
<action name="GoToDesktop">
|
||||||
|
<to>next</to>
|
||||||
|
</action>
|
||||||
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
</mouse>
|
||||||
|
<menu>
|
||||||
|
<!-- You can specify more than one menu file in here and they are all loaded,
|
||||||
|
just don't make menu ids clash or, well, it'll be kind of pointless -->
|
||||||
|
<!-- default menu file (or custom one in $HOME/.config/openbox/) -->
|
||||||
|
<!-- system menu files on Debian systems -->
|
||||||
|
<file>/var/lib/openbox/debian-menu.xml</file>
|
||||||
|
<file>menu.xml</file>
|
||||||
|
<hideDelay>200</hideDelay>
|
||||||
|
<!-- if a press-release lasts longer than this setting (in milliseconds), the
|
||||||
|
menu is hidden again -->
|
||||||
|
<middle>no</middle>
|
||||||
|
<!-- center submenus vertically about the parent entry -->
|
||||||
|
<submenuShowDelay>100</submenuShowDelay>
|
||||||
|
<!-- time to delay before showing a submenu after hovering over the parent
|
||||||
|
entry.
|
||||||
|
if this is a negative value, then the delay is infinite and the
|
||||||
|
submenu will not be shown until it is clicked on -->
|
||||||
|
<submenuHideDelay>400</submenuHideDelay>
|
||||||
|
<!-- time to delay before hiding a submenu when selecting another
|
||||||
|
entry in parent menu
|
||||||
|
if this is a negative value, then the delay is infinite and the
|
||||||
|
submenu will not be hidden until a different submenu is opened -->
|
||||||
|
<showIcons>yes</showIcons>
|
||||||
|
<!-- controls if icons appear in the client-list-(combined-)menu -->
|
||||||
|
<manageDesktops>yes</manageDesktops>
|
||||||
|
<!-- show the manage desktops section in the client-list-(combined-)menu -->
|
||||||
|
</menu>
|
||||||
|
<applications>
|
||||||
|
<!--
|
||||||
|
# this is an example with comments through out. use these to make your
|
||||||
|
# own rules, but without the comments of course.
|
||||||
|
# you may use one or more of the name/class/role/title/type rules to specify
|
||||||
|
# windows to match
|
||||||
|
|
||||||
|
<application name="the window's _OB_APP_NAME property (see obxprop)"
|
||||||
|
class="the window's _OB_APP_CLASS property (see obxprop)"
|
||||||
|
groupname="the window's _OB_APP_GROUP_NAME property (see obxprop)"
|
||||||
|
groupclass="the window's _OB_APP_GROUP_CLASS property (see obxprop)"
|
||||||
|
role="the window's _OB_APP_ROLE property (see obxprop)"
|
||||||
|
title="the window's _OB_APP_TITLE property (see obxprop)"
|
||||||
|
type="the window's _OB_APP_TYPE property (see obxprob)..
|
||||||
|
(if unspecified, then it is 'dialog' for child windows)">
|
||||||
|
# you may set only one of name/class/role/title/type, or you may use more
|
||||||
|
# than one together to restrict your matches.
|
||||||
|
|
||||||
|
# the name, class, role, and title use simple wildcard matching such as those
|
||||||
|
# used by a shell. you can use * to match any characters and ? to match
|
||||||
|
# any single character.
|
||||||
|
|
||||||
|
# the type is one of: normal, dialog, splash, utility, menu, toolbar, dock,
|
||||||
|
# or desktop
|
||||||
|
|
||||||
|
# when multiple rules match a window, they will all be applied, in the
|
||||||
|
# order that they appear in this list
|
||||||
|
|
||||||
|
|
||||||
|
# each rule element can be left out or set to 'default' to specify to not
|
||||||
|
# change that attribute of the window
|
||||||
|
|
||||||
|
<decor>yes</decor>
|
||||||
|
# enable or disable window decorations
|
||||||
|
|
||||||
|
<shade>no</shade>
|
||||||
|
# make the window shaded when it appears, or not
|
||||||
|
|
||||||
|
<position force="no">
|
||||||
|
# the position is only used if both an x and y coordinate are provided
|
||||||
|
# (and not set to 'default')
|
||||||
|
# when force is "yes", then the window will be placed here even if it
|
||||||
|
# says you want it placed elsewhere. this is to override buggy
|
||||||
|
# applications who refuse to behave
|
||||||
|
<x>center</x>
|
||||||
|
# a number like 50, or 'center' to center on screen. use a negative number
|
||||||
|
# to start from the right (or bottom for <y>), ie -50 is 50 pixels from
|
||||||
|
# the right edge (or bottom). use 'default' to specify using value
|
||||||
|
# provided by the application, or chosen by openbox, instead.
|
||||||
|
<y>200</y>
|
||||||
|
<monitor>1</monitor>
|
||||||
|
# specifies the monitor in a xinerama setup.
|
||||||
|
# 1 is the first head, or 'mouse' for wherever the mouse is
|
||||||
|
</position>
|
||||||
|
|
||||||
|
<size>
|
||||||
|
# the size to make the window.
|
||||||
|
<width>20</width>
|
||||||
|
# a number like 20, or 'default' to use the size given by the application.
|
||||||
|
# you can use fractions such as 1/2 or percentages such as 75% in which
|
||||||
|
# case the value is relative to the size of the monitor that the window
|
||||||
|
# appears on.
|
||||||
|
<height>30%</height>
|
||||||
|
</size>
|
||||||
|
|
||||||
|
<focus>yes</focus>
|
||||||
|
# if the window should try be given focus when it appears. if this is set
|
||||||
|
# to yes it doesn't guarantee the window will be given focus. some
|
||||||
|
# restrictions may apply, but Openbox will try to
|
||||||
|
|
||||||
|
<desktop>1</desktop>
|
||||||
|
# 1 is the first desktop, 'all' for all desktops
|
||||||
|
|
||||||
|
<layer>normal</layer>
|
||||||
|
# 'above', 'normal', or 'below'
|
||||||
|
|
||||||
|
<iconic>no</iconic>
|
||||||
|
# make the window iconified when it appears, or not
|
||||||
|
|
||||||
|
<skip_pager>no</skip_pager>
|
||||||
|
# asks to not be shown in pagers
|
||||||
|
|
||||||
|
<skip_taskbar>no</skip_taskbar>
|
||||||
|
# asks to not be shown in taskbars. window cycling actions will also
|
||||||
|
# skip past such windows
|
||||||
|
|
||||||
|
<fullscreen>yes</fullscreen>
|
||||||
|
# make the window in fullscreen mode when it appears
|
||||||
|
|
||||||
|
<maximized>true</maximized>
|
||||||
|
# 'Horizontal', 'Vertical' or boolean (yes/no)
|
||||||
|
</application>
|
||||||
|
|
||||||
|
# end of the example
|
||||||
|
-->
|
||||||
|
</applications>
|
||||||
|
</openbox_config>
|
|
@ -0,0 +1,62 @@
|
||||||
|
(add-to-list 'load-path "~/.emacs.d/lisp/")
|
||||||
|
(require 'web-mode)
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
|
||||||
|
|
||||||
|
; do not break hard linked files
|
||||||
|
(setq backup-by-copying-when-linked t)
|
||||||
|
|
||||||
|
; use aspell instead of ispell
|
||||||
|
(setq-default ispell-program-name "aspell")
|
||||||
|
|
||||||
|
; enable auto compression mode
|
||||||
|
(auto-compression-mode 1)
|
||||||
|
|
||||||
|
; make scripts executable upon saving
|
||||||
|
(add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p)
|
||||||
|
|
||||||
|
;; Make all yes/no prompts into y/n prompts
|
||||||
|
(fset 'yes-or-no-p 'y-or-n-p)
|
||||||
|
|
||||||
|
;; set time to show in corner
|
||||||
|
(setq display-time-day-and-date t)
|
||||||
|
(display-time)
|
||||||
|
|
||||||
|
|
||||||
|
(custom-set-variables
|
||||||
|
;; custom-set-variables was added by Custom.
|
||||||
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
;; Your init file should contain only one such instance.
|
||||||
|
;; If there is more than one, they won't work right.
|
||||||
|
'(inhibit-startup-screen t)
|
||||||
|
'(safe-local-variable-values
|
||||||
|
(quote
|
||||||
|
((sgml-local-ecat-files)
|
||||||
|
(sgml-local-catalogs)
|
||||||
|
(sgml-exposed-tags)
|
||||||
|
(sgml-default-dtd-file)
|
||||||
|
(sgml-parent-document)
|
||||||
|
(sgml-indent-data . t)
|
||||||
|
(sgml-indent-step . 2)
|
||||||
|
(sgml-always-quote-attributes . t)
|
||||||
|
(sgml-minimize-attributes)
|
||||||
|
(sgml-shorttag . t)
|
||||||
|
(sgml-omittag . t))))
|
||||||
|
'(send-mail-function (quote mailclient-send-it)))
|
||||||
|
(custom-set-faces
|
||||||
|
;; custom-set-faces was added by Custom.
|
||||||
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
;; Your init file should contain only one such instance.
|
||||||
|
;; If there is more than one, they won't work right.
|
||||||
|
)
|
||||||
|
|
||||||
|
(require 'lua-mode)
|
||||||
|
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
|
||||||
|
(add-to-list 'interpreter-mode-alist '("lua" . lua-mode))
|
|
@ -0,0 +1 @@
|
||||||
|
Thu Jun 10 08:03:27 2021 abdul quit at E/W Dirt road. score: 0 saves: 0 commands: 5
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
BIN
.emacs.d/url/cache/abdul/https/com/oklomsy/0bf2840e8829c3d4e059fe472711778e
vendored
Normal file
BIN
.emacs.d/url/cache/abdul/https/com/oklomsy/0bf2840e8829c3d4e059fe472711778e
vendored
Normal file
Binary file not shown.
BIN
.emacs.d/url/cache/abdul/https/com/oklomsy/43e0ac23a3e605ecff4a3d1a9e5321fe
vendored
Normal file
BIN
.emacs.d/url/cache/abdul/https/com/oklomsy/43e0ac23a3e605ecff4a3d1a9e5321fe
vendored
Normal file
Binary file not shown.
BIN
.emacs.d/url/cache/abdul/https/com/oklomsy/b2ca891d6d6162d822a38bff8fb05672
vendored
Normal file
BIN
.emacs.d/url/cache/abdul/https/com/oklomsy/b2ca891d6d6162d822a38bff8fb05672
vendored
Normal file
Binary file not shown.
BIN
.emacs.d/url/cache/abdul/https/com/oklomsy/fb0b6176631c5655332690f3b0d76d8f
vendored
Normal file
BIN
.emacs.d/url/cache/abdul/https/com/oklomsy/fb0b6176631c5655332690f3b0d76d8f
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue