-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainmenu
More file actions
executable file
·105 lines (72 loc) · 2.12 KB
/
mainmenu
File metadata and controls
executable file
·105 lines (72 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/usr/bin/env bash
# Preferred terminal
terminal='urxvtc'
# Preferred editor
editor='vim'
# Drawing the line ( hexcode will vary if not using lime )
auto_line ()
{
# You may change the limit ( i.e the number 11 ) to suit your needs
for i in {1..11}
do
printf "\u00c4"
done
}
# Fonts
#font1='-artwiz-lime-medium-r-normal--10-110-75-75-m-50-iso8859-1'
font1='lime:size=8'
# Dmenu Preferences
# Width
W=100
# Horizontal Position
X=612
# Vertical Position
Y=304
menu_list=" Run\n File\n Edit\n View\n Term\n Web\n Game\n Rngr\n Wifi\n Music\n`auto_line`\n Info\n Find\n Sett\n\n "
# Get colr: http://ow.ly/MYBjg or manually enter the color codes
Dmenu="/usr/bin/dmenu -i -fn '$font1' -x $X -y $Y -w $W -l 20 -nb '#`colr bg`' -sb '#`colr cynf`' -nf '#`colr fg`' -sf '#`colr bg`'"
# Putting it all together
cmd=$(echo -e "$menu_list" | eval $Dmenu)
case $cmd in
*Run)
$HOME/bin/dmenu.scripts/run-recent ;;
*File)
thunar > /dev/null 2>&1 ;;
*Edit)
$terminal -e $editor ;;
*View)
sxiv -qbfr $HOME/images/ ;;
*Term)
$terminal -g 120x40 -e bash -c "tmux -q has-session && exec tmux attach-session -dt main || exec tmux new-session -nmain -smain" ;;
*Web)
firefox --private > /dev/null 2>&1 ;;
*Game)
LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so' /usr/bin/steam ;;
*Music)
$HOME/bin/mpd-launch ;;
*Rngr)
$terminal -e ranger ;;
*Wifi)
gksudo $HOME/bin/dmenu.scripts/.connman_dmenu > /dev/null 2>&1 ;;
*Info | ";"i | i";")
$HOME/bin/dmenu.scripts/stat ;;
*Find)
$HOME/bin/dmenu.scripts/finder ;;
*Sett | ";"s | s";")
$HOME/bin/dmenu.scripts/settings ;;
quit | * | ";"q | q |q";")
$HOME/bin/dmenu.scripts/exit-menu ;;
h | ";"h | h";")
$terminal -g 68x6 -e htop ;;
";"a | a";")
$HOME/bin/dmenu.scripts/.dscript ;;
";"t | t";")
$HOME/bin/dmenu.scripts/todo ;;
";"e | e";")
$terminal -e $editor $HOME/bin/dmenu.scripts/.menu ;;
"/")
$terminal -e $editor $HOME/bin/dmenu.scripts/ ;;
k | ";"k | k";")
$HOME/bin/dmenu.scripts/pkill-menu ;;
esac
exit 0