Browse Source

updates

master
f0x 1 year ago
parent
commit
6d70432a6a

+ 1
- 0
bin/bin/exa View File

@@ -0,0 +1 @@
1
+/home/f0x/documents/src/exa/target/release/exa

+ 2
- 2
bin/bin/fetch View File

@@ -1,8 +1,8 @@
1 1
 #!/bin/bash
2 2
 
3 3
 # set the colors
4
-fg=$'\e[35m'
5
-ac=$'\e[37m'
4
+fg=$'\e[37m'
5
+ac=$'\e[31m'
6 6
 re=$'\e[31m'
7 7
 
8 8
 # get os

+ 1
- 1
bin/bin/get_wifi_bssid View File

@@ -1,3 +1,3 @@
1 1
 #!/usr/bin/env sh
2 2
 
3
-/sbin/iwlist wlp4s0 scanning | grep Address | rev | cut -d : -f 1-2 | rev | head -n1
3
+/sbin/iwlist wlan0 scanning | grep Address | rev | cut -d : -f 1-2 | rev | head -n1

+ 14
- 0
bin/bin/live-latex-check.sh View File

@@ -0,0 +1,14 @@
1
+#!/bin/bash
2
+mfile="$1"
3
+sfile="$2"
4
+windowid="$3"
5
+PID=$(cat $HOME/.config/live-latex-preview/activepid 2> /dev/null)
6
+if [ -e /proc/${PID} -a /proc/${PID}/exe ] ; then
7
+    exit 0
8
+elif [ "$HOME/.config/live-latex-preview/activepid" -nt "$sfile" ] ; then
9
+    exit 0
10
+else
11
+    live-latex-update.sh "$mfile" "$windowid" &>/dev/null &
12
+    echo -n "$!" > "$HOME/.config/live-latex-preview/activepid" 2>/dev/null
13
+fi
14
+exit 0

+ 99
- 0
bin/bin/live-latex-update.sh View File

@@ -0,0 +1,99 @@
1
+#!/bin/bash
2
+
3
+file="$1"
4
+windowid="$2"
5
+basename="${file%.tex}"
6
+logfile="${basename}.log"
7
+auxfile="${basename}.aux"
8
+
9
+
10
+# determine which compilation program to use
11
+if head -n 5 "$file" | grep -i -q 'xelatex' > /dev/null 2>&1 ; then
12
+    execprog="xelatex"
13
+    echo "XeLaTeX document detected."
14
+elif sed -n -e '/\\documentclass/,/\\begin{[[:space:]]*document[[:space:]]*}/p' "$file" \
15
+| grep '\usepackage\(\[.*\]\|\){.*\(pstricks\|pst-\).*}' > /dev/null 2>&1 ; then
16
+    execprog="latex"
17
+    echo "Using plain LaTeX"
18
+else
19
+    execprog="pdflatex"
20
+    echo "Using PDFLaTeX."
21
+fi
22
+
23
+# determine whether to allow \write18
24
+if head -n 5 "$file" | grep -i -q 'shell-escape' > /dev/null 2>&1 ; then
25
+    execprog="$execprog -shell-escape"
26
+    echo "Enabling -shell-escape"
27
+fi
28
+
29
+# determine bibliography processor
30
+if head -n 5 "$file" | grep -i -q 'biber' > /dev/null 2>&1 ; then
31
+    bibprog="biber"
32
+    echo "Using Biber to handle bibliographical references."
33
+else
34
+    bibprog="bibtex"
35
+    echo "Using BibTeX to handle bibliographical references."
36
+fi
37
+
38
+
39
+if ${execprog} -interaction=nonstopmode -halt-on-error -file-line-error -synctex=1 "$file" ; then
40
+    if cat "$logfile" | grep -i -q "undefined citations\|undefined references" > /dev/null 2>&1 ; then
41
+        if "$bibprog" "$basename" ; then
42
+            if ! ${execprog} -interaction=nonstopmode -halt-on-error -file-line-error -synctex=1 "$file" ; then
43
+                echo -n "failure" > "$HOME/.config/live-latex-preview/lastresult" 2>/dev/null
44
+            echo
45
+                echo "failure"
46
+                exit 1
47
+           fi
48
+        else
49
+            echo -n "bibfail" > "$HOME/.config/live-latex-preview/lastresult" 2>/dev/null
50
+            echo
51
+            echo "bibfail"
52
+            exit 2
53
+        fi
54
+    fi
55
+    if cat "$logfile" | grep -i -q 'rerun to get' > /dev/null 2>&1 ; then
56
+        if ! ${execprog} -interaction=nonstopmode -halt-on-error -file-line-error -synctex=1 "$file" ; then
57
+            echo -n "failure" > "$HOME/.config/live-latex-preview/lastresult" 2>/dev/null
58
+            echo
59
+            echo "failure"
60
+            exit 1
61
+        fi
62
+    fi
63
+    if [ $execprog == "latex" ] ; then
64
+        dvifile=${basename}.dvi
65
+        psfile=${basename}.ps
66
+        if [ ! -e $dvifile ] ; then
67
+            echo "'${dvifile} does not exist. failure"
68
+            exit 1
69
+        else
70
+            if ! dvips $dvifile ; then
71
+                echo "'${dvifile}' corrupted. failure"
72
+                exit 1
73
+            fi
74
+        fi
75
+        if [ ! -e $psfile ] ; then
76
+            echo "'${psfile} does not exist. failure"
77
+            exit 1
78
+        else
79
+            if ! ps2pdf $psfile ; then
80
+                echo "'${psfile}' corrupted. failure"
81
+                exit 1
82
+            fi
83
+        fi
84
+
85
+    fi
86
+    if [[ $windowid != "999999" ]] ; then
87
+        echo "Updating MuPDF window."
88
+        xdotool key --window $windowid r &> /dev/null
89
+    fi
90
+    echo -n "success" > "$HOME/.config/live-latex-preview/lastresult" 2>/dev/null
91
+    echo
92
+    echo "success"
93
+else
94
+    echo -n "failure" > "$HOME/.config/live-latex-preview/lastresult" 2>/dev/null
95
+    echo
96
+    echo "failure"
97
+    exit 1
98
+fi
99
+exit 0

