├── changelog ├── config ├── copyright ├── crontab ├── cv.cgi ├── ddns.cgi ├── ge.cgi ├── i3blocks.conf ├── imagens ├── off.png └── on.png ├── ip.cgi ├── kali2 ├── kd ├── kdv ├── pesadao.awk ├── prompt ├── session ├── sover.rc ├── sv.cgi ├── ver.cgi ├── vimrc.changelog └── warning /changelog: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ## Show change logs 3 | 4 | if [[ $# -eq 0 ]] ; then 5 | echo "Usage: $0 [package name]" 6 | exit 1 7 | fi 8 | 9 | CHANGELOG=/usr/share/doc/$1/changelog.Debian.gz 10 | NATIVE=/usr/share/doc/$1/changelog.gz 11 | 12 | if [ ! -f "$CHANGELOG" ] 13 | then 14 | if [ ! -f "$NATIVE" ] 15 | then 16 | echo "No changelog found" 17 | else 18 | vim -u /usr/local/bin/vimrc.changelog /usr/share/doc/$1/changelog.gz 19 | fi 20 | else 21 | vim -u /usr/local/bin/vimrc.changelog /usr/share/doc/$1/changelog.Debian.gz 22 | fi 23 | 24 | -------------------------------------------------------------------------------- /config: -------------------------------------------------------------------------------- 1 | # This file has been auto-generated by i3-config-wizard(1). 2 | # It will not be overwritten, so edit it as you like. 3 | # 4 | # Should you change your keyboard layout some time, delete 5 | # this file and re-run i3-config-wizard(1). 6 | # 7 | 8 | # i3 config file (v4) 9 | # 10 | # Please see https://i3wm.org/docs/userguide.html for a complete reference! 11 | 12 | set $mod Mod4 13 | 14 | # Colors 15 | set $base00 #101218 16 | set $base01 #1f222d 17 | set $base02 #252936 18 | set $base03 #7780a1 19 | set $base04 #C0C5CE 20 | set $base05 #d1d4e0 21 | set $base06 #C9CCDB 22 | set $base07 #ffffff 23 | set $base08 #ee829f 24 | set $base09 #f99170 25 | set $base0A #ffefcc 26 | set $base0B #a5ffe1 27 | set $base0C #97e0ff 28 | set $base0D #97bbf7 29 | set $base0E #c0b7f9 30 | set $base0F #fcc09e 31 | 32 | 33 | # Font for window titles. Will also be used by the bar unless a different font 34 | # is used in the bar {} block below. 35 | font pango:System San Francisco Display 11 36 | 37 | # This font is widely installed, provides lots of unicode glyphs, right-to-left 38 | # text rendering and scalability on retina/hidpi displays (thanks to pango). 39 | #font pango:DejaVu Sans Mono 8 40 | 41 | # Before i3 v4.8, we used to recommend this one as the default: 42 | # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 43 | # The font above is very space-efficient, that is, it looks good, sharp and 44 | # clear in small sizes. However, its unicode glyph coverage is limited, the old 45 | # X core fonts rendering does not support right-to-left and this being a bitmap 46 | # font, it doesn’t scale on retina/hidpi displays. 47 | 48 | # Use Mouse+$mod to drag floating windows to their wanted position 49 | floating_modifier $mod 50 | 51 | # start a terminal 52 | bindsym $mod+Return exec --no-startup-id mate-terminal 53 | 54 | # kill focused window 55 | bindsym $mod+Shift+q kill 56 | 57 | # start dmenu (a program launcher) 58 | #bindsym $mod+d exec --no-startup-id dmenu_run -b 59 | #bindsym $mod+d exec rofi -show run -lines 5 -eh 2 -width 100 -padding 500 -opacity "5" -bw 0 -bc "$base01" -bg "$base02" -fg "$base07" -hlbg "$base05" -columns 2 -font "System San Francisco Display 18" -hlfg "#9575cd" 60 | bindsym $mod+d exec --no-startup-id rofi -show run 61 | #bindsym $mod+d exec --no-startup-id i3-dmenu-desktop --dmenu='rofi -dmenu' 62 | # There also is the (new) i3-dmenu-desktop which only displays applications 63 | # shipping a .desktop file. It is a wrapper around dmenu, so you need that 64 | # installed. 65 | # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop 66 | 67 | # Print screen 68 | bindsym Print exec mate-panel-screenshot 69 | bindsym Shift+Print exec mate-panel-screenshot -i 70 | 71 | # Toggle Sticky 72 | bindsym $mod+t sticky toggle 73 | 74 | # change focus 75 | bindsym $mod+j focus left 76 | bindsym $mod+k focus down 77 | #bindsym $mod+l focus up 78 | bindsym $mod+semicolon focus right 79 | 80 | # alternatively, you can use the cursor keys: 81 | bindsym $mod+Left focus left 82 | bindsym $mod+Down focus down 83 | bindsym $mod+Up focus up 84 | bindsym $mod+Right focus right 85 | 86 | # move focused window 87 | bindsym $mod+Shift+j move left 88 | bindsym $mod+Shift+k move down 89 | bindsym $mod+Shift+l move up 90 | bindsym $mod+Shift+semicolon move right 91 | 92 | # alternatively, you can use the cursor keys: 93 | bindsym $mod+Shift+Left move left 94 | bindsym $mod+Shift+Down move down 95 | bindsym $mod+Shift+Up move up 96 | bindsym $mod+Shift+Right move right 97 | 98 | # split in horizontal orientation 99 | bindsym $mod+h split h 100 | 101 | # split in vertical orientation 102 | bindsym $mod+v split v 103 | 104 | # enter fullscreen mode for the focused container 105 | bindsym $mod+f fullscreen toggle 106 | 107 | # change container layout (stacked, tabbed, toggle split) 108 | bindsym $mod+s layout stacking 109 | #bindsym $mod+w layout tabbed 110 | #bindsym $mod+e layout toggle split 111 | 112 | # toggle tiling / floating 113 | bindsym $mod+Shift+space floating toggle 114 | 115 | # change focus between tiling / floating windows 116 | bindsym $mod+space focus mode_toggle 117 | 118 | # focus the parent container 119 | bindsym $mod+a focus parent 120 | 121 | # focus the child container 122 | #bindsym $mod+d focus child 123 | 124 | # block screen 125 | bindsym $mod+l exec i3lock-fancy -p 126 | 127 | # Define names for default workspaces for which we configure key bindings later on. 128 | # We use variables to avoid repeating the names in multiple places. 129 | set $ws1 "1:  " 130 | set $ws2 "2:  " 131 | set $ws3 "3:  " 132 | set $ws4 "4:  " 133 | set $ws5 "5:  " 134 | set $ws6 "6:  " 135 | set $ws7 "7:  " 136 | set $ws8 "8:  " 137 | set $ws9 "9:  " 138 | set $ws10 "10:  " 139 | set $ws11 "11:" 140 | 141 | # switch to workspace 142 | bindsym $mod+1 workspace $ws1 143 | bindsym $mod+2 workspace $ws2 144 | bindsym $mod+3 workspace $ws3 145 | bindsym $mod+4 workspace $ws4 146 | bindsym $mod+5 workspace $ws5 147 | bindsym $mod+6 workspace $ws6 148 | bindsym $mod+7 workspace $ws7 149 | bindsym $mod+8 workspace $ws8 150 | bindsym $mod+9 workspace $ws9 151 | bindsym $mod+0 workspace $ws10 152 | bindsym $mod+minus workspace $ws11 153 | 154 | # move focused container to workspace 155 | bindsym $mod+Shift+1 move container to workspace $ws1 156 | bindsym $mod+Shift+2 move container to workspace $ws2 157 | bindsym $mod+Shift+3 move container to workspace $ws3 158 | bindsym $mod+Shift+4 move container to workspace $ws4 159 | bindsym $mod+Shift+5 move container to workspace $ws5 160 | bindsym $mod+Shift+6 move container to workspace $ws6 161 | bindsym $mod+Shift+7 move container to workspace $ws7 162 | bindsym $mod+Shift+8 move container to workspace $ws8 163 | bindsym $mod+Shift+9 move container to workspace $ws9 164 | bindsym $mod+Shift+0 move container to workspace $ws10 165 | bindsym $mod+Shift+minus move container to workspace $ws11 166 | 167 | bindsym $mod+Shift+question layout toggle all 168 | # switch to next workspace 169 | bindsym $mod+Tab workspace next 170 | bindsym $mod+Shift+Tab workspace prev 171 | 172 | # Assigned applications 173 | 174 | assign [class="Mate-terminal"] $ws1 175 | assign [class="Chromium"] $ws11 176 | assign [class="mpv"] $ws3 177 | assign [class="Webcamoid"] $ws3 178 | assign [class="Virt-manager"] $ws4 179 | assign [class="Xephyr"] $ws4 180 | assign [class="Popcorn-Time"] $ws5 181 | assign [class="Firefox"] $ws2 182 | assign [class="obs"] $ws6 183 | assign [class="Atril"] $ws7 184 | assign [class="Zathura"] $ws7 185 | assign [class="libreoffice-startcenter|libreoffice|libreoffice-impress"] $ws7 186 | assign [title="^.*[lL]ibre[oO]ffice.*$"] $ws7 187 | #assign [class="libreoffice-startcenter|Soffice"] $ws7 188 | assign [class="Pluma"] $ws7 189 | assign [class="thunderbird"] $ws8 190 | #assign [class="(?i)Inkscape"] $ws9 191 | assign [class="Inkscape"] $ws9 192 | assign [class="Gimp"] $ws10 193 | assign [class="Eom"] $ws10 194 | assign [class="Audacity"] $ws11 195 | assign [class="Lxterminal"] $ws8 196 | assign [class="kdenlive"] $ws8 197 | assign [class="Transmission-gtk"] $ws8 198 | 199 | # reload the configuration file 200 | bindsym $mod+Shift+c reload 201 | # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) 202 | bindsym $mod+Shift+r restart 203 | # exit i3 (logs you out of your X session) 204 | bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" 205 | 206 | # resize window (you can also use the mouse for that) 207 | mode "resize" { 208 | # These bindings trigger as soon as you enter the resize mode 209 | 210 | # Pressing left will shrink the window’s width. 211 | # Pressing right will grow the window’s width. 212 | # Pressing up will shrink the window’s height. 213 | # Pressing down will grow the window’s height. 214 | bindsym j resize shrink width 10 px or 10 ppt 215 | bindsym k resize grow height 10 px or 10 ppt 216 | bindsym l resize shrink height 10 px or 10 ppt 217 | bindsym semicolon resize grow width 10 px or 10 ppt 218 | 219 | # same bindings, but for the arrow keys 220 | bindsym Left resize shrink width 10 px or 10 ppt 221 | bindsym Down resize grow height 10 px or 10 ppt 222 | bindsym Up resize shrink height 10 px or 10 ppt 223 | bindsym Right resize grow width 10 px or 10 ppt 224 | 225 | # back to normal: Enter or Escape or $mod+r 226 | bindsym Return mode "default" 227 | bindsym Escape mode "default" 228 | bindsym $mod+r mode "default" 229 | } 230 | 231 | bindsym $mod+r mode "resize" 232 | 233 | # Start i3bar to display a workspace bar (plus the system information i3status 234 | # finds out, if available) 235 | #bar { 236 | # tray_output primary 237 | # status_command i3status 238 | #} 239 | default_border pixel 0 240 | 241 | bar { 242 | #status_command i3status 243 | status_command i3blocks -c ~/.config/i3/i3blocks.conf 244 | tray_output primary 245 | font pango: System San Francisco Display, FontAwesome 11 246 | position bottom 247 | strip_workspace_numbers no 248 | #bindsym button4 nop 249 | #bindsym button5 nop 250 | colors { 251 | separator $base03 252 | background $base01 253 | statusline $base05 254 | # border background text 255 | focused_workspace $base01 $base01 $base07 256 | active_workspace $base01 $base02 $base03 257 | inactive_workspace $base01 $base01 $base03 258 | urgent_workspace $base01 $base01 $base08 259 | } 260 | } 261 | 262 | 263 | 264 | # Applications for status bar 265 | #[volume] 266 | #label=vol 267 | #label=♪ 268 | #instance=Master 269 | #command=/usr/lib/i3blocks/volume 270 | #interval=once 271 | #signal=1 272 | 273 | # Applications started allways 274 | exec_always --no-startup-id nm-applet --sm-disable 275 | #exec --no-startup-id gtk-redshift 276 | exec --no-startup-id mate-terminal --maximize --command "bash -c /usr/local/bin/session; bash" 277 | #exec --no-startup-id chromium 278 | #exec --no-startup-id firefox 279 | #exec --no-startup-id compton -f 280 | exec --no-startup-id xautolock -time 10 -locker 'i3lock-fancy -p' 281 | #/usr/lib/xscreensaver/bsod -root 282 | 283 | #exec --no-startup-id mate-screensaver 284 | 285 | # Applications floating 286 | for_window [class="mpv"] floating enable border pixel 2 287 | for_window [class="Webcamoid"] floating enable border pixel 2 288 | for_window [instance=mpv] sticky enable 289 | for_window [instance=Webcamoid] sticky enable 290 | for_window [class="Galculator"] floating enable border pixel 2 291 | for_window [class="Leafpad"] floating enable border pixel 2 resize set 400 500 292 | for_window [class="Pavucontrol"] floating enable border pixel 2 resize set 700 500 293 | for_window [class="Lxterminal"] floating enable 294 | for_window [class="Xephyr"] floating enable border pixel 2 295 | #for_window [class="Inkscape"] floating enable border pixel 2 resize set 1000 800 296 | 297 | # Pulse Audio controls 298 | bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume 299 | bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume 300 | bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound 301 | 302 | # Sreen brightness controls 303 | #bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness 304 | #bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness 305 | 306 | # Bind keys to integrate with Tmux 307 | 308 | bindsym $mod+q exec tmux next-window 309 | bindsym $mod+e exec tmux select-pane -t :.+ 310 | bindsym $mod+w exec tmux select-pane -t :.- 311 | bindsym $mod+z exec tmux resize-pane -Z 312 | bindsym $mod+bracketleft exec tmux swap-pane -t :.- 313 | bindsym $mod+bracketright exec tmux swap-pane -t :.+ 314 | 315 | for_window [workspace=$ws4] layout tabbed 316 | for_window [workspace=$ws7] layout tabbed 317 | for_window [workspace=$ws9] layout tabbed 318 | 319 | bindsym $mod+Shift+z move scratchpad 320 | bindsym $mod+Shift+x scratchpad show 321 | -------------------------------------------------------------------------------- /copyright: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ## Show copyrights 3 | 4 | if [[ $# -eq 0 ]] ; then 5 | echo "Usage: $0 [package name]" 6 | exit 1 7 | fi 8 | 9 | COPYRIGHT=/usr/share/doc/$1/copyright 10 | 11 | if [ ! -f "$COPYRIGHT" ] 12 | then 13 | echo "No copyright found" 14 | else 15 | vim -u /usr/local/bin/vimrc.changelog $COPYRIGHT 16 | fi 17 | -------------------------------------------------------------------------------- /crontab: -------------------------------------------------------------------------------- 1 | ## Pseudo DDNS 2 | */20 * * * * root /usr/local/bin/warning 3 | -------------------------------------------------------------------------------- /cv.cgi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | $addr = $ENV{'REMOTE_ADDR'}; 5 | $buffer = $ENV{'QUERY_STRING'}; 6 | 7 | $localtime=localtime; 8 | $time=time; 9 | 10 | open (FILE,">>logs/cv_c.txt"); 11 | print (FILE "$localtime#$addr#$time\n"); 12 | close(FILE); 13 | 14 | open (FILE,">logs/cv.txt"); 15 | print (FILE "$localtime#$addr#$time\n"); 16 | close(FILE); 17 | 18 | print "Content-type: text/html\n\n"; 19 | 20 | print "$addr\n"; 21 | exit; 22 | 23 | -------------------------------------------------------------------------------- /ddns.cgi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | ############################################################################## 3 | # COPYLEFT NOTICE JPL ver.cgi # 4 | ############################################################################## 5 | 6 | print "Content-type: text/html\n\n"; 7 | print "Controle de IP's\n"; 8 | print "\n"; 9 | 10 | %hosts=( "01","cv:Cabo Verde:#00FF00", 11 | "02","ge:Geral:#FF0080", 12 | "03","ip:IP:#FF8373", 13 | #"04","ro:Ross:#008080", 14 | "05","sv:São Vicente:#FFFFFF", 15 | #"06","st:Tilápia:#80A8FF", 16 | #"07","ca:Carpa:#ffbd71", 17 | #"08","st2:Cara:#8EFFAC", 18 | #"09","el:Orsi:#FF8373", 19 | #3"10","ci:Bene:#FF7F00", 20 | #"11","pa:Papagaio:#C043FF", 21 | #"12","eq:Embaquim:#8EFFAC", 22 | #"13","dw:DWG:#008080", 23 | #"14","ex:Calex:#FF8373", 24 | #"15","ih:Ihm:#CO43FF", 25 | #"16","ch:Chassi:#FF8373", 26 | #"17","ad:Aglaw:#8EFFAC", 27 | #"18","ce:Ceramic:#008080", 28 | #"19","pi:Pipe:#C043FF", 29 | 30 | ); 31 | 32 | $on = "\"On\""; 33 | $off = "\"Off\""; 34 | $agora = time; 35 | $localtime = localtime; 36 | 37 | print "\n"; 38 | 39 | print ""; 40 | print ""; 41 | print "\n"; 42 | 43 | print ""; 44 | print ""; 45 | print ""; 46 | print ""; 47 | print ""; 48 | print ""; 49 | print "\n"; 50 | 51 | 52 | foreach $host (sort keys %hosts) { 53 | 54 | @dados = split(":",$hosts{$host}); 55 | 56 | open (FILE,"logs/$dados[0].txt"); 57 | $linha = ; 58 | close(FILE); 59 | 60 | @info = split("#",$linha); 61 | $hora = $info[0]; 62 | 63 | $hora_epoch = $info[2]; 64 | 65 | $diferenca = $agora - $hora_epoch; 66 | if ( $diferenca < 1200 ) { 67 | $status = "On"; 68 | } else { 69 | $status = "Off"; 70 | } 71 | 72 | print ""; 73 | print ""; 74 | print ""; 75 | print ""; 76 | print ""; 77 | print ""; 78 | print "\n"; 79 | 80 | } 81 | 82 | #print ""; 83 | #print ""; 84 | #print ""; 85 | 86 | 87 | 88 | print "
Controle de servidores: [$localtime]
Estado Diferença Servidor IP Horário
$status  $diferenca $dados[1] $info[1] $hora
"; 89 | print ""; 90 | exit; 91 | -------------------------------------------------------------------------------- /ge.cgi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | $addr = $ENV{'REMOTE_ADDR'}; 5 | $buffer = $ENV{'QUERY_STRING'}; 6 | 7 | $localtime=localtime; 8 | $time=time; 9 | 10 | open (FILE,">logs/ge.txt"); 11 | print (FILE "$localtime#$addr#$time\n"); 12 | close(FILE); 13 | 14 | print "Content-type: text/html\n\n"; 15 | 16 | print "$addr\n"; 17 | exit; 18 | 19 | -------------------------------------------------------------------------------- /i3blocks.conf: -------------------------------------------------------------------------------- 1 | # i3blocks config file 2 | # 3 | # Please see man i3blocks for a complete reference! 4 | # The man page is also hosted at http://vivien.github.io/i3blocks 5 | # 6 | # List of valid properties: 7 | # 8 | # align 9 | # color 10 | # command 11 | # full_text 12 | # instance 13 | # interval 14 | # label 15 | # min_width 16 | # name 17 | # separator 18 | # separator_block_width 19 | # short_text 20 | # signal 21 | # urgent 22 | 23 | # Global properties 24 | # 25 | # The top properties below are applied to every block, but can be overridden. 26 | # Each block command defaults to the script name to avoid boilerplate. 27 | command=/usr/share/i3blocks/$BLOCK_NAME 28 | separator_block_width=15 29 | markup=none 30 | 31 | [edit-button] 32 | full_text=[  33 | command=leafpad >/dev/null 34 | 35 | [calc-button] 36 | full_text= ] 37 | command=galculator >/dev/null 38 | 39 | #[weather] 40 | #command=curl -Ss 'https://wttr.in?0&T&Q' | cut -c 16- | head -2 | xargs echo 41 | #interval=3600 42 | #color=#A4C2F4 43 | 44 | 45 | #[click] 46 | #full_text=Click me! 47 | #command=echo "Got clicked with button $button" 48 | #color=#F79494 49 | 50 | #[bright-up] 51 | #full_text=> 52 | #command=xbacklight -inc 20 53 | #interval=0 54 | #separator=true 55 | 56 | #[bright-down] 57 | #full_text= 58 | #command=xbacklight -dec 20 59 | #interval=0 60 | #separator=false 61 | 62 | [volup] 63 | full_text= 64 | command=pactl set-sink-volume 0 +5% 65 | interval=0 66 | separator=false 67 | 68 | # Volume indicator 69 | # 70 | # The first parameter sets the step (and units to display) 71 | # The second parameter overrides the mixer selection 72 | # See the script for details. 73 | [volume] 74 | label= 75 | instance=Master 76 | #instance=PCM 77 | interval=1 78 | signal=10 79 | command=/usr/share/i3blocks/volume 5 pulse 80 | separator=false 81 | 82 | [voldown] 83 | full_text= 84 | command=pactl set-sink-volume 0 -5% 85 | interval=0 86 | 87 | # Memory usage 88 | # 89 | # The type defaults to "mem" if the instance is not specified. 90 | [memory] 91 | label= 92 | separator=false 93 | interval=30 94 | 95 | #[memory] 96 | #label=SWAP 97 | #instance=swap 98 | #separator=false 99 | #interval=30 100 | 101 | # Disk usage 102 | # 103 | # The directory defaults to $HOME if the instance is not specified. 104 | # The script may be called with a optional argument to set the alert 105 | # (defaults to 10 for 10%). 106 | [disk] 107 | #label=HOME 108 | label= 109 | #instance=/mnt/data 110 | interval=30 111 | 112 | # Network interface monitoring 113 | # 114 | # If the instance is not specified, use the interface used for default route. 115 | # The address can be forced to IPv4 or IPv6 with -4 or -6 switches. 116 | #[iface] 117 | #instance=wlan0 118 | #color=#00FF00 119 | #interval=10 120 | #separator=false 121 | 122 | [wifi] 123 | #instance=wlp3s0 124 | #label= 125 | label= 126 | interval=10 127 | separator=true 128 | 129 | #[bandwidth] 130 | #instance=eth0 131 | #interval=5 132 | 133 | # CPU usage 134 | # 135 | # The script may be called with -w and -c switches to specify thresholds, 136 | # see the script for details. 137 | [cpu_usage] 138 | label= 139 | interval=10 140 | min_width= 99.00% 141 | separator=true 142 | 143 | [load_average] 144 | label= 145 | interval=10 146 | 147 | # Battery indicator 148 | # 149 | # The battery instance defaults to 0. 150 | [battery] 151 | #label=BAT 152 | 153 | label= 154 | #instance=1 155 | interval=30 156 | separator=true 157 | 158 | # Temperature 159 | # 160 | # Support multiple chips, though lm-sensors. 161 | # The script may be called with -w and -c switches to specify thresholds, 162 | # see the script for details. 163 | [temperature] 164 | label= 165 | interval=10 166 | separator=true 167 | 168 | # Date Time 169 | # 170 | [time] 171 | label= 172 | command=date '+%H:%M' 173 | interval=10 174 | color=#F79494 175 | separator=true 176 | 177 | # Generic media player support 178 | # 179 | # This displays "ARTIST - SONG" if a music is playing. 180 | # Supported players are: spotify, vlc, audacious, xmms2, mplayer, and others. 181 | #[mediaplayer] 182 | #instance=spotify 183 | #interval=5 184 | #signal=10 185 | 186 | # OpenVPN support 187 | # 188 | # Support multiple VPN, with colors. 189 | #[openvpn] 190 | #interval=20 191 | 192 | # Key indicators 193 | # 194 | # Add the following bindings to i3 config file: 195 | # 196 | # bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks 197 | # bindsym --release Num_Lock exec pkill -SIGRTMIN+11 i3blocks 198 | #[keyindicator] 199 | #instance=CAPS 200 | #interval=once 201 | #signal=11 202 | 203 | #[keyindicator] 204 | #instance=NUM 205 | #interval=once 206 | #signal=11 207 | 208 | [power] 209 | full_text= 210 | command=i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit' >/dev/null 211 | interval=0 212 | 213 | -------------------------------------------------------------------------------- /imagens/off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kretcheu/devel/6169f932217385fdafb3ddc90b571737a2f3c88d/imagens/off.png -------------------------------------------------------------------------------- /imagens/on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kretcheu/devel/6169f932217385fdafb3ddc90b571737a2f3c88d/imagens/on.png -------------------------------------------------------------------------------- /ip.cgi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | $addr = $ENV{'REMOTE_ADDR'}; 5 | $buffer = $ENV{'QUERY_STRING'}; 6 | 7 | $localtime=localtime; 8 | $time=time; 9 | 10 | open (FILE,">>logs/ip_c.txt"); 11 | print (FILE "$localtime#$addr#$time\n"); 12 | close(FILE); 13 | 14 | open (FILE,">logs/ip.txt"); 15 | print (FILE "$localtime#$addr#$time\n"); 16 | close(FILE); 17 | 18 | print "Content-type: text/html\n\n"; 19 | 20 | print "$addr\n"; 21 | exit; 22 | 23 | -------------------------------------------------------------------------------- /kali2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd /home/kretcheu 3 | 4 | #mount /dev/sdb3 /kali 5 | 6 | losetup -P /dev/loop1 /vms/kali 7 | 8 | mount /dev/loop1p1 /kali 9 | 10 | mount --bind /proc /kali/proc 11 | mount --bind /sys /kali/sys 12 | mount --bind /dev /kali/dev 13 | 14 | /usr/sbin/chroot /kali 15 | 16 | umount -l /kali 17 | sleep 2 18 | losetup -d /dev/loop1 19 | -------------------------------------------------------------------------------- /kd: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | posicao=${2:-2} 4 | grep -i "${1}" -A ${posicao} /home/kretcheu/hack/tutoriais/dicas-ng.md 5 | -------------------------------------------------------------------------------- /kdv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | vi +/"${1}" -u /home/kretcheu/.vim/sover.rc /home/kretcheu/hack/tutoriais/dicas-ng.md 4 | -------------------------------------------------------------------------------- /pesadao.awk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env -S awk -f 2 | 3 | # coding: utf-8 4 | 5 | # Copyright 2020 Paulo Kretcheu 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Lesser General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Lesser General Public License for more details. 16 | 17 | # You should have received a copy of the GNU Lesser General Public License 18 | # along with this program. If not, see . 19 | 20 | 21 | BEGIN { 22 | RS="" 23 | FS="\n" 24 | 25 | hum[1024^2]="Gb" 26 | hum[1024]="Mb" 27 | 28 | ARGV[1] = "/var/lib/dpkg/status" 29 | ARGC = 2 30 | } 31 | 32 | 33 | NR { 34 | pacote = substr($1, index($1, ": ")+2) 35 | tamanho = substr($5, index($5, ": ")+1) 36 | 37 | tamanho = tamanho*1 38 | array [pacote]=tamanho 39 | } 40 | 41 | END { 42 | 43 | for (i in array) { 44 | 45 | for (x=1024^2; x>=1024; x/=1024) { 46 | if ( array[i]>=x ) { 47 | registro = sprintf("%.2f %s %s",array[i]/x,hum[x],i) 48 | break 49 | } 50 | } 51 | 52 | 53 | if ( array[i] < 1024 ){ 54 | registro = sprintf("%s %s","<~1 Mb",i) 55 | } 56 | 57 | print registro | "sort -h -k1 -k2" 58 | } 59 | 60 | } 61 | 62 | -------------------------------------------------------------------------------- /prompt: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # coding: utf-8 3 | 4 | # Copyright 2020 Paulo Kretcheu 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU Lesser General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU Lesser General Public License for more details. 15 | 16 | # You should have received a copy of the GNU Lesser General Public License 17 | # along with this program. If not, see . 18 | 19 | # Cores 20 | 21 | COR[0]="\[\e[0m\]" # Normal 22 | COR[1]="\[\e[1;31m\]" # Vermelho 23 | COR[2]="\[\e[1;32m\]" # Verde 24 | COR[3]="\[\e[1;33m\]" # Amarelo 25 | COR[4]="\[\e[1;34m\]" # Azul 26 | COR[5]="\[\e[1;35m\]" # Roxo 27 | COR[6]="\[\e[1;36m\]" # Cian 28 | COR[7]="\[\e[1;37m\]" # Branco 29 | COR[8]="\[\e[1;96m\]" # Azul Claro 30 | 31 | DES[0]="\342\224\214\342\224\200" # Linha de canto 32 | DES[1]="\342\224\224\342\224\200\342\224\200\342\225\274" # Linha e ponto 33 | DES[2]="\342\234\227" # Sinal de erro 34 | DES[3]="\342\224\200" # Linha horizontal 35 | 36 | lista=$1 37 | 38 | if [ $# -eq 0 ] 39 | then 40 | lista='1 2 3 4 5 6 7 8' 41 | orientacao="Usage: prompt [theme] [type] 42 | theme: define color theme. (1-8) 43 | type: define assets included. (1-4) " 44 | fi 45 | 46 | for i in $lista; do 47 | # Definição do Tema 48 | case $i in 49 | 1) 50 | COR_BASE=${COR[1]} 51 | COR_USER=${COR[3]} 52 | COR_ARROBA=${COR[7]} 53 | COR_SERVER=${COR[6]} 54 | COR_DIR=${COR[3]} 55 | COR_HORARIO=${COR[7]} 56 | COR_BATERIA=${COR[3]} 57 | COR_CURSOR=${COR[7]} 58 | ;; 59 | 60 | 2) 61 | COR_BASE=${COR[5]} 62 | COR_USER=${COR[6]} 63 | COR_ARROBA=${COR[3]} 64 | COR_SERVER=${COR[4]} 65 | COR_DIR=${COR[2]} 66 | COR_HORARIO=${COR[7]} 67 | COR_BATERIA=${COR[7]} 68 | COR_CURSOR=${COR[1]} 69 | ;; 70 | 71 | 3) 72 | COR_BASE=${COR[2]} 73 | COR_USER=${COR[6]} 74 | COR_ARROBA=${COR[3]} 75 | COR_SERVER=${COR[7]} 76 | COR_DIR=${COR[7]} 77 | COR_HORARIO=${COR[7]} 78 | COR_BATERIA=${COR[7]} 79 | COR_CURSOR=${COR[2]} 80 | ;; 81 | 82 | 4) 83 | COR_BASE=${COR[3]} 84 | COR_USER=${COR[6]} 85 | COR_ARROBA=${COR[3]} 86 | COR_SERVER=${COR[7]} 87 | COR_DIR=${COR[7]} 88 | COR_HORARIO=${COR[7]} 89 | COR_BATERIA=${COR[7]} 90 | COR_CURSOR=${COR[2]} 91 | ;; 92 | 93 | 5) 94 | COR_BASE=${COR[6]} 95 | COR_USER=${COR[6]} 96 | COR_ARROBA=${COR[3]} 97 | COR_SERVER=${COR[7]} 98 | COR_DIR=${COR[7]} 99 | COR_HORARIO=${COR[7]} 100 | COR_BATERIA=${COR[7]} 101 | COR_CURSOR=${COR[2]} 102 | ;; 103 | 104 | 6) 105 | COR_BASE=${COR[4]} 106 | COR_USER=${COR[6]} 107 | COR_ARROBA=${COR[3]} 108 | COR_SERVER=${COR[7]} 109 | COR_DIR=${COR[3]} 110 | COR_HORARIO=${COR[7]} 111 | COR_BATERIA=${COR[7]} 112 | COR_CURSOR=${COR[2]} 113 | ;; 114 | 115 | 7) 116 | COR_BASE=${COR[7]} 117 | COR_USER=${COR[3]} 118 | COR_ARROBA=${COR[7]} 119 | COR_SERVER=${COR[6]} 120 | COR_DIR=${COR[3]} 121 | COR_HORARIO=${COR[7]} 122 | COR_BATERIA=${COR[3]} 123 | COR_CURSOR=${COR[7]} 124 | ;; 125 | 126 | 8) 127 | COR_BASE=${COR[7]} 128 | COR_USER=${COR[1]} 129 | COR_ARROBA=${COR[7]} 130 | COR_SERVER=${COR[1]} 131 | COR_DIR=${COR[1]} 132 | COR_HORARIO=${COR[1]} 133 | COR_BATERIA=${COR[1]} 134 | COR_CURSOR=${COR[7]} 135 | ;; 136 | 137 | *) 138 | COR_BASE=${COR[1]} 139 | COR_USER=${COR[3]} 140 | COR_ARROBA=${COR[7]} 141 | COR_SERVER=${COR[6]} 142 | COR_DIR=${COR[3]} 143 | COR_HORARIO=${COR[7]} 144 | COR_BATERIA=${COR[3]} 145 | COR_CURSOR=${COR[7]} 146 | ;; 147 | 148 | 149 | esac; 150 | 151 | # Partes 152 | 153 | ANTES="${COR_BASE}${DES[0]}" 154 | 155 | MSG="${COR[3]}[${COR[1]}${DES[2]}${COR[3]}]${CORBASE}${DES[3]}" 156 | #ERRO='$([[ $? != 0 ]] && echo "'${MSG}'")' 157 | 158 | USER="${COR_USER}\u" 159 | SERVER="${COR_SERVER}\h" 160 | SEPARADOR="${COR_BASE}${DES[3]}" 161 | DIR="${COR_DIR}\w" 162 | HORARIO="${COR_HORARIO}\t" 163 | 164 | DEVICE="$(upower -e | grep battery)" 165 | 166 | ASPAS="'" 167 | BATERIA='['${COR_BATERIA}'$(upower -i '$DEVICE' |grep percentage | rev | cut -c 1-3 |rev)'${COR_BASE}']' 168 | DEPOIS="\n${COR_BASE}${DES[1]}" 169 | CURSOR="${COR_CURSOR} "'\$'" " 170 | 171 | LOADAVERAGE='['${COR_BATERIA}'$(cat /proc/loadavg | cut -d" " -f1-3)'${COR_BASE}']' 172 | 173 | TYPE=${2} 174 | 175 | case $TYPE in 176 | 2) # Sem Bateria com Loadaverage 177 | PS1="${ANTES}${ERRO}${COR_BASE}[${USER}${COR_ARROBA}@${SERVER}${COR_BASE}]${SEPARADOR}${COR_BASE}[${DIR}${COR_BASE}]${SEPARADOR}[${HORARIO}${COR_BASE}]${SEPARADOR}${LOADAVERAGE}${DEPOIS}${CURSOR}${COR[0]}" 178 | ;; 179 | 3) # Sem Bateria e sem Loadaverage 180 | PS1="${ANTES}${ERRO}${COR_BASE}[${USER}${COR_ARROBA}@${SERVER}${COR_BASE}]${SEPARADOR}${COR_BASE}[${DIR}${COR_BASE}]${SEPARADOR}[${HORARIO}${COR_BASE}]${DEPOIS}${CURSOR}${COR[0]}" 181 | ;; 182 | 4) # Sem Bateria, sem loadaverage sem horário 183 | PS1="${ANTES}${ERRO}${COR_BASE}[${USER}${COR_ARROBA}@${SERVER}${COR_BASE}]${SEPARADOR}${COR_BASE}[${DIR}${COR_BASE}]${DEPOIS}${CURSOR}${COR[0]}" 184 | ;; 185 | 1|*) # Com Bateria e Loadaverage 186 | PS1="${ANTES}${ERRO}${COR_BASE}[${USER}${COR_ARROBA}@${SERVER}${COR_BASE}]${SEPARADOR}${COR_BASE}[${DIR}${COR_BASE}]${SEPARADOR}[${HORARIO}${COR_BASE}]${SEPARADOR}${BATERIA}${SEPARADOR}${LOADAVERAGE}${DEPOIS}${CURSOR}${COR[0]}" 187 | ;; 188 | esac 189 | 190 | if [ $# -gt 0 ] 191 | then 192 | echo 193 | echo "Pare ter essa aparência no terminal vai precisar substituir a definição da variável PS1." 194 | echo "Normalmente no arquivo ~/.bashrc ou para todos os usuários em /etc/bash.bashrc" 195 | echo 196 | echo "Testado em versões Buster e Sid do Debian, mas deve funcionar em muitas outras." 197 | echo 198 | echo "PS1='$PS1'" 199 | echo 200 | fi 201 | 202 | echo "--- Essa é a amostra do tema $i de como ficará o terminal ---------------------------------------------" 203 | echo 204 | printf '%s\n' "${PS1@P}" 205 | #echo "${PS1@P}" 206 | echo 207 | done 208 | 209 | echo "$orientacao" 210 | echo 211 | 212 | -------------------------------------------------------------------------------- /session: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Session Name 3 | 4 | SESSION="Donaco" 5 | SESSIONEXISTS=$(tmux list-sessions | grep ${SESSION}) 6 | 7 | # Only create tmux SESSION if it doesn't already exist 8 | 9 | if [ "${SESSIONEXISTS}" = "" ] 10 | then 11 | 12 | # Start New Session with our name 13 | tmux start-server 14 | tmux new-session -d -s $SESSION -n Admin 15 | 16 | # Creating panes 17 | 18 | tmux select-window -t=$SESSION:0 19 | 20 | tmux split-window -v 21 | tmux split-window -h 22 | tmux select-pane -t 0 23 | tmux split-window -h 24 | 25 | # Create new window and more panes 26 | 27 | tmux new-window -t=$SESSION:1 -n 'Work' 28 | 29 | tmux split-window -v 30 | tmux split-window -h 31 | tmux select-pane -t 0 32 | tmux split-window -h 33 | 34 | # Select each panel and run some command 35 | # C-m equals to press enter key 36 | 37 | tmux select-pane -t 0 38 | tmux send-keys -t=$SESSION:1 "cd hack/devel" C-m "clear" C-m 39 | 40 | tmux select-pane -t 3 41 | tmux send-keys -t=$SESSION:1 "cd hack/kvb/curso" C-m "clear" C-m 42 | 43 | tmux select-pane -t 2 44 | tmux send-keys -t=$SESSION:1 "cd hack/tutoriais" C-m "clear" C-m 45 | 46 | 47 | tmux select-window -t=$SESSION:0 48 | 49 | tmux select-pane -t 2 50 | tmux send-keys -t=$SESSION:1 "df -h" C-m 51 | 52 | tmux select-pane -t 1 53 | tmux send-keys -t=$SESSION:0 "su" C-m 54 | 55 | tmux select-pane -t 0 56 | tmux send-keys -t=$SESSION:0 "su" C-m 57 | 58 | fi 59 | 60 | # Attach on session 61 | 62 | tmux attach-session -t=$SESSION 63 | -------------------------------------------------------------------------------- /sover.rc: -------------------------------------------------------------------------------- 1 | " No compatibility – necessary for mappings to work. 2 | set nocompatible 3 | 4 | " Status line 5 | " set laststatus=0 6 | " set cmdheight=1 7 | set nomodifiable " Only in version 6.0 8 | set readonly 9 | 10 | " My xterms have a navy-blue background, so I need this line too. 11 | set background=dark 12 | 13 | " Turn syntax on 14 | syntax enable 15 | 16 | " No menu bar and tool bar 17 | set guioptions=aiMr 18 | 19 | " Key bindings. 20 | nmap b 21 | nmap q :q! 22 | "nmap 23 | "nmap 24 | 25 | " To type the following line, type *two* C-V's followed by two spaces. This 26 | " is how you map the spacebar. 27 | nmap ^V 28 | set ignorecase 29 | 30 | -------------------------------------------------------------------------------- /sv.cgi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | 4 | $addr = $ENV{'REMOTE_ADDR'}; 5 | $buffer = $ENV{'QUERY_STRING'}; 6 | 7 | $localtime=localtime; 8 | $time=time; 9 | 10 | open (FILE,">>logs/sv_c.txt"); 11 | print (FILE "$localtime#$addr#$time\n"); 12 | close(FILE); 13 | 14 | open (FILE,">logs/sv.txt"); 15 | print (FILE "$localtime#$addr#$time\n"); 16 | close(FILE); 17 | 18 | print "Content-type: text/html\n\n"; 19 | 20 | print "$addr\n"; 21 | exit; 22 | 23 | -------------------------------------------------------------------------------- /ver.cgi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kretcheu/devel/6169f932217385fdafb3ddc90b571737a2f3c88d/ver.cgi -------------------------------------------------------------------------------- /vimrc.changelog: -------------------------------------------------------------------------------- 1 | " No compatibility – necessary for mappings to work. 2 | set nocompatible 3 | 4 | " Status line 5 | set laststatus=0 6 | set cmdheight=1 7 | set nomodifiable " Only in version 6.0 8 | set readonly 9 | 10 | " My xterms have a navy-blue background, so I need this line too. 11 | set background=dark 12 | 13 | " Turn syntax on 14 | syntax enable 15 | 16 | " No menu bar and tool bar 17 | set guioptions=aiMr 18 | 19 | " Key bindings. 20 | nmap b 21 | nmap q :q! 22 | nmap 23 | nmap 24 | 25 | " To type the following line, type *two* C-V's followed by two spaces. This 26 | " is how you map the spacebar. 27 | nmap ^V 28 | -------------------------------------------------------------------------------- /warning: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # DDNS GNUWorks 4 | 5 | /usr/bin/wget -t 2 -q -O /tmp/ip http://gnu.works/ip?c=cv 6 | 7 | --------------------------------------------------------------------------------