File: renumber

package info (click to toggle)
epic5 2.0.1-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 4,696 kB
  • ctags: 6,357
  • sloc: ansic: 69,814; makefile: 715; ruby: 227; sh: 178; perl: 13
file content (22 lines) | stat: -rw-r--r-- 386 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
if (word(2 $loadinfo()) != [pf]) { load -pf $word(1 $loadinfo()); return; };

addset renumber_auto bool;
set renumber_auto off;

alias renumber {
  @ :cur = 1;
  fe ($numsort($winrefs())) i {
    if (i != cur) {
      ^window $i number $cur;
    };
    @ :cur++;
  };
  ^assign -i;
};

on #-window_kill 384 "*" {
  if (getset(renumber_auto) == [ON]) {
    renumber;
  };
};
#weirdo'2k6