+ 1
- 1
bin/bin/lock View File

@@ -8,7 +8,7 @@ echo "l $(date '+%Y-%m-%d %H:%M')" >> ~/.log/lock
8 8
 #    --ringvercolor=ffffffff --ringwrongcolor=ffffffff --indpos="x+941:y+465" \
9 9
 #    --radius=75 --veriftext="" --wrongtext=""
10 10
 
11
-~/.config/bin/i3lock -n -i ~/pictures/wallpapers/wallpaper_locked \
11
+i3lock -n -i ~/pictures/wallpapers/wallpaper_locked \
12 12
     --insidecolor=37344500 --ringcolor=ffffffff --line-uses-inside \
13 13
     --keyhlcolor=d23c3dff --bshlcolor=d23c3dff --separatorcolor=00000000 \
14 14
     --insidevercolor=ebcb8bff --insidewrongcolor=bf616aff \

+ 15
- 0
bin/bin/mupdf-launch.sh View File

@@ -0,0 +1,15 @@
1
+#!/bin/bash
2
+texfile="$2"
3
+pdffile="$1"
4
+mupdf "$pdffile" &>/dev/null &
5
+mupid="$!"
6
+muwinid="0"
7
+nummps=$(xdotool search --class "MuPDF" getwindowname %@ | grep -n "$pdffile" | cut -d":" -f1)
8
+while [ -z $nummps ] ; do
9
+    sleep 0.1
10
+    nummps=$(xdotool search --class "MuPDF" getwindowname %@ | grep -n "$pdffile" | cut -d":" -f1)
11
+done
12
+echo -n "$(xdotool search --class "MuPDF" | sed -n "$nummps p")"
13
+# try to return focus to GVIM
14
+xdotool search --class --name "${texfile}.*GVIM" windowactivate &>/dev/null
15
+exit 0

+ 8
- 0
bin/bin/precise_time View File

@@ -0,0 +1,8 @@
1
+#!/usr/bin/env bash
2
+start=$(date +%s.%N)
3
+for i in {1..10000}; do
4
+    $@
5
+done
6
+dur=$(echo "$(date +%s.%N) - $start" | bc)
7
+
8
+printf "Execution time: %.6f seconds" $dur

+ 364
- 0
bin/bin/tracefile View File

@@ -0,0 +1,364 @@
1
+#!/usr/bin/perl
2
+
3
+=head1 NAME
4
+
5
+tracefile - list files being accessed
6
+
7
+=head1 SYNOPSIS
8
+
9
+B<tracefile> [-adefnu] I<command>
10
+
11
+B<tracefile> [-adefnu] -p I<pid>
12
+
13
+=head1 DESCRIPTION
14
+
15
+B<tracefile> will print the files being accessed by the command.
16
+
17
+=head1 OPTIONS
18
+
19
+=over 12
20
+
21
+=item I<command>
22
+
23
+Command to run.
24
+
25
+
26
+=item B<-a>
27
+
28
+=item B<--all>
29
+
30
+List all files.
31
+
32
+
33
+=item B<-d>
34
+
35
+=item B<--dir>
36
+
37
+List only dirs.
38
+
39
+
40
+=item B<-e>
41
+
42
+=item B<--exist>
43
+
44
+List only existing files.
45
+
46
+
47
+=item B<-f>
48
+
49
+=item B<--file>
50
+
51
+List only files.
52
+
53
+
54
+=item B<-n>
55
+
56
+=item B<--nonexist>
57
+
58
+List only non-existing files.
59
+
60
+
61
+=item B<-p> I<pid>
62
+
63
+=item B<--pid> I<pid>
64
+
65
+Trace process id.
66
+
67
+
68
+=item B<-u>
69
+
70
+=item B<--unique>
71
+
72
+List only files once.
73
+
74
+=back
75
+
76
+
77
+=head1 EXAMPLES
78
+
79
+=head2 EXAMPLE: Find the missing package
80
+
81
+Assume you have a program B<foo>. When it runs it fails with: I<foo:
82
+error: missing library>. It does not say with file is missing, but you
83
+have a hunch that you just need to install a package - you just do not
84
+know which one.
85
+
86
+    tracefile -n -u foo | apt-file -f search -
87
+
88
+Here B<ls> tries to find B</usr/include/shisa.h>. If it fails,
89
+B<apt-file> will search for which package it is in:
90
+
91
+    tracefile -n -u ls /usr/include/shisa.h | apt-file -f search - |
92
+      grep /usr/include/shisa.h
93
+
94
+=head1 REPORTING BUGS
95
+
96
+Report bugs to <tange@gnu.org>.
97
+
98
+
99
+=head1 AUTHOR
100
+
101
+Copyright (C) 2012,2016,2017 Ole Tange, http://ole.tange.dk and Free
102
+Software Foundation, Inc.
103
+
104
+
105
+=head1 LICENSE
106
+
107
+Copyright (C) 2012 Free Software Foundation, Inc.
108
+
109
+This program is free software; you can redistribute it and/or modify
110
+it under the terms of the GNU General Public License as published by
111
+the Free Software Foundation; either version 3 of the License, or
112
+at your option any later version.
113
+
114
+This program is distributed in the hope that it will be useful,
115
+but WITHOUT ANY WARRANTY; without even the implied warranty of
116
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
117
+GNU General Public License for more details.
118
+
119
+You should have received a copy of the GNU General Public License
120
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
121
+
122
+=head2 Documentation license I
123
+
124
+Permission is granted to copy, distribute and/or modify this documentation
125
+under the terms of the GNU Free Documentation License, Version 1.3 or
126
+any later version published by the Free Software Foundation; with no
127
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
128
+Texts.  A copy of the license is included in the file fdl.txt.
129
+
130
+=head2 Documentation license II
131
+
132
+You are free:
133
+
134
+=over 9
135
+
136
+=item B<to Share>
137
+
138
+to copy, distribute and transmit the work
139
+
140
+=item B<to Remix>
141
+
142
+to adapt the work
143
+
144
+=back
145
+
146
+Under the following conditions:
147
+
148
+=over 9
149
+
150
+=item B<Attribution>
151
+
152
+You must attribute the work in the manner specified by the author or
153
+licensor (but not in any way that suggests that they endorse you or
154
+your use of the work).
155
+
156
+=item B<Share Alike>
157
+
158
+If you alter, transform, or build upon this work, you may distribute
159
+the resulting work only under the same, similar or a compatible
160
+license.
161
+
162
+=back
163
+
164
+With the understanding that:
165
+
166
+=over 9
167
+
168
+=item B<Waiver>
169
+
170
+Any of the above conditions can be waived if you get permission from
171
+the copyright holder.
172
+
173
+=item B<Public Domain>
174
+
175
+Where the work or any of its elements is in the public domain under
176
+applicable law, that status is in no way affected by the license.
177
+
178
+=item B<Other Rights>
179
+
180
+In no way are any of the following rights affected by the license:
181
+
182
+=over 2
183
+
184
+=item *
185
+
186
+Your fair dealing or fair use rights, or other applicable
187
+copyright exceptions and limitations;
188
+
189
+=item *
190
+
191
+The author's moral rights;
192
+
193
+=item *
194
+
195
+Rights other persons may have either in the work itself or in
196
+how the work is used, such as publicity or privacy rights.
197
+
198
+=back
199
+
200
+=back
201
+
202
+=over 9
203
+
204
+=item B<Notice>
205
+
206
+For any reuse or distribution, you must make clear to others the
207
+license terms of this work.
208
+
209
+=back
210
+
211
+A copy of the full license is included in the file as cc-by-sa.txt.
212
+
213
+=head1 DEPENDENCIES
214
+
215
+B<tracefile> uses Perl, and B<strace>.
216
+
217
+
218
+=head1 SEE ALSO
219
+
220
+B<strace>(1)
221
+
222
+=cut
223
+
224
+use Getopt::Long;
225
+
226
+$Global::progname = "tracefile";
227
+
228
+Getopt::Long::Configure("bundling","pass_through");
229
+get_options_from_array(\@ARGV) || die_usage();
230
+
231
+if(not ($opt::exists or $opt::nonexists or $opt::all or $opt::dir or $opt::file)) {
232
+    $opt::all = 1;
233
+}
234
+
235
+my @cmd = shell_quote(@ARGV);
236
+my $dir = ".";
237
+my $pid = $opt::pid ? "-p $opt::pid" : "";
238
+
239
+open(IN, "-|", "strace -ff $pid -e trace=file @cmd 2>&1") || die;
240
+while(<IN>) {
241
+    if(/chdir."(([^\\"]|\\[\\"nt])*)".\s*=\s*0/) {
242
+	$dir = $1;
243
+    }
244
+
245
+    # [pid 30817] stat("transpose/100000files.tar.gz", {st_mode=S_IFREG|0644, st_size=140853248, ...}) = 0
246
+    if(s/^[^\"]+"(([^\\"]|\\[\\"nt])*)".*/$1/) {
247
+	# Matches the strace structure for a file
248
+	my $file = shell_unquote($1);
249
+	# Relative to $dir
250
+	$file =~ s:^([^/]):$dir/$1:;
251
+	my $print = 1;
252
+	if(($opt::dir and not -d $file)
253
+	   or
254
+	   ($opt::file and not -f $file)
255
+	   or
256
+	   ($opt::exists and not -e $file)
257
+	   or
258
+	   ($opt::nonexists and -e $file)
259
+	   or
260
+	   ($opt::unique and $seen{$file}++)) {
261
+	    $print = 0;
262
+	}
263
+	$print and print $file,"\n";
264
+    }
265
+}
266
+
267
+sub options_hash {
268
+    # Returns a hash of the GetOptions config
269
+    return
270
+	("debug|D" => \$opt::debug,
271
+	 "dir|d" => \$opt::dir,
272
+	 "file|f" => \$opt::file,
273
+	 "uniq|unique|u" => \$opt::unique,
274
+         "exists|exist|e" => \$opt::exists,
275
+         "nonexists|nonexist|non-exists|non-exist|n" => \$opt::nonexists,
276
+         "all|a" => \$opt::all,
277
+	 "pid|p=i" => \$opt::pid,
278
+	);
279
+}
280
+
281
+sub get_options_from_array {
282
+    # Run GetOptions on @array
283
+    # Returns:
284
+    #   true if parsing worked
285
+    #   false if parsing failed
286
+    #   @array is changed
287
+    my $array_ref = shift;
288
+    # A bit of shuffling of @ARGV needed as GetOptionsFromArray is not
289
+    # supported everywhere
290
+    my @save_argv;
291
+    my $this_is_ARGV = (\@::ARGV == $array_ref);
292
+    if(not $this_is_ARGV) {
293
+	@save_argv = @::ARGV;
294
+	@::ARGV = @{$array_ref};
295
+    }
296
+    my @retval = GetOptions(options_hash());
297
+    if(not $this_is_ARGV) {
298
+	@{$array_ref} = @::ARGV;
299
+	@::ARGV = @save_argv;
300
+    }
301
+    return @retval;
302
+}
303
+
304
+sub shell_unquote {
305
+    # Unquote strings from shell_quote
306
+    # Returns:
307
+    #   string with shell quoting removed
308
+    my @strings = (@_);
309
+    my $arg;
310
+    for my $arg (@strings) {
311
+        if(not defined $arg) {
312
+            $arg = "";
313
+        }
314
+        $arg =~ s/'\n'/\n/g; # filenames with '\n' is quoted using \'
315
+        $arg =~ s/\\([\002-\011\013-\032])/$1/g;
316
+        $arg =~ s/\\([\#\?\`\(\)\{\}\*\>\<\~\|\; \"\!\$\&\'])/$1/g;
317
+        $arg =~ s/\\\\/\\/g;
318
+    }
319
+    return wantarray ? @strings : "@strings";
320
+}
321
+
322
+sub shell_quote {
323
+    my @strings = (@_);
324
+    for my $a (@strings) {
325
+        $a =~ s/([\002-\011\013-\032\\\#\?\`\(\)\{\}\[\]\*\>\<\~\|\; \"\!\$\&\'\202-\377])/\\$1/g;
326
+        $a =~ s/[\n]/'\n'/g; # filenames with '\n' is quoted using \'
327
+    }
328
+    return wantarray ? @strings : "@strings";
329
+}
330
+
331
+sub die_usage {
332
+    # Returns: N/A
333
+    usage();
334
+    wait_and_exit(255);
335
+}
336
+
337
+sub usage {
338
+    # Returns: N/A
339
+    print join
340
+	("\n",
341
+	 "Usage:",
342
+	 "$Global::progname [-u] [-a] [-n] [-e] command [arguments]",
343
+	 "",
344
+	 "See 'man $Global::progname' for details",
345
+	 "");
346
+}
347
+
348
+sub warning {
349
+    my @w = @_;
350
+    my $fh = $Global::original_stderr || *STDERR;
351
+    my $prog = $Global::progname || "tracefile";
352
+    print $fh $prog, ": Warning: ", @w;
353
+}
354
+
355
+
356
+sub error {
357
+    my @w = @_;
358
+    my $fh = $Global::original_stderr || *STDERR;
359
+    my $prog = $Global::progname || "tracefile";
360
+    print $fh $prog, ": Error: ", @w;
361
+}
362
+
363
+
364
+

+ 17
- 107
herbstluftwm/.config/herbstluftwm/autostart View File

@@ -1,30 +1,24 @@
1 1
 #!/usr/bin/env bash
2 2
 
3
-# this is a simple config for herbstluftwm
4
-
5 3
 hc() {
6 4
     herbstclient "$@"
7 5
 }
8 6
 
9 7
 hc emit_hook reload
10 8
 
11
-#xsetroot -solid '#5A8E3A'
12
-/home/f0x/.screenlayout/dual.sh
13 9
 feh --bg-fill ~/pictures/wallpapers/wallpaper
14 10
 
15 11
 # remove all existing keybindings
16 12
 hc keyunbind --all
17 13
 
18 14
 # keybindings
19
-# if you have a super key you will be much happier with Mod set to Mod4
20
-#Mod=Mod1    # Use alt as the main modifier
21 15
 Mod=Mod4   # Use the super key as the main modifier
22 16
 
23 17
 hc keybind $Mod-Shift-e quit
24 18
 hc keybind $Mod-Shift-r reload
25 19
 hc keybind $Mod-Shift-q close
26
-hc keybind $Mod-Return spawn ${TERMINAL:-st} # use your $TERMINAL with xterm as fallback
27
-hc keybind $Mod-d spawn dmenu_run -fn peep:size=10
20
+hc keybind $Mod-Return spawn ${TERMINAL:-st}
21
+hc keybind $Mod-d spawn dmenu_run -fn peep:size=10 #TODO: colors
28 22
 hc keybind $Mod-Shift-l spawn lock
29 23
 
30 24
 # basic movement
@@ -33,21 +27,8 @@ hc keybind $Mod-Left  focus left
33 27
 hc keybind $Mod-Down  focus down
34 28
 hc keybind $Mod-Up    focus up
35 29
 hc keybind $Mod-Right focus right
36
-hc keybind $Mod-h     focus left
37
-hc keybind $Mod-j     focus down
38
-hc keybind $Mod-k     focus up
39
-hc keybind $Mod-l     focus right
40 30
 
41 31
 # moving clients
42
-#hc keybind $Mod-Shift-Left  shift left
43
-#hc keybind $Mod-Shift-Down  shift down
44
-#hc keybind $Mod-Shift-Up    shift up
45
-#hc keybind $Mod-Shift-Right shift right
46
-#hc keybind $Mod-Shift-h     shift left
47
-#hc keybind $Mod-Shift-j     shift down
48
-#hc keybind $Mod-Shift-k     shift up
49
-#hc keybind $Mod-Shift-l     shift right
50
-
51 32
 hc keybind $Mod-Shift-Left or / shift left / \
52 33
     chain , lock , shift_to_monitor -l , focus_monitor -l , unlock
53 34
 hc keybind $Mod-Shift-Down or / shift down / \
@@ -61,57 +42,40 @@ hc keybind $Mod-Shift-Right or / shift right / \
61 42
 # create an empty frame at the specified direction
62 43
 hc keybind $Mod-u       split   bottom  0.5
63 44
 hc keybind $Mod-o       split   right   0.5
64
-# let the current frame explode into subframes
65
-hc keybind $Mod-Control-space split explode
66 45
 
67 46
 # resizing frames
68 47
 resizestep=0.05
69
-hc keybind $Mod-Control-h       resize left +$resizestep
70
-hc keybind $Mod-Control-j       resize down +$resizestep
71
-hc keybind $Mod-Control-k       resize up +$resizestep
72
-hc keybind $Mod-Control-l       resize right +$resizestep
73 48
 hc keybind $Mod-Control-Left    resize left +$resizestep
74 49
 hc keybind $Mod-Control-Down    resize down +$resizestep
75 50
 hc keybind $Mod-Control-Up      resize up +$resizestep
76 51
 hc keybind $Mod-Control-Right   resize right +$resizestep
77 52
 
78 53
 # tags
79
-#tag_names=( {1..9} )
80
-#tag_keys=( {1..9} 0 )
81
-
54
+#tag_names=( {1..9} 0)
55
+#tag_keys=( {1..9} 0)
56
+#
82 57
 #hc rename default "${tag_names[0]}" || true
83 58
 #for i in ${!tag_names[@]} ; do
84 59
 #    hc add "${tag_names[$i]}"
85 60
 #    key="${tag_keys[$i]}"
86 61
 #    if ! [ -z "$key" ] ; then
87
-#        hc keybind "$Mod-$key" use_index "$i"
88
-#        hc keybind "$Mod-Shift-$key" move_index "$i"
62
+#        hc keybind "$Mod-$key" use "$i"
63
+#        hc keybind "$Mod-Shift-$key" move "$i"
89 64
 #    fi
90 65
 #done
91 66
 
92
-# cycle through tags
93
-#hc keybind $Mod-period use_index +1 --skip-visible
94
-#hc keybind $Mod-comma  use_index -1 --skip-visible
95
-
96 67
 # tags
97
-mon1_names=( 1_{0..9} ) # tag names for monitor 1
98
-mon2_names=( 2_{0..9} ) # tag names for monitor 2
99
-fallback_names=( {0..9} ) # tag names for all other monitors
100
-tag_keys=( {1..9} 0 )
68
+mon1_names=( 0 {1..9}) # tag names for monitor 1
69
+mon2_names=( 2_0 2_{1..9} ) # tag names for monitor 2
70
+tag_keys=( 0 {1..9} )
101 71
 
102 72
 hc rename default "${mon1_names[0]}" || true
103 73
 for tag in "${mon1_names[@]}" "${mon2_names[@]}" "${fallback_names[@]}" ; do
104 74
     hc try silent add "$tag"
105 75
 done
106 76
 
107
-
108 77
 for i in ${!tag_keys[@]} ; do
109 78
     key="${tag_keys[$i]}"
110
-    # they kebinding is as follows: the or executes the commands seperated by
111
-    # CASE and stops executing them after the first of those succeeds.
112
-    # the first command is: check that we are on monitor 3 and can switch to tag "${mon1_names[$i]}"
113
-    # if only one of these to steps fail, try the second one (and so one).
114
-    # The setup for two monitors is as follows:
115 79
     hc keybind "$Mod-$key" \
116 80
         or CASE and . compare monitors.focus.index = 0 . use "${mon1_names[$i]}" \
117 81
            CASE and . compare monitors.focus.index = 1 . use "${mon2_names[$i]}" \
@@ -122,39 +86,11 @@ for i in ${!tag_keys[@]} ; do
122 86
            CASE move "${fallback_names[$i]}"
123 87
 done
124 88
 
125
-# cycle through tags
126
-# add additional information in order to cycle only through a monitor's tags
127
-# and not through all tags
128
-define-tag-cycle() {
129
-    local n=$#
130
-    local tags=( "$@" )
131
-    for i in "${!tags[@]}" ; do
132
-        local t="${tags[$i]}"
133
-        hc chain , new_attr string tags.by-name."$t".my_previous_tag \
134
-                 , set_attr tags.by-name."$t".my_previous_tag "${tags[$(((i - 1 + n) % n))]}" \
135
-                 , new_attr string tags.by-name."$t".my_next_tag \
136
-                 , set_attr tags.by-name."$t".my_next_tag "${tags[$(((i + 1) % n))]}"
137
-    done
138
-}
139
-
140
-define-tag-cycle "${mon1_names[@]}"
141
-define-tag-cycle "${mon2_names[@]}"
142
-define-tag-cycle "${fallback_names[@]}"
143
-
144
-# cycle through tags
145
-# check whether the current tag as a custom "next tag" configured
146
-# if yes, jump to that one, otherwise fall back to ordinary use_index +1
147
-hc keybind $Mod-period or , substitute NEXT tags.focus.my_next_tag use NEXT  \
148
-                          , use_index +1 --skip-visible
149
-hc keybind $Mod-comma  or , substitute PREV tags.focus.my_previous_tag use PREV  \
150
-                          , use_index +1 --skip-visible
151
-
152
-
153 89
 # layouting
154 90
 hc keybind $Mod-r remove
155 91
 hc keybind $Mod-s floating toggle
156 92
 hc keybind $Mod-f fullscreen toggle
157
-hc keybind $Mod-p pseudotile toggle
93
+#hc keybind $Mod-p pseudotile toggle
158 94
 # The following cycles through the available layouts within a frame, but skips
159 95
 # layouts, if the layout change wouldn't affect the actual window positions.
160 96
 # I.e. if there are two windows within a frame, the grid layout is skipped.
@@ -170,11 +106,9 @@ hc mousebind $Mod-Button2 zoom
170 106
 hc mousebind $Mod-Button3 resize
171 107
 
172 108
 # focus
173
-hc keybind $Mod-BackSpace   cycle_monitor
174 109
 hc keybind $Mod-Tab         cycle_all +1
175 110
 hc keybind $Mod-Shift-Tab   cycle_all -1
176
-hc keybind $Mod-c cycle
177
-hc keybind $Mod-i jumpto urgent
111
+#hc keybind $Mod-i jumpto urgent
178 112
 
179 113
 # theme
180 114
 hc attr theme.tiling.reset 1
@@ -186,7 +120,7 @@ hc set frame_bg_active_color '#36647c'
186 120
 hc set frame_border_width 0
187 121
 hc set always_show_frame 0
188 122
 hc set frame_bg_transparent 1
189
-hc set frame_transparent_width 1
123
+hc set frame_transparent_width 0
190 124
 hc set frame_gap 4
191 125
 
192 126
 hc attr theme.active.color '#67367c'
@@ -213,11 +147,7 @@ hc set update_dragged_clients 0
213 147
 
214 148
 # rules
215 149
 hc unrule -F
216
-#hc rule class=XTerm tag=3 # move all xterms to tag 3
217 150
 hc rule focus=on # normally focus new clients
218
-#hc rule focus=off # normally do not focus new clients
219
-# give focus to most common terminals
220
-#hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on
221 151
 hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on
222 152
 hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
223 153
 hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off
@@ -225,44 +155,24 @@ hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off
225 155
 # unlock, just to be sure
226 156
 hc unlock
227 157
 
228
-herbstclient set tree_style '╾│ ├└╼─┐'
158
+#herbstclient set tree_style '╾│ ├└╼─┐'
159
+herbstclient set tree_style '        '
229 160
 
230 161
 # do multi monitor setup here, e.g.:
231 162
 # hc set_monitors 1280x1024+0+0 1280x1024+1280+0
232 163
 # or simply:
233 164
 hc detect_monitors
234 165
 
235
-# find the panel
236
-#panel=~/.config/herbstluftwm/panel.sh
237
-#[ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh
238
-#for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do
239
-#    # start it on each monitor
240
-#    "$panel" $monitor &
241
-#done
242
-
243
-#for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do
244
-#    hc pad $monitor 32 10 10 10
245
-#done
246
-
247
-hc pad 0 42  5 5 5
248
-#hc pad 1 40 5 5 5
166
+hc pad 0 45 5 5 5
249 167
 
250 168
 # GIMP
251
-# ensure there is a gimp tag
252 169
 hc add gimp
253
-# center all other gimp windows on gimp tag
254 170
 hc rule class=Gimp tag=gimp
255
-#hc rule class=Gimp windowrole~'gimp-(image-window|toolbox|dock)' \
256
-#pseudotile=off
257
-#hc rule class=Gimp windowrole=gimp-toolbox focus=off index=00
258
-#hc rule class=Gimp windowrole=gimp-dock focus=off index=1
259 171
 hc keybind $Mod-g use gimp
260 172
 
261 173
 if hc silent new_attr bool my_not_first_autostart ; then
262 174
     xbindkeys -p &
263
-    #~/.config/herbstluftwm/lemons.sh | lemonbar -p -B#151617 -f 'peep-10' -f 'siji-15' -f 'unifont-16' -g 1910+5+5 -u 3 -o -3 | ~/.config/herbstluftwm/lemon_handle.sh &
264
-    #~/documents/prog/bar/bar.pl6 | lemonbar -p -B#282c37 -f 'peep-10' -f 'siji-15' -f 'unifont-16' -g 1910+5+5 -u 3 -o -3 &
265
-    rust_bar | lemonbar -B#091427 -f 'peep-10' -f 'siji-15' -f 'unifont-16' -g 1910+5+5 -u 3 -o -3
175
+    rust_bar | lemonbar -B#1d1f21 -f 'peep-10' -f 'siji-15' -f 'unifont-16' -g 1910+5+5 -u 5 -o -3 &
266 176
     battery_loop.sh &
267 177
     waterfox &
268 178
 fi

+ 0
- 6
herbstluftwm/.config/herbstluftwm/lemon_handle.sh View File

@@ -1,6 +0,0 @@
1
-#!/bin/bash
2
-
3
-while read x
4
-do
5
-	eval $x&
6
-done

+ 0
- 62
herbstluftwm/.config/herbstluftwm/lemons.sh View File

@@ -1,62 +0,0 @@
1
-#!/bin/bash
2
-#
3
-clock() {
4
-	date '+%Y-%m-%d %H:%M'
5
-}
6
-
7
-battery() {
8
-	BAT0C=/sys/class/power_supply/BAT0/capacity
9
-	BAT1C=/sys/class/power_supply/BAT1/capacity
10
-	BATS=/sys/class/power_supply/BAT1/status
11
-	test "`cat $BATS`" = "Charging" && echo -en '\ue23a' || test "`cat $BATS`" = "Full" && echo -en '\ue238' || echo -en '\ue237'
12
-    echo $(cat $BAT0C)"% "
13
-    echo $(cat $BAT1C)"%"
14
-}
15
-
16
-volume() {
17
-	echo -en "%{A:amixer sset Master toggle:}%{A4:amixer set Master 5%+:}%{A5:amixer set Master 5%-:}"
18
-	test "`amixer | grep 'Playback' | grep '\[on\]' `" && echo -en "\ue050" || echo -en "\ue04f"
19
-	amixer get Master | sed -n 's/^.*\[\([0-9]\+%\).*$/\1/p' | head -n1
20
-	echo -en "%{A}%{A}%{A}"
21
-}
22
-
23
-nowplaying() {
24
-	echo -en "%{A:st -e ncmpcpp:}\ue03d%{A} "
25
-	echo -n "%{A1:mpc prev:}%{A2:mpc toggle:}%{A3:mpc next:}"
26
-	echo $(mpc current -f "[%title%]|[%file%]" | sed 's/^.*\///;s/.mp3$//;s/.flac$//')
27
-	echo -n "%{A}%{A}%{A}"
28
-}
29
-
30
-network() {
31
-	test "`ip link | grep 'state UP' | awk -F: '{ print $2 }' | sed 's/ //'`" = "wlan0" && echo -en '\ue63e' || echo -n ""
32
-	strength=`wpa_cli signal_poll | grep "^RSSI=-" | sed "s/RSSI=-//"`
33
-	echo -n " $strength"
34
-}
35
-
36
-vpn() {
37
-#	test "`ip link | grep "tun0" | awk -F: '{ print $2 }'`" = " tun0" && echo -en "%{B#757c36} VPN ACTIVE %{B-}" || echo -en "%{B#853535} VPN INACTIVE %{B-}"
38
-	test "`ip link | grep "tun0" | awk -F: '{ print $2 }'`" = " tun0" && echo -en "%{U#757c36}%{+u} VPN %{-u}%{U-}" || echo -en "%{U#812000}%{+u} VPN %{-u}%{U-}"
39
-}
40
-
41
-sshd() {
42
-	test "`ps -aux | grep sshd | grep root`" && echo -en "%{U#757c36}%{+u} SSHD %{-u}%{U-}" || echo -en "%{U#812000}%{+u} SSHD %{-u}%{U-}"
43
-}
44
-
45
-window_title() {
46
-    xdotool getwindowfocus getwindowname
47
-}
48
-
49
-# This loop will fill a buffer with our infos, and output it to stdout.
50
-while :; do
51
-	buf="%{O1}"
52
-	buf="${buf} $(vpn) $(sshd)%{c}"
53
-    buf="${buf} %{U#36647c}%{+u}%{O100}$(window_title)%{O100}%{-u}%{r}"
54
-#	buf="${buf} $(network)%  "
55
-	buf="${buf}%{U#7c5536}%{+u} $(battery) %{-u}  "
56
-	buf="${buf}%{U#7c364b}%{+u} $(volume) %{-u} "
57
- # test "`mpc current`" = "" && buf="${buf}" || buf="${buf}$(nowplaying) "
58
-	buf="${buf} %{U#67367c}%{+u} $(clock) %{O2}%{-u}%{O2} %{F-}"
59
-	echo $buf
60
-    #make sleep dependent on battery state (charging)
61
-	sleep 0.4
62
-done

+ 6
- 4
nvim/.config/nvim/init.vim View File

@@ -31,15 +31,17 @@ if dein#load_state('/home/f0x/.dein')
31 31
   call dein#add('junegunn/fzf')
32 32
   call dein#add('junegunn/goyo.vim')
33 33
   call dein#add('itchyny/lightline.vim')
34
+  call dein#add('ying17zi/vim-live-latex-preview')
34 35
 
35 36
   " Syntax
36 37
   call dein#add('cespare/vim-toml')
37 38
   call dein#add('vim-perl/vim-perl6')
38 39
   call dein#add('bitc/vim-bad-whitespace')
40
+  "call dein#add('lervag/vimtex')
39 41
 
40 42
   " Colorschemes
41
-  " call dein#add('f0x52/vim-hybrid-material')
42
-  call dein#add('arcticicestudio/nord-vim')
43
+  call dein#add('chriskempson/base16-vim')
44
+  call dein#add('jrolfs/vim-base16-lightline')
43 45
 
44 46
   " You can specify revision/branch/tag.
45 47
   "call dein#add('Shougo/vimshell', { 'rev': '3787e5' })
@@ -78,7 +80,7 @@ imap <PageDown> <End>
78 80
 let g:nord_comment_brightness = 20
79 81
 set noshowmode
80 82
 let g:lightline = {
81
-      \ 'colorscheme': 'nord',
83
+      \ 'colorscheme': 'base16',
82 84
       \ }
83
-colorscheme nord
85
+colorscheme base16-tomorrow-night
84 86
 

+ 30
- 50
st/documents/src/st/config.h View File

@@ -88,51 +88,7 @@ static unsigned int tabspaces = 4;
88 88
 /* Terminal colors (16 first used in escape sequence) */
89 89
 static const char *colorname[] = {
90 90
 
91
-    "#3b4252",
92
-    "#bf616a",
93
-    "#a3be8c",
94
-    "#ebcb8b",
95
-    "#81a1c1",
96
-    "#b48ead",
97
-    "#88c0d0",
98
-    "#e5e9f0",
99
-    "#4c566a",
100
-    "#bf616a",
101
-    "#a3be8c",
102
-    "#ebcb8b",
103
-    "#81a1c1",
104
-    "#b48ead",
105
-    "#8fbcbb",
106
-    "#eceff4",
107
-
108
-"#4f4858",
109
-    "#c05c47",
110
-    "#428e8e",
111
-    "#e4b226",
112
-    "#4457a3",
113
-    "#903a62",
114
-    "#7aa1dc",
115
-    "#c4b7c5",
116
-    "#545d67",
117
-    "#c16772",
118
-    "#afda6e",
119
-    "#ebcf1a",
120
-    "#4880a5",
121
-    "#9568a1",
122
-    "#abbcda",
123
-    "#ffeefc",
124
-
125
-
126
-
127
-"#282a2e",
128
-    "#a54242",
129
-    "#8c9440",
130
-    "#de935f",
131
-    "#5f819d",
132
-    "#85678f",
133
-    "#5e8d87",
134
-    "#707880",
135
-    "#373b41",
91
+    "#1d1f21",
136 92
     "#cc6666",
137 93
     "#b5bd68",
138 94
     "#f0c674",
@@ -140,13 +96,37 @@ static const char *colorname[] = {
140 96
     "#b294bb",
141 97
     "#8abeb7",
142 98
     "#c5c8c6",
143
-
99
+    "#969896",
100
+    "#cc6666",
101
+    "#b5bd68",
102
+    "#f0c674",
103
+    "#81a2be",
104
+    "#b294bb",
105
+    "#8abeb7",
106
+    "#ffffff",
107
+
108
+    "#050a0f",
109
+    "#f2777a",
110
+    "#99cc99",
111
+    "#ffcc66",
112
+    "#6699cc",
113
+    "#cc99cc",
114
+    "#66cccc",
115
+    "#f2f0ec",
116
+    "#767676",
117
+    "#f2777a",
118
+    "#99cc99",
119
+    "#ffcc66",
120
+    "#6699cc",
121
+    "#cc99cc",
122
+    "#66cccc",
123
+    "#f2f0ec",
144 124
 
145 125
     [255] = 0,
146
-    //"#282c37",
147
-    //"#091427",
148
-    "#2e3440",
149
-    "#d9e1e8",
126
+    //"#110e0e",
127
+    "#1d1f21",
128
+    //"#d9e1e8",
129
+    "#c5c8c6",
150 130
     "#555555",
151 131
     "#c5c8c6",
152 132
 };

+ 7
- 7
telegram.tdesktop-palette View File

@@ -1,10 +1,10 @@
1 1
 //
2
-default_bg: #2E3440;
3
-default_bg2: #3B4252;
2
+default_bg: #1d1f21;
3
+default_bg2: #373b41;
4 4
 windowBg: default_bg;
5 5
 windowFg: #ffffff;
6
-windowBgOver: #313644;
7
-windowBgRipple: #e5e5e5;
6
+windowBgOver: #282a2e;
7
+windowBgRipple: #373b41;
8 8
 windowFgOver: windowFg;
9 9
 windowSubTextFg: #949494;
10 10
 windowSubTextFgOver: #919191;
@@ -22,7 +22,7 @@ imageBg: #ffffff;
22 22
 imageBgTransparent: #ffffff;
23 23
 activeButtonBg: windowBgActive;
24 24
 activeButtonBgOver: default_bg2;
25
-activeButtonBgRipple: #2095d0;
25
+activeButtonBgRipple: #373b41;
26 26
 activeButtonFg: windowFgActive;
27 27
 activeButtonFgOver: activeButtonFg;
28 28
 activeButtonSecondaryFg: #cceeff;
@@ -224,9 +224,9 @@ msgInServiceFg: windowActiveTextFg;
224 224
 msgInServiceFgSelected: windowActiveTextFg;
225 225
 msgOutServiceFg: #3a8e26;
226 226
 msgOutServiceFgSelected: #367570;
227
-msgInShadow: #748ea229;
227
+msgInShadow: #748ea200;
228 228
 msgInShadowSelected: #548dbb29;
229
-msgOutShadow: #3ac34740;
229
+msgOutShadow: #ffffff00;
230 230
 msgOutShadowSelected: #37a78e40;
231 231
 msgInDateFg: #a0acb6;
232 232
 msgInDateFgSelected: #6a9cc5;

+ 10
- 7
zsh/.zshrc View File

@@ -7,16 +7,20 @@ path+=("${HOME}/documents/src/rakudo-star-2017.07/install/share/perl6/site/bin")
7 7
 path+=("/opt/cross/bin")
8 8
 
9 9
 # enviroment
10
-export GOPATH=/home/f0x/documents/prog/go
10
+export GOPATH=${HOME}/documents/prog/go
11 11
 export TERM=screen
12
-export BROWSER=/home/f0x/.config/bin/waterfox
12
+export EDITOR=nvim
13
+export BROWSER=${HOME}/.config/bin/waterfox
13 14
 
14 15
 # aliases
15 16
 alias :q="exit"
16 17
 alias free="free -h"
17 18
 alias grep="grep --color"
18 19
 alias history="fc -l 1"
19
-alias ls="ls --color -F"
20
+alias irc="ssh -t vitreus screen -R"
21
+#alias ls="ls --color -F --group-directories-first"
22
+alias ls="exa --group-directories-first --color=always"
23
+alias l="exa --group-directories-first --color=always -l -a --git"
20 24
 alias mp3="youtube-dl --extract-audio --audio-format mp3"
21 25
 alias upload_w1r3="cat $1 | curl -F upload=@- https://w1r3.net"
22 26
 alias view="feh -Z -F"
@@ -36,7 +40,6 @@ bindkey '^[[1;5C' forward-word                        # [Ctrl-RightArrow] - move
36 40
 bindkey '^[[1;5D' backward-word                       # [Ctrl-LeftArrow] - move backward one word
37 41
 
38 42
 # theming
39
-#(wal -r &)
40 43
 eval "$(dircolors -b)"
41 44
 
42 45
 # completion
@@ -61,11 +64,11 @@ zle -N down-line-or-beginning-search
61 64
 setopt append_history
62 65
 setopt extended_history
63 66
 setopt hist_expire_dups_first
64
-setopt hist_ignore_dups # ignore duplication command history list
67
+setopt hist_ignore_dups
65 68
 setopt hist_ignore_space
66 69
 setopt hist_verify
67 70
 setopt inc_append_history
68
-setopt share_history # share command history data
71
+setopt share_history
69 72
 
70 73
 # prompt
71
-PROMPT='%a%F{1}[%c] %F{15}'
74
+PROMPT='%F{3}[] %a%F{1}%(!.root .)[%3c] %F{15}'

Loading…
Cancel
Save