├── .Xresources ├── .config ├── alacritty │ └── alacritty.yml ├── btop │ └── btop.conf ├── cava │ ├── config │ └── shaders │ │ ├── bar_spectrum.frag │ │ ├── northern_lights.frag │ │ └── pass_through.vert ├── cmus │ ├── .gitignore │ ├── autosave │ ├── notify.cfg │ └── playlists │ │ └── default ├── dunst │ └── dunstrc ├── emacs │ ├── .gitignore │ ├── bookmarks │ ├── init.el │ └── logo │ │ └── unix.png ├── firefox │ ├── chrome │ │ ├── includes │ │ │ ├── config-mouse.css │ │ │ ├── config.css │ │ │ ├── floating-panel.css │ │ │ ├── layout.css │ │ │ ├── nav-bar.css │ │ │ ├── responsive-windows-fix.css │ │ │ ├── responsive.css │ │ │ └── tabs.css │ │ └── userChrome.css │ ├── search.json.mozlz4 │ └── user.js ├── flameshot │ └── flameshot.ini ├── kitty │ ├── colors-kitty.conf │ └── kitty.conf ├── mpd │ ├── .gitignore │ ├── mpd.conf │ └── mpd.state ├── mpv │ ├── input.conf │ ├── mpv.conf │ └── scripts │ │ ├── mpv_thumbnail_script_client_osc.lua │ │ └── mpv_thumbnail_script_server.lua ├── ncmpcpp │ ├── .gitignore │ └── config ├── neofetch │ └── config.conf ├── nvim │ ├── .gitignore │ ├── init.lua │ └── lua │ │ └── aeon │ │ ├── alpha.lua │ │ ├── autopairs.lua │ │ ├── bufferline.lua │ │ ├── cmp.lua │ │ ├── colorizer.lua │ │ ├── colorscheme.lua │ │ ├── gitsigns.lua │ │ ├── keymaps.lua │ │ ├── lsp_config.lua │ │ ├── lualine.lua │ │ ├── nvim-tree.lua │ │ ├── options.lua │ │ ├── plugins.lua │ │ ├── telescope.lua │ │ ├── toggleterm.lua │ │ ├── transparent.lua │ │ └── treesitter.lua ├── picom │ └── picom.conf ├── qutebrowser │ ├── autoconfig.yml │ ├── bookmarks │ │ └── urls │ ├── config.py │ ├── pywalQute │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-310.pyc │ │ │ ├── __init__.cpython-311.pyc │ │ │ ├── draw.cpython-310.pyc │ │ │ └── draw.cpython-311.pyc │ │ └── draw.py │ └── quickmarks ├── ranger │ ├── .gitignore │ ├── plugins │ │ ├── __init__.py │ │ └── ranger_devicons │ │ │ ├── __init__.py │ │ │ └── devicons.py │ ├── rc.conf │ ├── rifle.conf │ └── scope.sh ├── redshift │ └── redshift.conf ├── suckless │ ├── dmenu │ │ ├── Makefile │ │ ├── arg.h │ │ ├── config.def.h │ │ ├── config.mk │ │ ├── dmenu │ │ ├── dmenu.1 │ │ ├── dmenu.c │ │ ├── dmenu_path │ │ ├── dmenu_run │ │ ├── drw.c │ │ ├── drw.h │ │ ├── patches │ │ │ ├── alpha.diff │ │ │ ├── border.diff │ │ │ ├── caseinsensitive.diff │ │ │ ├── center.diff │ │ │ ├── fuzzyhighlight.diff │ │ │ ├── fuzzymatch.diff │ │ │ ├── listfullwidth.diff │ │ │ ├── numbers.diff │ │ │ ├── password.diff │ │ │ └── xresources.diff │ │ ├── stest │ │ ├── stest.1 │ │ ├── stest.c │ │ ├── util.c │ │ └── util.h │ ├── dwm │ │ ├── Makefile │ │ ├── config.def.h │ │ ├── config.mk │ │ ├── drw.c │ │ ├── drw.h │ │ ├── dwm │ │ ├── dwm.1 │ │ ├── dwm.c │ │ ├── dwm.desktop │ │ ├── dwm.png │ │ ├── exitdwm.c │ │ ├── movestack.c │ │ ├── patches │ │ │ ├── alpha.diff │ │ │ ├── alttagsdecoration.diff │ │ │ ├── attachdirection.diff │ │ │ ├── awesomebar.diff │ │ │ ├── barheight.diff │ │ │ ├── barpadding.diff │ │ │ ├── center.diff │ │ │ ├── centeredwindowname.diff │ │ │ ├── dragfact.diff │ │ │ ├── dynamicscratchpads.diff │ │ │ ├── exitmenu.diff │ │ │ ├── floatrules.diff │ │ │ ├── focusonnetactive.diff │ │ │ ├── hidevacanttags.diff │ │ │ ├── layoutmenu.diff │ │ │ ├── moveresize.diff │ │ │ ├── movestack.diff │ │ │ ├── noborderfloatingfix.diff │ │ │ ├── pertag.diff │ │ │ ├── placemouse.diff │ │ │ ├── preserveonrestart.diff │ │ │ ├── resizecorners.diff │ │ │ ├── riodraw.diff │ │ │ ├── savefloats.diff │ │ │ ├── scratchpads.diff │ │ │ ├── statusallmons.diff │ │ │ ├── statusbutton.diff │ │ │ ├── statuscmd.diff │ │ │ ├── sticky.diff │ │ │ ├── stickyindicator.diff │ │ │ ├── swallow.diff │ │ │ ├── tag-preview.diff │ │ │ ├── togglefloatingcenter.diff │ │ │ ├── underlinetags.diff │ │ │ ├── vanitygapscombo.diff │ │ │ ├── windowmap.diff │ │ │ ├── winicon.diff │ │ │ └── xresources.diff │ │ ├── transient.c │ │ ├── util.c │ │ ├── util.h │ │ └── vanitygaps.c │ ├── dwmblocks-async │ │ ├── .clang-format │ │ ├── .clangd │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── config.c │ │ ├── config.h │ │ ├── inc │ │ │ ├── bar.h │ │ │ ├── block.h │ │ │ ├── util.h │ │ │ └── x11.h │ │ └── src │ │ │ ├── bar.c │ │ │ ├── block.c │ │ │ ├── main.c │ │ │ ├── util.c │ │ │ └── x11.c │ ├── slock │ │ ├── Makefile │ │ ├── arg.h │ │ ├── config.def.h │ │ ├── config.mk │ │ ├── explicit_bzero.c │ │ ├── explicit_bzero.o │ │ ├── slock │ │ ├── slock.1 │ │ ├── slock.c │ │ ├── slock.o │ │ └── util.h │ └── st │ │ ├── Makefile │ │ ├── arg.h │ │ ├── boxdraw.c │ │ ├── boxdraw_data.h │ │ ├── config.def.h │ │ ├── config.mk │ │ ├── patches │ │ ├── alpha-osc11.diff │ │ ├── boxdraw.diff │ │ ├── desktopentry.diff │ │ ├── font2.diff │ │ ├── glyph-wide-support-boxdraw.diff │ │ ├── netwmicon.diff │ │ ├── patch_column.diff │ │ ├── scrollback-mouse.diff │ │ ├── scrollback.diff │ │ ├── workingdir.diff │ │ └── xresources.diff │ │ ├── st │ │ ├── st.1 │ │ ├── st.c │ │ ├── st.desktop │ │ ├── st.h │ │ ├── st.info │ │ ├── st.png │ │ ├── win.h │ │ └── x.c ├── sxiv │ └── exec │ │ └── key-handler ├── user-dirs.dirs ├── wal │ └── templates │ │ ├── alacritty.yml │ │ ├── config │ │ ├── dunstrc │ │ ├── flameshot.ini │ │ └── zathurarc ├── xmenu │ ├── Makefile │ ├── config.h │ ├── xmenu │ ├── xmenu.1 │ ├── xmenu.c │ ├── xmenu.o │ └── xmenu.sh ├── xsettingsd │ └── xsettingsd.conf ├── zathura │ ├── .gitignore │ └── zathurarc └── zsh │ ├── .zprofile │ ├── .zshrc │ ├── plugins │ ├── fast-syntax-highlighting │ │ ├── .fast-make-targets │ │ ├── .fast-read-ini-file │ │ ├── .fast-run-command │ │ ├── .fast-run-git-command │ │ ├── .fast-zts-read-all │ │ ├── .travis.yml │ │ ├── .zunit.yml │ │ ├── _fast-theme │ │ ├── fast-highlight │ │ ├── fast-string-highlight │ │ ├── fast-syntax-highlighting.plugin.zsh │ │ ├── fast-theme │ │ ├── share │ │ │ └── free_theme.zsh │ │ ├── tests │ │ │ ├── _output │ │ │ │ └── .gitkeep │ │ │ ├── _support │ │ │ │ ├── .gitkeep │ │ │ │ └── bootstrap │ │ │ ├── example.zunit │ │ │ └── main.zunit │ │ ├── themes │ │ │ ├── clean.ini │ │ │ ├── default.ini │ │ │ ├── forest.ini │ │ │ ├── free.ini │ │ │ ├── q-jmnemonic.ini │ │ │ ├── safari.ini │ │ │ ├── spa.ini │ │ │ ├── sv-orple.ini │ │ │ ├── sv-plant.ini │ │ │ └── zdharma.ini │ │ └── →chroma │ │ │ ├── -alias.ch │ │ │ ├── -autoload.ch │ │ │ ├── -autorandr.ch │ │ │ ├── -awk.ch │ │ │ ├── -docker.ch │ │ │ ├── -example.ch │ │ │ ├── -fast-theme.ch │ │ │ ├── -fpath_peq.ch │ │ │ ├── -git.ch │ │ │ ├── -grep.ch │ │ │ ├── -hub.ch │ │ │ ├── -ionice.ch │ │ │ ├── -lab.ch │ │ │ ├── -make.ch │ │ │ ├── -nice.ch │ │ │ ├── -nmcli.ch │ │ │ ├── -node.ch │ │ │ ├── -ogit.ch │ │ │ ├── -perl.ch │ │ │ ├── -precommand.ch │ │ │ ├── -printf.ch │ │ │ ├── -ruby.ch │ │ │ ├── -scp.ch │ │ │ ├── -sh.ch │ │ │ ├── -source.ch │ │ │ ├── -ssh.ch │ │ │ ├── -subcommand.ch │ │ │ ├── -subversion.ch │ │ │ ├── -vim.ch │ │ │ ├── -whatis.ch │ │ │ ├── -which.ch │ │ │ ├── -zinit.ch │ │ │ └── main-chroma.ch │ ├── zsh-autopair │ │ ├── .editorconfig │ │ ├── .travis.yml │ │ ├── .zunit.yml │ │ ├── autopair.plugin.zsh │ │ ├── autopair.zsh │ │ └── zsh-autopair.plugin.zsh │ └── zsh-autosuggestions │ │ ├── .circleci │ │ └── config.yml │ │ ├── .editorconfig │ │ ├── .rspec │ │ ├── .rubocop.yml │ │ ├── .ruby-version │ │ ├── Makefile │ │ ├── install_test_zsh.sh │ │ ├── spec │ │ ├── async_spec.rb │ │ ├── integrations │ │ │ ├── auto_cd_spec.rb │ │ │ ├── bracketed_paste_magic_spec.rb │ │ │ ├── client_zpty_spec.rb │ │ │ ├── glob_subst_spec.rb │ │ │ ├── rebound_bracket_spec.rb │ │ │ ├── vi_mode_spec.rb │ │ │ ├── wrapped_widget_spec.rb │ │ │ └── zle_input_stack_spec.rb │ │ ├── kill_ring_spec.rb │ │ ├── line_init_spec.rb │ │ ├── multi_line_spec.rb │ │ ├── options │ │ │ ├── buffer_max_size_spec.rb │ │ │ ├── highlight_style_spec.rb │ │ │ ├── original_widget_prefix_spec.rb │ │ │ ├── strategy_spec.rb │ │ │ └── widget_lists_spec.rb │ │ ├── spec_helper.rb │ │ ├── strategies │ │ │ ├── completion_spec.rb │ │ │ ├── history_spec.rb │ │ │ ├── match_prev_cmd_spec.rb │ │ │ └── special_characters_helper.rb │ │ ├── terminal_session.rb │ │ └── widgets │ │ │ ├── disable_spec.rb │ │ │ ├── enable_spec.rb │ │ │ ├── fetch_spec.rb │ │ │ └── toggle_spec.rb │ │ ├── src │ │ ├── async.zsh │ │ ├── bind.zsh │ │ ├── config.zsh │ │ ├── fetch.zsh │ │ ├── highlight.zsh │ │ ├── start.zsh │ │ ├── strategies │ │ │ ├── completion.zsh │ │ │ ├── history.zsh │ │ │ └── match_prev_cmd.zsh │ │ ├── util.zsh │ │ └── widgets.zsh │ │ ├── zsh-autosuggestions.plugin.zsh │ │ └── zsh-autosuggestions.zsh │ └── themes │ └── lambda.zsh-theme ├── .github ├── README.md └── dots_bootstrap.sh ├── .local └── bin │ ├── alwayslock │ ├── calendar │ ├── cmus-notify │ ├── colorpicker │ ├── dfiles │ ├── dots │ ├── droidmount │ ├── dstreaming │ ├── dwall │ ├── dwifi │ ├── emoji │ ├── layoutmenu.sh │ ├── mpdnotify │ ├── nightmode │ ├── playerctlstatus │ ├── screenshot │ ├── snipertext │ ├── statusbar │ ├── s_battery │ ├── s_bri │ ├── s_cmus │ ├── s_cpu │ ├── s_date │ ├── s_hdd │ ├── s_kern │ ├── s_mem │ ├── s_mic │ ├── s_mpd │ ├── s_net │ ├── s_nettraf │ ├── s_spotify │ ├── s_upd │ ├── s_vol │ ├── s_wtr │ └── s_xkb │ ├── statusbrightness │ ├── statusmic │ ├── statusvolume │ ├── updnotify │ └── wg ├── .xinitrc ├── .zshenv └── install.sh /.Xresources: -------------------------------------------------------------------------------- 1 | ! X colors. 2 | ! Generated by 'wal' 3 | *foreground: #d7d3ea 4 | *background: #181f35 5 | *.foreground: #d7d3ea 6 | *.background: #181f35 7 | emacs*foreground: #d7d3ea 8 | emacs*background: #181f35 9 | URxvt*foreground: #d7d3ea 10 | XTerm*foreground: #d7d3ea 11 | UXTerm*foreground: #d7d3ea 12 | URxvt*background: [100]#181f35 13 | XTerm*background: #181f35 14 | UXTerm*background: #181f35 15 | URxvt*cursorColor: #d7d3ea 16 | XTerm*cursorColor: #d7d3ea 17 | UXTerm*cursorColor: #d7d3ea 18 | URxvt*borderColor: [100]#181f35 19 | 20 | ! Colors 0-15. 21 | *.color0: #181f35 22 | *color0: #181f35 23 | *.color1: #2863D2 24 | *color1: #2863D2 25 | *.color2: #5B65D3 26 | *color2: #5B65D3 27 | *.color3: #AE52D9 28 | *color3: #AE52D9 29 | *.color4: #3AA8ED 30 | *color4: #3AA8ED 31 | *.color5: #5F97DD 32 | *color5: #5F97DD 33 | *.color6: #A09DE5 34 | *color6: #A09DE5 35 | *.color7: #d7d3ea 36 | *color7: #d7d3ea 37 | *.color8: #9693a3 38 | *color8: #9693a3 39 | *.color9: #2863D2 40 | *color9: #2863D2 41 | *.color10: #5B65D3 42 | *color10: #5B65D3 43 | *.color11: #AE52D9 44 | *color11: #AE52D9 45 | *.color12: #3AA8ED 46 | *color12: #3AA8ED 47 | *.color13: #5F97DD 48 | *color13: #5F97DD 49 | *.color14: #A09DE5 50 | *color14: #A09DE5 51 | *.color15: #d7d3ea 52 | *color15: #d7d3ea 53 | 54 | ! Black color that will not be affected by bold highlighting. 55 | *.color66: #181f35 56 | *color66: #181f35 57 | 58 | ! Xclock colors. 59 | XClock*foreground: #d7d3ea 60 | XClock*background: #181f35 61 | XClock*majorColor: rgba:d7/d3/ea/ff 62 | XClock*minorColor: rgba:d7/d3/ea/ff 63 | XClock*hourColor: rgba:d7/d3/ea/ff 64 | XClock*minuteColor: rgba:d7/d3/ea/ff 65 | XClock*secondColor: rgba:d7/d3/ea/ff 66 | 67 | ! Set depth to make transparency work. 68 | URxvt*depth: 32 69 | -------------------------------------------------------------------------------- /.config/alacritty/alacritty.yml: -------------------------------------------------------------------------------- 1 | /home/aeon/.cache/wal/alacritty.yml -------------------------------------------------------------------------------- /.config/cava/config: -------------------------------------------------------------------------------- 1 | /home/aeon/.cache/wal/config -------------------------------------------------------------------------------- /.config/cava/shaders/northern_lights.frag: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | in vec2 fragCoord; 4 | out vec4 fragColor; 5 | 6 | // bar values. defaults to left channels first (low to high), then right (high to low). 7 | uniform float bars[512]; 8 | 9 | uniform int bars_count; // number of bars (left + right) (configurable) 10 | 11 | uniform vec3 u_resolution; // window resolution, not used here 12 | 13 | //colors, configurable in cava config file 14 | uniform vec3 bg_color; // background color(r,g,b) (0.0 - 1.0), not used here 15 | uniform vec3 fg_color; // foreground color, not used here 16 | 17 | void main() 18 | { 19 | // find which bar to use based on where we are on the x axis 20 | int bar = int(bars_count * fragCoord.x); 21 | 22 | float bar_y = 1.0 - abs((fragCoord.y - 0.5)) * 2.0; 23 | float y = (bars[bar]) * bar_y; 24 | 25 | float bar_x = (fragCoord.x - float(bar) / float(bars_count)) * bars_count; 26 | float bar_r = 1.0 - abs((bar_x - 0.5)) * 2; 27 | 28 | bar_r = bar_r * bar_r * 2; 29 | 30 | // set color 31 | fragColor.r = fg_color.x * y * bar_r; 32 | fragColor.g = fg_color.y * y * bar_r; 33 | fragColor.b = fg_color.z * y * bar_r; 34 | } 35 | -------------------------------------------------------------------------------- /.config/cava/shaders/pass_through.vert: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | 4 | // Input vertex data, different for all executions of this shader. 5 | layout(location = 0) in vec3 vertexPosition_modelspace; 6 | 7 | // Output data ; will be interpolated for each fragment. 8 | out vec2 fragCoord; 9 | 10 | void main() 11 | { 12 | gl_Position = vec4(vertexPosition_modelspace,1); 13 | fragCoord = (vertexPosition_modelspace.xy+vec2(1,1))/2.0; 14 | } 15 | -------------------------------------------------------------------------------- /.config/cmus/.gitignore: -------------------------------------------------------------------------------- 1 | cache 2 | search-history 3 | command-history 4 | lib.pl 5 | -------------------------------------------------------------------------------- /.config/cmus/notify.cfg: -------------------------------------------------------------------------------- 1 | 2 | # possible data display values: 3 | # file, artist, album, duration, title, tracknumber, date 4 | # 5 | # other possible values: 6 | # nomarkup, covers, placeholder, dunst 7 | # 8 | # markup options: b, i, u -- meaning bold, italicized, underlined. 9 | # to use one or more, prepend to requested value with colon separator 10 | # e.g. b:artist iu:album ib:file 11 | 12 | artist covers:60:8 ib:title ib:duration 13 | -------------------------------------------------------------------------------- /.config/cmus/playlists/default: -------------------------------------------------------------------------------- 1 | /home/aeon/Music/seeingangelz/Lil Rae - Pick Me Up Then Let Me Fall.mp3 2 | /home/aeon/Music/seeingangelz/Lil Rae - Pick Me Up Then Let Me Fall.mp3 3 | /home/aeon/Music/seeingangelz/222pmb - Earth Angel Heaven Sent Shawty.mp3 4 | -------------------------------------------------------------------------------- /.config/dunst/dunstrc: -------------------------------------------------------------------------------- 1 | /home/aeon/.cache/wal/dunstrc -------------------------------------------------------------------------------- /.config/emacs/.gitignore: -------------------------------------------------------------------------------- 1 | .last-package-update-day 2 | ac-comphist.dat 3 | elpa 4 | recentf 5 | -------------------------------------------------------------------------------- /.config/emacs/bookmarks: -------------------------------------------------------------------------------- 1 | ;;;; Emacs Bookmark Format Version 1;;;; -*- coding: utf-8-emacs; mode: lisp-data -*- 2 | ;;; This format is meant to be slightly human-readable; 3 | ;;; nevertheless, you probably don't want to edit it. 4 | ;;; -*- End Of Bookmark File Format Version Stamp -*- 5 | (("EMACS" 6 | (filename . "~/Documents/dotfiles/.config/emacs/init.el") 7 | (front-context-string . "(setq inhibit-st") 8 | (rear-context-string) 9 | (position . 1)) 10 | ) 11 | -------------------------------------------------------------------------------- /.config/emacs/logo/unix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/emacs/logo/unix.png -------------------------------------------------------------------------------- /.config/firefox/chrome/includes/floating-panel.css: -------------------------------------------------------------------------------- 1 | #statuspanel #statuspanel-label { margin: 0 0 var(--uc-status-panel-spacing) var(--uc-status-panel-spacing) !important; } 2 | -------------------------------------------------------------------------------- /.config/firefox/chrome/includes/layout.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --toolbarbutton-border-radius: var(--uc-border-radius) !important; 3 | --tab-border-radius: var(--uc-border-radius) !important; 4 | --arrowpanel-border-radius: var(--uc-border-radius) !important; 5 | } 6 | 7 | #main-window, 8 | #toolbar-menubar, 9 | #TabsToolbar, 10 | #navigator-toolbox, 11 | #sidebar-box, 12 | #nav-bar { box-shadow: none !important; } 13 | 14 | #main-window, 15 | #toolbar-menubar, 16 | #TabsToolbar, 17 | #PersonalToolbar, 18 | #navigator-toolbox, 19 | #sidebar-box, 20 | #nav-bar { border: none !important; } 21 | 22 | /* remove "padding" left and right from tabs */ 23 | .titlebar-spacer { display: none !important; } 24 | 25 | /* fix Shield Icon padding */ 26 | #urlbar-input-container[pageproxystate="valid"] 27 | > #tracking-protection-icon-container 28 | > #tracking-protection-icon-box 29 | > #tracking-protection-icon { 30 | padding-bottom: 1px; 31 | } 32 | 33 | #PersonalToolbar { 34 | padding: 6px !important; 35 | box-shadow: inset 0 0 50vh rgba(0, 0, 0, var(--uc-darken-toolbar)) !important;; 36 | } 37 | 38 | #statuspanel #statuspanel-label { 39 | border: none !important; 40 | border-radius: var(--uc-border-radius) !important; 41 | } 42 | -------------------------------------------------------------------------------- /.config/firefox/chrome/includes/nav-bar.css: -------------------------------------------------------------------------------- 1 | #navigator-toolbox:not(:-moz-lwtheme) { background: var(--toolbar-field-background-color) !important; ) } 2 | 3 | #nav-bar { 4 | padding-block-start: 0px !important; 5 | border: none !important; 6 | box-shadow: none !important; 7 | background: transparent !important; 8 | } 9 | 10 | #urlbar, 11 | #urlbar * { 12 | padding-block-start: var(--uc-urlbar-top-spacing) !important; 13 | outline: none !important; 14 | box-shadow: none !important; 15 | } 16 | 17 | #urlbar-background { border: transparent !important; } 18 | 19 | #urlbar[focused='true'] 20 | > #urlbar-background, 21 | #urlbar:not([open]) 22 | > #urlbar-background { background: var(--toolbar-field-background-color) !important; } 23 | 24 | #urlbar[open] 25 | > #urlbar-background { background: var(--toolbar-field-background-color) !important; } 26 | 27 | .urlbarView-row:hover 28 | > .urlbarView-row-inner, 29 | .urlbarView-row[selected] 30 | > .urlbarView-row-inner { background: var(--toolbar-field-focus-background-color) !important; } 31 | 32 | .urlbar-icon, #urlbar-go-button { margin: auto; } 33 | 34 | .urlbar-page-action { padding: 0 inherit !important; } 35 | -------------------------------------------------------------------------------- /.config/firefox/chrome/includes/responsive-windows-fix.css: -------------------------------------------------------------------------------- 1 | @media (min-width: 1000px) { 2 | #nav-bar { margin: calc((var(--urlbar-min-height) * -1) - 12px) calc(100vw - var(--uc-urlbar-min-width)) 0 0 !important; } 3 | #titlebar { margin-inline-start: var(--uc-urlbar-min-width) !important; } 4 | #navigator-toolbox:focus-within #nav-bar { margin: calc((var(--urlbar-min-height) * -1) - 12px) calc(100vw - var(--uc-urlbar-max-width)) 0 0 !important; } 5 | #navigator-toolbox:focus-within #titlebar { margin-inline-start: var(--uc-urlbar-max-width) !important; } 6 | } 7 | -------------------------------------------------------------------------------- /.config/firefox/chrome/includes/responsive.css: -------------------------------------------------------------------------------- 1 | @media (min-width: 1000px) { 2 | #navigator-toolbox { display: flex; flex-wrap: wrap; } 3 | #nav-bar { 4 | order: var(--uc-urlbar-position); 5 | width: var(--uc-urlbar-min-width); 6 | } 7 | #nav-bar #urlbar-container { min-width: 0px !important; } 8 | #titlebar { 9 | order: 2; 10 | width: calc(100vw - var(--uc-urlbar-min-width) - 1px); 11 | } 12 | #PersonalToolbar { 13 | order: var(--uc-toolbar-position); 14 | width: 100%; 15 | } 16 | #navigator-toolbox:focus-within #nav-bar { width: var(--uc-urlbar-max-width); } 17 | #navigator-toolbox:focus-within #titlebar { width: calc(100vw - var(--uc-urlbar-max-width) - 1px); } 18 | } 19 | -------------------------------------------------------------------------------- /.config/firefox/chrome/userChrome.css: -------------------------------------------------------------------------------- 1 | @import 'includes/config.css'; 2 | 3 | @import 'includes/layout.css'; 4 | @import 'includes/responsive.css'; 5 | @import 'includes/floating-panel.css'; 6 | 7 | @import 'includes/nav-bar.css'; 8 | @import 'includes/tabs.css'; 9 | -------------------------------------------------------------------------------- /.config/firefox/search.json.mozlz4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/firefox/search.json.mozlz4 -------------------------------------------------------------------------------- /.config/flameshot/flameshot.ini: -------------------------------------------------------------------------------- 1 | /home/aeon/.cache/wal/flameshot.ini -------------------------------------------------------------------------------- /.config/kitty/colors-kitty.conf: -------------------------------------------------------------------------------- 1 | /home/aeon/.cache/wal/colors-kitty.conf -------------------------------------------------------------------------------- /.config/kitty/kitty.conf: -------------------------------------------------------------------------------- 1 | # Colors 2 | include colors-kitty.conf 3 | 4 | # Fonts 5 | font_family JetBrainsMono Nerd Font 6 | italic_font auto 7 | bold_font auto 8 | bold_italic_font auto 9 | font_size 9 10 | editor nvim 11 | adjust_line_height 0 12 | adjust_column_width 0 13 | box_drawing_scale 0.001, 1, 1.5, 2 14 | 15 | # URLs 16 | url_style double 17 | open_url_with default 18 | 19 | # Mouse 20 | click_interval 0.5 21 | mouse_hide_wait 0 22 | focus_follows_mouse no 23 | 24 | # Performance 25 | repaint_delay 10 26 | input_delay 2 27 | sync_to_monitor no 28 | 29 | # Window 30 | remember_window_size no 31 | initial_window_width 700 32 | initial_window_height 400 33 | window_border_width 0 34 | window_margin_width 5 35 | window_padding_width 0 36 | inactive_text_alpha 1.0 37 | background_opacity 0.83 38 | placement_strategy center 39 | hide_window_decorations no 40 | confirm_os_window_close 2 41 | -------------------------------------------------------------------------------- /.config/mpd/.gitignore: -------------------------------------------------------------------------------- 1 | state 2 | database 3 | mpd.db 4 | -------------------------------------------------------------------------------- /.config/mpd/mpd.conf: -------------------------------------------------------------------------------- 1 | # User's MPD configuration. 2 | 3 | bind_to_address "127.0.0.1" 4 | port "6600" 5 | 6 | auto_update "yes" 7 | restore_paused "yes" 8 | 9 | music_directory "~/Music/seeingangelz/" 10 | playlist_directory "~/.config/mpd/playlists" 11 | db_file "~/.config/mpd/mpd.db" 12 | log_file "syslog" 13 | pid_file "/tmp/mpd.pid" 14 | state_file "~/.config/mpd/mpd.state" 15 | 16 | log_level "notice" 17 | state_file_interval "30" 18 | 19 | replaygain "off" 20 | 21 | #resampler { 22 | # plugin "libsamplerate" 23 | # type "0" 24 | #} 25 | 26 | audio_output { 27 | type "pulse" 28 | name "PulseAudio" 29 | buffer_time "100000" 30 | } 31 | 32 | audio_output { 33 | type "fifo" 34 | name "Visualizer" 35 | format "44100:16:2" 36 | path "/tmp/mpd.fifo" 37 | } 38 | 39 | input { 40 | enabled "no" 41 | plugin "qobuz" 42 | } 43 | 44 | input { 45 | enabled "no" 46 | plugin "tidal" 47 | } 48 | 49 | decoder { 50 | enabled "no" 51 | plugin "wildmidi" 52 | } 53 | 54 | decoder { 55 | enabled "no" 56 | plugin "hybrid_dsd" 57 | } 58 | -------------------------------------------------------------------------------- /.config/mpd/mpd.state: -------------------------------------------------------------------------------- 1 | sw_volume: 70 2 | audio_device_state:1:PulseAudio 3 | audio_device_state:1:Visualizer 4 | state: play 5 | current: 0 6 | time: 18.977000 7 | random: 1 8 | repeat: 0 9 | single: 0 10 | consume: 0 11 | crossfade: 0 12 | mixrampdb: 0.000000 13 | mixrampdelay: -1.000000 14 | playlist_begin 15 | 0:biteki, kais - all over again.mp3 16 | playlist_end 17 | -------------------------------------------------------------------------------- /.config/mpv/input.conf: -------------------------------------------------------------------------------- 1 | # Increase and decrease volume 2 | UP add volume +2 3 | DOWN add volume -2 4 | -------------------------------------------------------------------------------- /.config/mpv/mpv.conf: -------------------------------------------------------------------------------- 1 | hwdec=vaapi 2 | volume = 50 3 | osc=no 4 | -------------------------------------------------------------------------------- /.config/ncmpcpp/.gitignore: -------------------------------------------------------------------------------- 1 | error.log 2 | lyrics/ 3 | -------------------------------------------------------------------------------- /.config/ncmpcpp/config: -------------------------------------------------------------------------------- 1 | # User's ncmpcpp main configuration. 2 | 3 | # MPD 4 | # --- 5 | mpd_host = "127.0.0.1" 6 | mpd_port = "6600" 7 | mpd_crossfade_time = "2" 8 | 9 | # VISUALIZER 10 | # --- 11 | visualizer_data_source = "/tmp/mpd.fifo" 12 | visualizer_output_name = "Visualizer" 13 | visualizer_in_stereo = "yes" 14 | visualizer_fps = "60" 15 | visualizer_type = "ellipse" 16 | visualizer_look = "●●" 17 | visualizer_spectrum_smooth_look = "yes" 18 | 19 | # GENERAL 20 | # --- 21 | lyrics_directory = "~/.config/ncmpcpp/lyrics" 22 | connected_message_on_startup = "yes" 23 | cyclic_scrolling = "yes" 24 | mouse_support = "yes" 25 | mouse_list_scroll_whole_page = "yes" 26 | lines_scrolled = "1" 27 | message_delay_time = "1" 28 | playlist_shorten_total_times = "yes" 29 | playlist_display_mode = "columns" 30 | browser_display_mode = "columns" 31 | search_engine_display_mode = "columns" 32 | playlist_editor_display_mode = "columns" 33 | autocenter_mode = "yes" 34 | centered_cursor = "yes" 35 | user_interface = "alternative" 36 | follow_now_playing_lyrics = "yes" 37 | locked_screen_width_part = "50" 38 | ask_for_locked_screen_width_part = "yes" 39 | display_bitrate = "no" 40 | external_editor = "nvim" 41 | main_window_color = "default" 42 | startup_screen = "browser" 43 | screen_switcher_mode = playlist, visualizer 44 | 45 | # PROGRESS BAR 46 | # --- 47 | #progressbar_look = "━━━" 48 | progressbar_look = "▃▃▃" 49 | progressbar_elapsed_color = "5" 50 | progressbar_color = "black" 51 | 52 | # UI VISIBILITY 53 | # --- 54 | header_visibility = "no" 55 | statusbar_visibility = "yes" 56 | titles_visibility = "yes" 57 | enable_window_title = "yes" 58 | 59 | # UI APPEARANCE 60 | # --- 61 | now_playing_prefix = "$b$2$7 " 62 | now_playing_suffix = " $/b$8" 63 | current_item_prefix = "$b$7$/b$3 " 64 | current_item_suffix = " $8" 65 | 66 | song_columns_list_format = "(50)[]{t|fr:Title} (0)[magenta]{a}" 67 | 68 | song_list_format = " {%t $R  $8%a$8}|{%f $R  $8%l$8} $8" 69 | 70 | song_status_format = "$b$6$7[$8      $7]$6 $2 $7{$8 %b }|{$8 %t }|{$8 %f }$7 $8" 71 | 72 | song_window_title_format = {%a - }{%t}|{%f} 73 | 74 | execute_on_song_change = mpdnotify info 75 | -------------------------------------------------------------------------------- /.config/nvim/.gitignore: -------------------------------------------------------------------------------- 1 | plugin 2 | -------------------------------------------------------------------------------- /.config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | require "aeon.options" 2 | require "aeon.keymaps" 3 | require "aeon.plugins" 4 | require "aeon.transparent" 5 | require "aeon.colorscheme" 6 | require "aeon.cmp" 7 | require "aeon.gitsigns" 8 | require "aeon.telescope" 9 | require "aeon.lualine" 10 | require "aeon.colorizer" 11 | require "aeon.treesitter" 12 | require "aeon.autopairs" 13 | require "aeon.bufferline" 14 | require "aeon.nvim-tree" 15 | require "aeon.toggleterm" 16 | require "aeon.alpha" 17 | require "aeon.lsp_config" 18 | -------------------------------------------------------------------------------- /.config/nvim/lua/aeon/alpha.lua: -------------------------------------------------------------------------------- 1 | local status_ok, alpha = pcall(require, "alpha") 2 | if not status_ok then 3 | return 4 | end 5 | 6 | local dashboard = require("alpha.themes.dashboard") 7 | dashboard.section.header.val = { 8 | [[ ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣭⣿⣶⣿⣦⣼⣆ ]], 9 | [[ ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ]], 10 | [[ ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ]], 11 | [[ ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ]], 12 | [[ ⢠⣿⣿⣿⠈ ⠡⠌⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ]], 13 | [[ ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘⠄ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ]], 14 | [[ ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ]], 15 | [[ ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ]], 16 | [[ ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ]], 17 | [[ ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ]], 18 | [[ ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ]], 19 | } 20 | 21 | dashboard.section.buttons.val = { 22 | dashboard.button("f", "󰈞 Find file", ":Telescope find_files "), 23 | dashboard.button("e", " New file", ":ene startinsert "), 24 | dashboard.button("r", " Recently used files", ":Telescope oldfiles "), 25 | dashboard.button("t", " Find text", ":Telescope live_grep "), 26 | dashboard.button("p", " Plugins", ":e ~/.config/nvim/lua/aeon/plugins.lua "), 27 | dashboard.button("c", " Configuration", ":e ~/.config/nvim/lua/aeon/options.lua "), 28 | dashboard.button("q", "󰿅 Quit Neovim", ":qa"), 29 | } 30 | 31 | local function footer() 32 | -- NOTE: requires the fortune-mod package to work 33 | -- local handle = io.popen("fortune") 34 | -- local fortune = handle:read("*a") 35 | -- handle:close() 36 | -- return fortune 37 | return "github.com/seeingangelz" 38 | end 39 | 40 | dashboard.section.footer.val = footer() 41 | 42 | dashboard.section.footer.opts.hl = "Type" 43 | dashboard.section.header.opts.hl = "Include" 44 | dashboard.section.buttons.opts.hl = "Keyword" 45 | 46 | dashboard.opts.opts.noautocmd = true 47 | -- vim.cmd([[autocmd User AlphaReady echo 'ready']]) 48 | alpha.setup(dashboard.opts) 49 | -------------------------------------------------------------------------------- /.config/nvim/lua/aeon/autopairs.lua: -------------------------------------------------------------------------------- 1 | local status_ok, npairs = pcall(require, "nvim-autopairs") 2 | if not status_ok then 3 | return 4 | end 5 | 6 | npairs.setup { 7 | check_ts = true, 8 | ts_config = { 9 | lua = { "string", "source" }, 10 | javascript = { "string", "template_string" }, 11 | java = false, 12 | }, 13 | disable_filetype = { "TelescopePrompt", "spectre_panel" }, 14 | fast_wrap = { 15 | map = "", 16 | chars = { "{", "[", "(", '"', "'" }, 17 | pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""), 18 | offset = 0, -- Offset from pattern match 19 | end_key = "$", 20 | keys = "qwertyuiopzxcvbnmasdfghjkl", 21 | check_comma = true, 22 | highlight = "PmenuSel", 23 | highlight_grey = "LineNr", 24 | }, 25 | } 26 | 27 | local cmp_autopairs = require "nvim-autopairs.completion.cmp" 28 | local cmp_status_ok, cmp = pcall(require, "cmp") 29 | if not cmp_status_ok then 30 | return 31 | end 32 | cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done { map_char = { tex = "" } }) 33 | -------------------------------------------------------------------------------- /.config/nvim/lua/aeon/colorizer.lua: -------------------------------------------------------------------------------- 1 | local status_ok, colorizer = pcall(require, "colorizer") 2 | if not status_ok then 3 | return 4 | end 5 | 6 | colorizer.setup { 7 | } 8 | -------------------------------------------------------------------------------- /.config/nvim/lua/aeon/colorscheme.lua: -------------------------------------------------------------------------------- 1 | vim.cmd [[ 2 | try 3 | colorscheme pywal 4 | catch /^Vim\%((\a\+)\)\=:E185/ 5 | colorscheme default 6 | set background=dark 7 | endtry 8 | ]] 9 | -------------------------------------------------------------------------------- /.config/nvim/lua/aeon/gitsigns.lua: -------------------------------------------------------------------------------- 1 | local status_ok, gitsigns = pcall(require, "gitsigns") 2 | if not status_ok then 3 | return 4 | end 5 | 6 | gitsigns.setup { 7 | signs = { 8 | add = { hl = "GitSignsAdd", text = "▎", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" }, 9 | change = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" }, 10 | delete = { hl = "GitSignsDelete", text = "▎", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, 11 | topdelete = { hl = "GitSignsDelete", text = "▎", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, 12 | changedelete = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" }, 13 | }, 14 | signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` 15 | numhl = false, -- Toggle with `:Gitsigns toggle_numhl` 16 | linehl = false, -- Toggle with `:Gitsigns toggle_linehl` 17 | word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` 18 | watch_gitdir = { 19 | interval = 1000, 20 | follow_files = true, 21 | }, 22 | attach_to_untracked = true, 23 | current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` 24 | current_line_blame_opts = { 25 | virt_text = true, 26 | virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align' 27 | delay = 1000, 28 | ignore_whitespace = false, 29 | }, 30 | current_line_blame_formatter_opts = { 31 | relative_time = false, 32 | }, 33 | sign_priority = 6, 34 | update_debounce = 100, 35 | status_formatter = nil, -- Use default 36 | max_file_length = 40000, 37 | preview_config = { 38 | -- Options passed to nvim_open_win 39 | border = "single", 40 | style = "minimal", 41 | relative = "cursor", 42 | row = 0, 43 | col = 1, 44 | }, 45 | yadm = { 46 | enable = false, 47 | }, 48 | } 49 | -------------------------------------------------------------------------------- /.config/nvim/lua/aeon/keymaps.lua: -------------------------------------------------------------------------------- 1 | local opts = { noremap = true, silent = true } 2 | local term_opts = { silent = true } 3 | local keymap = vim.api.nvim_set_keymap 4 | 5 | keymap("", "", "", opts) 6 | vim.g.mapleader = " " 7 | vim.g.maplocalleader = " " 8 | 9 | -- Modes 10 | -- normal_mode = "n", 11 | -- insert_mode = "i", 12 | -- visual_mode = "v", 13 | -- visual_block_mode = "x", 14 | -- term_mode = "t", 15 | -- command_mode = "c", 16 | 17 | -- Normal -- 18 | -- Better window navigation 19 | keymap("n", "", "h", opts) 20 | keymap("n", "", "j", opts) 21 | keymap("n", "", "k", opts) 22 | keymap("n", "", "l", opts) 23 | 24 | -- Resize with arrows 25 | keymap("n", "", ":resize -2", opts) 26 | keymap("n", "", ":resize +2", opts) 27 | keymap("n", "", ":vertical resize -2", opts) 28 | keymap("n", "", ":vertical resize +2", opts) 29 | 30 | -- Navigate buffers 31 | keymap("n", "", ":bnext", opts) 32 | keymap("n", "", ":bprevious", opts) 33 | 34 | -- Visual -- 35 | -- Stay in indent mode 36 | keymap("v", "<", "", ">gv", opts) 38 | keymap("v", "p", '"_dP', opts) 39 | 40 | -- Telescope 41 | keymap("n", "f", "Telescope find_files", opts) 42 | keymap("n", "", "Telescope live_grep", opts) 43 | 44 | -- Gitsigns 45 | keymap("n", "", "Gitsigns preview_hunk", opts) 46 | 47 | -- NvimTree 48 | keymap("n", "", ":NvimTreeToggle", opts) 49 | -------------------------------------------------------------------------------- /.config/nvim/lua/aeon/lsp_config.lua: -------------------------------------------------------------------------------- 1 | local status_ok, mason = pcall(require, "mason") 2 | if not status_ok then 3 | return 4 | end 5 | 6 | local status_ok, mason_lspconfig = pcall(require, "mason-lspconfig") 7 | if not status_ok then 8 | return 9 | end 10 | 11 | local status_ok, lspconfig = pcall(require, "lspconfig") 12 | if not status_ok then 13 | return 14 | end 15 | 16 | mason.setup() 17 | mason_lspconfig.setup({ 18 | ensure_installed = { "lua_ls", 19 | "clangd", 20 | "pyright", 21 | "gopls", 22 | "cssls", 23 | "html", 24 | "bashls" 25 | } 26 | }) 27 | 28 | lspconfig.lua_ls.setup {} 29 | lspconfig.clangd.setup {} 30 | lspconfig.pyright.setup {} 31 | lspconfig.gopls.setup {} 32 | lspconfig.cssls.setup {} 33 | lspconfig.html.setup {} 34 | lspconfig.bashls.setup {} 35 | -------------------------------------------------------------------------------- /.config/nvim/lua/aeon/lualine.lua: -------------------------------------------------------------------------------- 1 | local status_ok, lualine = pcall(require, "lualine") 2 | if not status_ok then 3 | return 4 | end 5 | 6 | local hide_in_width = function() 7 | return vim.fn.winwidth(0) > 80 8 | end 9 | 10 | local diagnostics = { 11 | "diagnostics", 12 | sources = { "nvim_diagnostic" }, 13 | sections = { "error", "warn" }, 14 | symbols = { error = " ", warn = " " }, 15 | colored = false, 16 | update_in_insert = false, 17 | always_visible = true, 18 | } 19 | 20 | local diff = { 21 | "diff", 22 | colored = false, 23 | symbols = { added = " ", modified = " ", removed = " " }, -- changes diff symbols 24 | cond = hide_in_width 25 | } 26 | 27 | local mode = { 28 | "mode", 29 | fmt = function(str) 30 | return "-- " .. str .. " --" 31 | end, 32 | } 33 | 34 | local filetype = { 35 | "filetype", 36 | icons_enabled = false, 37 | icon = nil, 38 | } 39 | 40 | local branch = { 41 | "branch", 42 | icons_enabled = true, 43 | icon = "", 44 | } 45 | 46 | local location = { 47 | "location", 48 | padding = 0, 49 | } 50 | 51 | -- cool function for progress 52 | local progress = function() 53 | local current_line = vim.fn.line(".") 54 | local total_lines = vim.fn.line("$") 55 | local chars = { "__", "▁▁", "▂▂", "▃▃", "▄▄", "▅▅", "▆▆", "▇▇", "██" } 56 | local line_ratio = current_line / total_lines 57 | local index = math.ceil(line_ratio * #chars) 58 | return chars[index] 59 | end 60 | 61 | local spaces = function() 62 | return "spaces: " .. vim.api.nvim_buf_get_option(0, "shiftwidth") 63 | end 64 | 65 | lualine.setup({ 66 | options = { 67 | icons_enabled = true, 68 | theme = "auto", 69 | component_separators = { left = "", right = "" }, 70 | section_separators = { left = "", right = "" }, 71 | disabled_filetypes = { "alpha", "dashboard", "NvimTree", "Outline" }, 72 | always_divide_middle = true, 73 | }, 74 | sections = { 75 | lualine_a = { branch, diagnostics }, 76 | lualine_b = { mode }, 77 | lualine_c = {}, 78 | -- lualine_x = { "encoding", "fileformat", "filetype" }, 79 | lualine_x = { diff, spaces, "encoding", filetype }, 80 | lualine_y = { location }, 81 | lualine_z = { progress }, 82 | }, 83 | inactive_sections = { 84 | lualine_a = {}, 85 | lualine_b = {}, 86 | lualine_c = { "filename" }, 87 | lualine_x = { "location" }, 88 | lualine_y = {}, 89 | lualine_z = {}, 90 | }, 91 | tabline = {}, 92 | extensions = {}, 93 | }) 94 | -------------------------------------------------------------------------------- /.config/nvim/lua/aeon/nvim-tree.lua: -------------------------------------------------------------------------------- 1 | local status_ok, nvim_tree = pcall(require, "nvim-tree") 2 | if not status_ok then 3 | return 4 | end 5 | 6 | local config_status_ok, nvim_tree_config = pcall(require, "nvim-tree.config") 7 | if not config_status_ok then 8 | return 9 | end 10 | 11 | local function my_on_attach(bufnr) 12 | local api = require "nvim-tree.api" 13 | 14 | local function opts(desc) 15 | return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } 16 | end 17 | 18 | api.config.mappings.default_on_attach(bufnr) 19 | 20 | vim.keymap.set("n", "l", api.node.open.edit, opts "Open") 21 | vim.keymap.set("n", "h", api.node.navigate.parent_close, opts "Close Directory") 22 | vim.keymap.set("n", "v", api.node.open.vertical, opts "Open: Vertical Split") 23 | vim.keymap.del("n", "", { buffer = bufnr }) 24 | end 25 | 26 | require("nvim-tree").setup({ 27 | on_attach = on_attach, 28 | }) 29 | -------------------------------------------------------------------------------- /.config/nvim/lua/aeon/options.lua: -------------------------------------------------------------------------------- 1 | vim.opt.backup = false 2 | vim.opt.clipboard = "unnamedplus" 3 | vim.opt.cmdheight = 2 4 | vim.opt.completeopt = { "menuone", "noselect" } 5 | vim.opt.conceallevel = 0 6 | vim.opt.fileencoding = "utf-8" 7 | vim.opt.hlsearch = true 8 | vim.opt.ignorecase = true 9 | vim.opt.mouse = "a" 10 | vim.opt.pumheight = 10 11 | vim.opt.showtabline = 2 12 | vim.opt.showmode = false 13 | vim.opt.smartcase = true 14 | vim.opt.smartindent = true 15 | vim.opt.splitbelow = true 16 | vim.opt.splitright = true 17 | vim.opt.swapfile = false 18 | vim.opt.termguicolors = true 19 | vim.opt.timeoutlen = 1000 20 | vim.opt.undofile = true 21 | vim.opt.updatetime = 300 22 | vim.opt.writebackup = false 23 | vim.opt.expandtab = true 24 | vim.opt.shiftwidth = 4 25 | vim.opt.tabstop = 4 26 | vim.opt.cursorline = true 27 | vim.opt.cmdheight = 1 28 | vim.opt.number = true 29 | vim.opt.list = true 30 | vim.opt.relativenumber = false 31 | vim.opt.signcolumn = "yes" 32 | vim.opt.numberwidth = 4 33 | vim.opt.wrap = false 34 | vim.opt.scrolloff = 4 35 | vim.opt.sidescrolloff = 4 36 | vim.opt.guifont = "JetBrainsMono Nerd Font:h18" 37 | 38 | -- remove the "How-to disable mouse" 39 | vim.cmd.aunmenu("PopUp.How-to\\ disable\\ mouse") 40 | vim.cmd.aunmenu("PopUp.-1-") 41 | 42 | -- don't auto commenting new lines 43 | vim.api.nvim_create_autocmd('BufEnter', { 44 | pattern = '', 45 | command = 'set fo-=c fo-=r fo-=o' 46 | }) 47 | -------------------------------------------------------------------------------- /.config/nvim/lua/aeon/toggleterm.lua: -------------------------------------------------------------------------------- 1 | local status_ok, toggleterm = pcall(require, "toggleterm") 2 | if not status_ok then 3 | return 4 | end 5 | 6 | toggleterm.setup({ 7 | size = 20, 8 | open_mapping = [[]], 9 | hide_numbers = true, 10 | shade_filetypes = {}, 11 | shade_terminals = true, 12 | shading_factor = 2, 13 | start_in_insert = true, 14 | insert_mappings = true, 15 | persist_size = true, 16 | direction = "float", 17 | close_on_exit = true, 18 | shell = vim.o.shell, 19 | float_opts = { 20 | border = "curved", 21 | winblend = 0, 22 | highlights = { 23 | border = "Normal", 24 | background = "Normal", 25 | }, 26 | }, 27 | }) 28 | 29 | function _G.set_terminal_keymaps() 30 | local opts = {noremap = true} 31 | vim.api.nvim_buf_set_keymap(0, 't', '', [[]], opts) 32 | vim.api.nvim_buf_set_keymap(0, 't', 'jk', [[]], opts) 33 | vim.api.nvim_buf_set_keymap(0, 't', '', [[h]], opts) 34 | vim.api.nvim_buf_set_keymap(0, 't', '', [[j]], opts) 35 | vim.api.nvim_buf_set_keymap(0, 't', '', [[k]], opts) 36 | vim.api.nvim_buf_set_keymap(0, 't', '', [[l]], opts) 37 | end 38 | 39 | vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()') 40 | 41 | local Terminal = require("toggleterm.terminal").Terminal 42 | local lazygit = Terminal:new({ cmd = "lazygit", hidden = true }) 43 | 44 | function _LAZYGIT_TOGGLE() 45 | lazygit:toggle() 46 | end 47 | 48 | local node = Terminal:new({ cmd = "node", hidden = true }) 49 | 50 | function _NODE_TOGGLE() 51 | node:toggle() 52 | end 53 | 54 | local ncdu = Terminal:new({ cmd = "ncdu", hidden = true }) 55 | 56 | function _NCDU_TOGGLE() 57 | ncdu:toggle() 58 | end 59 | 60 | local htop = Terminal:new({ cmd = "htop", hidden = true }) 61 | 62 | function _HTOP_TOGGLE() 63 | htop:toggle() 64 | end 65 | 66 | local python = Terminal:new({ cmd = "python", hidden = true }) 67 | 68 | function _PYTHON_TOGGLE() 69 | python:toggle() 70 | end 71 | -------------------------------------------------------------------------------- /.config/nvim/lua/aeon/transparent.lua: -------------------------------------------------------------------------------- 1 | local status_ok, transparent = pcall(require, "transparent") 2 | if not status_ok then 3 | return 4 | end 5 | 6 | transparent.setup({ 7 | groups = { -- table: default groups 8 | 'Normal', 'NormalNC', 'Comment', 'Constant', 'Special', 'Identifier', 9 | 'Statement', 'PreProc', 'Type', 'Underlined', 'Todo', 'String', 'Function', 10 | 'Conditional', 'Repeat', 'Operator', 'Structure', 'LineNr', 'NonText', 11 | 'SignColumn', 'CursorLineNr', 'EndOfBuffer', 12 | }, 13 | extra_groups = { 14 | "NormalFloat", 15 | "BufferLineBufferSelected", 16 | "BufferLineDevIconLuaSelected", 17 | "BufferLineDevIconLuaInactive", 18 | "BufferLineTabClose", 19 | "BufferLineBuffer", 20 | "BufferLineInfo", 21 | "BufferLineHint", 22 | "BufferLineFill", 23 | "BufferLineBufferSelected", 24 | "BufferLineCloseButton", 25 | "BufferLineCloseButtonSelected", 26 | "BufferLineCloseButtonVisible", 27 | "BufferLineGroupLabel", 28 | "BufferLineGroupSeparator", 29 | "BufferLineBackground", 30 | "NvimTreeNormal", 31 | "NvimTreeNormalNC", 32 | "NvimTreeNormalFloat", 33 | "NvimTreeEndOfBuffer", 34 | "NvimTreeFolderIcon", 35 | "lualine_c_terminal", 36 | "lualine_b_terminal", 37 | "lualine_b_inactive", 38 | "lualine_a_terminal", 39 | "lualine_a_inactive", 40 | "lualine_c_replace", 41 | "lualine_c_command", 42 | "lualine_b_replace", 43 | "lualine", 44 | "CursorLine", 45 | "IndentBlankLineChar", 46 | "lualine_c_visual", 47 | "lualine_c_normal", 48 | "lualine_c_insert", 49 | "lualine_b_visual", 50 | "lualine_b_normal", 51 | "lualine_b_insert", 52 | "TelescopeNormal", 53 | "TelescopeResultsLineNr", 54 | "TelescopeResultsBorder", 55 | "TelescopePreviewBorder", 56 | "TelescopePromptBorder", 57 | "TelescopeBorder", 58 | "NvimComma", 59 | "NvimInvalidComma", 60 | "MsgArea", 61 | "FloatBorder", 62 | "CmpItemAbbr", 63 | "CmpItemKind", 64 | "CmpItemMenu", 65 | "CmpItemAbbrMatch", 66 | }, -- table: additional groups that should be cleared 67 | exclude_groups = {}, -- table: groups you don't want to clear 68 | }) 69 | 70 | vim.api.nvim_create_autocmd("VimEnter", { 71 | callback = function() 72 | vim.cmd(":TransparentEnable") 73 | end, 74 | }) 75 | -------------------------------------------------------------------------------- /.config/nvim/lua/aeon/treesitter.lua: -------------------------------------------------------------------------------- 1 | local status_ok, treesitter = pcall(require, "treesitter") 2 | if not status_ok then 3 | return 4 | end 5 | 6 | treesitter.setup { 7 | ensure_installed = { "c", "lua", "python", "html", "css", "javascript" }, 8 | sync_install = false, 9 | auto_install = true, 10 | highlight = { 11 | enable = true, 12 | additional_vim_regex_highlighting = false, 13 | }, 14 | indent = { enable = true, disable = { "yaml" } }, 15 | } 16 | -------------------------------------------------------------------------------- /.config/qutebrowser/autoconfig.yml: -------------------------------------------------------------------------------- 1 | # If a config.py file exists, this file is ignored unless it's explicitly loaded 2 | # via config.load_autoconfig(). For more information, see: 3 | # https://github.com/qutebrowser/qutebrowser/blob/master/doc/help/configuring.asciidoc#loading-autoconfigyml 4 | # DO NOT edit this file by hand, qutebrowser will overwrite it. 5 | # Instead, create a config.py - see :help for details. 6 | 7 | config_version: 2 8 | settings: 9 | content.notifications.enabled: 10 | https://www.reddit.com: false 11 | statusbar.show: 12 | global: never 13 | tabs.show: 14 | global: never 15 | -------------------------------------------------------------------------------- /.config/qutebrowser/bookmarks/urls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/qutebrowser/bookmarks/urls -------------------------------------------------------------------------------- /.config/qutebrowser/pywalQute/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/qutebrowser/pywalQute/__init__.py -------------------------------------------------------------------------------- /.config/qutebrowser/pywalQute/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/qutebrowser/pywalQute/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /.config/qutebrowser/pywalQute/__pycache__/__init__.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/qutebrowser/pywalQute/__pycache__/__init__.cpython-311.pyc -------------------------------------------------------------------------------- /.config/qutebrowser/pywalQute/__pycache__/draw.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/qutebrowser/pywalQute/__pycache__/draw.cpython-310.pyc -------------------------------------------------------------------------------- /.config/qutebrowser/pywalQute/__pycache__/draw.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/qutebrowser/pywalQute/__pycache__/draw.cpython-311.pyc -------------------------------------------------------------------------------- /.config/qutebrowser/quickmarks: -------------------------------------------------------------------------------- 1 | gh https://github.com/seeingangelz 2 | 4g https://boards.4channel.org/g/ 3 | yt https://www.youtube.com/ 4 | suck https://suckless.org/ 5 | os https://wiki.osdev.org/Expanded_Main_Page 6 | un https://reddit.femboy.hu/r/unixporn 7 | lm https://reddit.femboy.hu/r/linuxmemes 8 | -------------------------------------------------------------------------------- /.config/ranger/.gitignore: -------------------------------------------------------------------------------- 1 | plugins/__pycache__/ 2 | plugins/ranger_devicons/__pycache__/ 3 | -------------------------------------------------------------------------------- /.config/ranger/plugins/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/ranger/plugins/__init__.py -------------------------------------------------------------------------------- /.config/ranger/plugins/ranger_devicons/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | import ranger.api 3 | from ranger.core.linemode import LinemodeBase 4 | from .devicons import * 5 | 6 | SEPARATOR = os.getenv('RANGER_DEVICONS_SEPARATOR', ' ') 7 | 8 | @ranger.api.register_linemode 9 | class DevIconsLinemode(LinemodeBase): 10 | name = "devicons" 11 | 12 | uses_metadata = False 13 | 14 | def filetitle(self, file, metadata): 15 | return devicon(file) + SEPARATOR + file.relative_path 16 | -------------------------------------------------------------------------------- /.config/suckless/dmenu/Makefile: -------------------------------------------------------------------------------- 1 | # dmenu - dynamic menu 2 | # See LICENSE file for copyright and license details. 3 | 4 | include config.mk 5 | 6 | SRC = drw.c dmenu.c stest.c util.c 7 | OBJ = $(SRC:.c=.o) 8 | 9 | all: options dmenu stest 10 | 11 | options: 12 | @echo dmenu build options: 13 | @echo "CFLAGS = $(CFLAGS)" 14 | @echo "LDFLAGS = $(LDFLAGS)" 15 | @echo "CC = $(CC)" 16 | 17 | .c.o: 18 | $(CC) -c $(CFLAGS) $< 19 | 20 | config.h: 21 | cp config.def.h $@ 22 | 23 | $(OBJ): arg.h config.h config.mk drw.h 24 | 25 | dmenu: dmenu.o drw.o util.o 26 | $(CC) -o $@ dmenu.o drw.o util.o $(LDFLAGS) 27 | 28 | stest: stest.o 29 | $(CC) -o $@ stest.o $(LDFLAGS) 30 | 31 | clean: 32 | rm -f dmenu stest $(OBJ) dmenu-$(VERSION).tar.gz *.orig *.rej config.h 33 | 34 | dist: clean 35 | mkdir -p dmenu-$(VERSION) 36 | cp LICENSE Makefile README arg.h config.def.h config.mk dmenu.1\ 37 | drw.h util.h dmenu_path dmenu_run stest.1 $(SRC)\ 38 | dmenu-$(VERSION) 39 | tar -cf dmenu-$(VERSION).tar dmenu-$(VERSION) 40 | gzip dmenu-$(VERSION).tar 41 | rm -rf dmenu-$(VERSION) 42 | 43 | install: all 44 | mkdir -p $(DESTDIR)$(PREFIX)/bin 45 | cp -f dmenu dmenu_path dmenu_run stest $(DESTDIR)$(PREFIX)/bin 46 | chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu 47 | chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_path 48 | chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run 49 | chmod 755 $(DESTDIR)$(PREFIX)/bin/stest 50 | mkdir -p $(DESTDIR)$(MANPREFIX)/man1 51 | sed "s/VERSION/$(VERSION)/g" < dmenu.1 > $(DESTDIR)$(MANPREFIX)/man1/dmenu.1 52 | sed "s/VERSION/$(VERSION)/g" < stest.1 > $(DESTDIR)$(MANPREFIX)/man1/stest.1 53 | chmod 644 $(DESTDIR)$(MANPREFIX)/man1/dmenu.1 54 | chmod 644 $(DESTDIR)$(MANPREFIX)/man1/stest.1 55 | rm config.h *.o 56 | 57 | uninstall: 58 | rm -f $(DESTDIR)$(PREFIX)/bin/dmenu\ 59 | $(DESTDIR)$(PREFIX)/bin/dmenu_path\ 60 | $(DESTDIR)$(PREFIX)/bin/dmenu_run\ 61 | $(DESTDIR)$(PREFIX)/bin/stest\ 62 | $(DESTDIR)$(MANPREFIX)/man1/dmenu.1\ 63 | $(DESTDIR)$(MANPREFIX)/man1/stest.1 64 | 65 | .PHONY: all options clean dist install uninstall 66 | -------------------------------------------------------------------------------- /.config/suckless/dmenu/arg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copy me if you can. 3 | * by 20h 4 | */ 5 | 6 | #ifndef ARG_H__ 7 | #define ARG_H__ 8 | 9 | extern char *argv0; 10 | 11 | /* use main(int argc, char *argv[]) */ 12 | #define ARGBEGIN for (argv0 = *argv, argv++, argc--;\ 13 | argv[0] && argv[0][0] == '-'\ 14 | && argv[0][1];\ 15 | argc--, argv++) {\ 16 | char argc_;\ 17 | char **argv_;\ 18 | int brk_;\ 19 | if (argv[0][1] == '-' && argv[0][2] == '\0') {\ 20 | argv++;\ 21 | argc--;\ 22 | break;\ 23 | }\ 24 | for (brk_ = 0, argv[0]++, argv_ = argv;\ 25 | argv[0][0] && !brk_;\ 26 | argv[0]++) {\ 27 | if (argv_ != argv)\ 28 | break;\ 29 | argc_ = argv[0][0];\ 30 | switch (argc_) 31 | 32 | #define ARGEND }\ 33 | } 34 | 35 | #define ARGC() argc_ 36 | 37 | #define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\ 38 | ((x), abort(), (char *)0) :\ 39 | (brk_ = 1, (argv[0][1] != '\0')?\ 40 | (&argv[0][1]) :\ 41 | (argc--, argv++, argv[0]))) 42 | 43 | #define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\ 44 | (char *)0 :\ 45 | (brk_ = 1, (argv[0][1] != '\0')?\ 46 | (&argv[0][1]) :\ 47 | (argc--, argv++, argv[0]))) 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /.config/suckless/dmenu/config.def.h: -------------------------------------------------------------------------------- 1 | static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ 2 | static int fuzzy = 1; /* -F option; if 0, dmenu doesn't use fuzzy matching */ 3 | static int centered = 1; /* -c option; centers dmenu on screen */ 4 | static int colorprompt = 1; /* -p option; if 1, prompt uses SchemeSel, otherwise SchemeNorm */ 5 | static int min_width = 350; /* minimum width when centered */ 6 | static const unsigned int bgalpha = 0xd0; 7 | static const unsigned int fgalpha = OPAQUE; 8 | 9 | /* -fn option overrides fonts[0]; default X11 font or font set */ 10 | static const char *fonts[] = { 11 | "JetBrainsMono Nerd Font:style=Bold:size=10:antialias=true:autohint=true", 12 | "NotoColorEmoji:pixelsize=8:antialias=true:autohint=true"}; 13 | 14 | static const char *prompt = 15 | NULL; /* -p option; prompt to the left of input field */ 16 | static const char *colors[SchemeLast][2] = { 17 | /* fg bg */ 18 | [SchemeNorm] = {"#bbbbbb", "#222222"}, 19 | [SchemeSel] = {"#eeeeee", "#005577"}, 20 | [SchemeSelHighlight] = {"#ffffff", "#222222"}, 21 | [SchemeNormHighlight] = {"#ffffff", "#222222"}, 22 | [SchemeOut] = {"#000000", "#00ffff"}, 23 | }; 24 | static const unsigned int alphas[SchemeLast][2] = { 25 | /* fgalpha bgalpha */ 26 | [SchemeNorm] = {fgalpha, bgalpha}, 27 | [SchemeSel] = {fgalpha, bgalpha}, 28 | [SchemeSelHighlight] = {fgalpha, bgalpha}, 29 | [SchemeNormHighlight] = {fgalpha, bgalpha}, 30 | [SchemeOut] = {fgalpha, bgalpha}, 31 | }; 32 | 33 | /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ 34 | static unsigned int lines = 0; 35 | 36 | /* 37 | * Characters not considered part of a word while deleting words 38 | * for example: " /?\"&[]" 39 | */ 40 | static const char worddelimiters[] = " "; 41 | 42 | /* Size of the window border */ 43 | static const unsigned int border_width = 2; 44 | -------------------------------------------------------------------------------- /.config/suckless/dmenu/config.mk: -------------------------------------------------------------------------------- 1 | # dmenu version 2 | VERSION = 5.0 3 | 4 | # paths 5 | PREFIX = /usr/local 6 | MANPREFIX = $(PREFIX)/share/man 7 | 8 | X11INC = /usr/X11R6/include 9 | X11LIB = /usr/X11R6/lib 10 | 11 | # Xinerama, comment if you don't want it 12 | XINERAMALIBS = -lXinerama 13 | XINERAMAFLAGS = -DXINERAMA 14 | 15 | # freetype 16 | FREETYPELIBS = -lfontconfig -lXft 17 | FREETYPEINC = /usr/include/freetype2 18 | # OpenBSD (uncomment) 19 | #FREETYPEINC = $(X11INC)/freetype2 20 | 21 | # includes and libs 22 | INCS = -I$(X11INC) -I$(FREETYPEINC) 23 | LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS) -lXrender -lm 24 | 25 | # flags 26 | CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS) 27 | CFLAGS = -std=c99 -pedantic -Wall -Os $(INCS) $(CPPFLAGS) 28 | LDFLAGS = $(LIBS) 29 | 30 | # compiler and linker 31 | CC = cc 32 | -------------------------------------------------------------------------------- /.config/suckless/dmenu/dmenu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/suckless/dmenu/dmenu -------------------------------------------------------------------------------- /.config/suckless/dmenu/dmenu_path: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}" 4 | cache="$cachedir/dmenu_run" 5 | 6 | [ ! -e "$cachedir" ] && mkdir -p "$cachedir" 7 | 8 | IFS=: 9 | if stest -dqr -n "$cache" $PATH; then 10 | stest -flx $PATH | sort -u | tee "$cache" 11 | else 12 | cat "$cache" 13 | fi 14 | -------------------------------------------------------------------------------- /.config/suckless/dmenu/dmenu_run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | dmenu_path | dmenu "$@" | ${SHELL:-"/bin/sh"} & 3 | -------------------------------------------------------------------------------- /.config/suckless/dmenu/drw.h: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | 3 | typedef struct { 4 | Cursor cursor; 5 | } Cur; 6 | 7 | typedef struct Fnt { 8 | Display *dpy; 9 | unsigned int h; 10 | XftFont *xfont; 11 | FcPattern *pattern; 12 | struct Fnt *next; 13 | } Fnt; 14 | 15 | enum { ColFg, ColBg }; /* Clr scheme index */ 16 | typedef XftColor Clr; 17 | 18 | typedef struct { 19 | unsigned int w, h; 20 | Display *dpy; 21 | int screen; 22 | Window root; 23 | Visual *visual; 24 | unsigned int depth; 25 | Colormap cmap; 26 | Drawable drawable; 27 | GC gc; 28 | Clr *scheme; 29 | Fnt *fonts; 30 | } Drw; 31 | 32 | /* Drawable abstraction */ 33 | Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h, Visual *visual, unsigned int depth, Colormap cmap); 34 | void drw_resize(Drw *drw, unsigned int w, unsigned int h); 35 | void drw_free(Drw *drw); 36 | 37 | /* Fnt abstraction */ 38 | Fnt *drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount); 39 | void drw_fontset_free(Fnt* set); 40 | unsigned int drw_fontset_getwidth(Drw *drw, const char *text); 41 | void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h); 42 | 43 | /* Colorscheme abstraction */ 44 | void drw_clr_create(Drw *drw, Clr *dest, const char *clrname, unsigned int alpha); 45 | Clr *drw_scm_create(Drw *drw, const char *clrnames[], const unsigned int alphas[], size_t clrcount); 46 | 47 | /* Cursor abstraction */ 48 | Cur *drw_cur_create(Drw *drw, int shape); 49 | void drw_cur_free(Drw *drw, Cur *cursor); 50 | 51 | /* Drawing context manipulation */ 52 | void drw_setfontset(Drw *drw, Fnt *set); 53 | void drw_setscheme(Drw *drw, Clr *scm); 54 | 55 | /* Drawing functions */ 56 | void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert); 57 | int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert); 58 | 59 | /* Map functions */ 60 | void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h); 61 | -------------------------------------------------------------------------------- /.config/suckless/dmenu/patches/border.diff: -------------------------------------------------------------------------------- 1 | diff -up dmenu-4.9-b/config.def.h dmenu-4.9-a/config.def.h 2 | --- dmenu-4.9-b/config.def.h 2019-02-02 13:55:02.000000000 +0100 3 | +++ dmenu-4.9-a/config.def.h 2019-05-19 02:10:12.740040403 +0200 4 | @@ -21,3 +21,6 @@ static unsigned int lines = 0; 5 | * for example: " /?\"&[]" 6 | */ 7 | static const char worddelimiters[] = " "; 8 | + 9 | +/* Size of the window border */ 10 | +static const unsigned int border_width = 5; 11 | diff -up dmenu-4.9-b/dmenu.c dmenu-4.9-a/dmenu.c 12 | --- dmenu-4.9-b/dmenu.c 2019-02-02 13:55:02.000000000 +0100 13 | +++ dmenu-4.9-a/dmenu.c 2019-05-19 02:11:20.966710117 +0200 14 | @@ -654,9 +654,10 @@ setup(void) 15 | swa.override_redirect = True; 16 | swa.background_pixel = scheme[SchemeNorm][ColBg].pixel; 17 | swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask; 18 | - win = XCreateWindow(dpy, parentwin, x, y, mw, mh, 0, 19 | + win = XCreateWindow(dpy, parentwin, x, y, mw, mh, border_width, 20 | CopyFromParent, CopyFromParent, CopyFromParent, 21 | CWOverrideRedirect | CWBackPixel | CWEventMask, &swa); 22 | + XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel); 23 | XSetClassHint(dpy, win, &ch); 24 | 25 | /* open input methods */ 26 | -------------------------------------------------------------------------------- /.config/suckless/dmenu/patches/caseinsensitive.diff: -------------------------------------------------------------------------------- 1 | From 54acbdf72083a5eae5783eed42e162424ab2cec2 Mon Sep 17 00:00:00 2001 2 | From: Kim Torgersen 3 | Date: Sat, 23 May 2020 14:48:28 +0200 4 | Subject: [PATCH] case-insensitive item matching default, case-sensitive option 5 | (-s) 6 | 7 | --- 8 | dmenu.c | 11 ++++++----- 9 | 1 file changed, 6 insertions(+), 5 deletions(-) 10 | 11 | diff --git a/dmenu.c b/dmenu.c 12 | index 65f25ce..855df59 100644 13 | --- a/dmenu.c 14 | +++ b/dmenu.c 15 | @@ -55,8 +55,9 @@ static Clr *scheme[SchemeLast]; 16 | 17 | #include "config.h" 18 | 19 | -static int (*fstrncmp)(const char *, const char *, size_t) = strncmp; 20 | -static char *(*fstrstr)(const char *, const char *) = strstr; 21 | +static char * cistrstr(const char *s, const char *sub); 22 | +static int (*fstrncmp)(const char *, const char *, size_t) = strncasecmp; 23 | +static char *(*fstrstr)(const char *, const char *) = cistrstr; 24 | 25 | static void 26 | appenditem(struct item *item, struct item **list, struct item **last) 27 | @@ -709,9 +710,9 @@ main(int argc, char *argv[]) 28 | topbar = 0; 29 | else if (!strcmp(argv[i], "-f")) /* grabs keyboard before reading stdin */ 30 | fast = 1; 31 | - else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */ 32 | - fstrncmp = strncasecmp; 33 | - fstrstr = cistrstr; 34 | + else if (!strcmp(argv[i], "-s")) { /* case-sensitive item matching */ 35 | + fstrncmp = strncmp; 36 | + fstrstr = strstr; 37 | } else if (i + 1 == argc) 38 | usage(); 39 | /* these options take one argument */ 40 | -- 41 | 2.26.2 42 | 43 | -------------------------------------------------------------------------------- /.config/suckless/dmenu/patches/listfullwidth.diff: -------------------------------------------------------------------------------- 1 | From 7a045242afac6db70a4aee6e3ac0146cdb264277 Mon Sep 17 00:00:00 2001 2 | From: Alex Cole 3 | Date: Sun, 4 Oct 2020 19:58:32 +1300 4 | Subject: [PATCH] listfullwidth patch changes 5 | 6 | --- 7 | config.def.h | 1 + 8 | dmenu.c | 5 +++-- 9 | 2 files changed, 4 insertions(+), 2 deletions(-) 10 | 11 | diff --git a/config.def.h b/config.def.h 12 | index 1edb647..221db00 100644 13 | --- a/config.def.h 14 | +++ b/config.def.h 15 | @@ -2,6 +2,7 @@ 16 | /* Default settings; can be overriden by command line. */ 17 | 18 | static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ 19 | +static int colorprompt = 1; /* -p option; if 1, prompt uses SchemeSel, otherwise SchemeNorm */ 20 | /* -fn option overrides fonts[0]; default X11 font or font set */ 21 | static const char *fonts[] = { 22 | "monospace:size=10" 23 | diff --git a/dmenu.c b/dmenu.c 24 | index 65f25ce..f73f299 100644 25 | --- a/dmenu.c 26 | +++ b/dmenu.c 27 | @@ -137,7 +137,8 @@ drawmenu(void) 28 | drw_rect(drw, 0, 0, mw, mh, 1, 1); 29 | 30 | if (prompt && *prompt) { 31 | - drw_setscheme(drw, scheme[SchemeSel]); 32 | + if (colorprompt) 33 | + drw_setscheme(drw, scheme[SchemeSel]); 34 | x = drw_text(drw, x, 0, promptw, bh, lrpad / 2, prompt, 0); 35 | } 36 | /* draw input field */ 37 | @@ -154,7 +155,7 @@ drawmenu(void) 38 | if (lines > 0) { 39 | /* draw vertical list */ 40 | for (item = curr; item != next; item = item->right) 41 | - drawitem(item, x, y += bh, mw - x); 42 | + drawitem(item, 0, y += bh, mw - x); 43 | } else if (matches) { 44 | /* draw horizontal list */ 45 | x += inputw; 46 | -- 47 | 2.28.0 48 | 49 | -------------------------------------------------------------------------------- /.config/suckless/dmenu/stest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/suckless/dmenu/stest -------------------------------------------------------------------------------- /.config/suckless/dmenu/stest.1: -------------------------------------------------------------------------------- 1 | .TH STEST 1 dmenu\-VERSION 2 | .SH NAME 3 | stest \- filter a list of files by properties 4 | .SH SYNOPSIS 5 | .B stest 6 | .RB [ -abcdefghlpqrsuwx ] 7 | .RB [ -n 8 | .IR file ] 9 | .RB [ -o 10 | .IR file ] 11 | .RI [ file ...] 12 | .SH DESCRIPTION 13 | .B stest 14 | takes a list of files and filters by the files' properties, analogous to 15 | .IR test (1). 16 | Files which pass all tests are printed to stdout. If no files are given, stest 17 | reads files from stdin. 18 | .SH OPTIONS 19 | .TP 20 | .B \-a 21 | Test hidden files. 22 | .TP 23 | .B \-b 24 | Test that files are block specials. 25 | .TP 26 | .B \-c 27 | Test that files are character specials. 28 | .TP 29 | .B \-d 30 | Test that files are directories. 31 | .TP 32 | .B \-e 33 | Test that files exist. 34 | .TP 35 | .B \-f 36 | Test that files are regular files. 37 | .TP 38 | .B \-g 39 | Test that files have their set-group-ID flag set. 40 | .TP 41 | .B \-h 42 | Test that files are symbolic links. 43 | .TP 44 | .B \-l 45 | Test the contents of a directory given as an argument. 46 | .TP 47 | .BI \-n " file" 48 | Test that files are newer than 49 | .IR file . 50 | .TP 51 | .BI \-o " file" 52 | Test that files are older than 53 | .IR file . 54 | .TP 55 | .B \-p 56 | Test that files are named pipes. 57 | .TP 58 | .B \-q 59 | No files are printed, only the exit status is returned. 60 | .TP 61 | .B \-r 62 | Test that files are readable. 63 | .TP 64 | .B \-s 65 | Test that files are not empty. 66 | .TP 67 | .B \-u 68 | Test that files have their set-user-ID flag set. 69 | .TP 70 | .B \-v 71 | Invert the sense of tests, only failing files pass. 72 | .TP 73 | .B \-w 74 | Test that files are writable. 75 | .TP 76 | .B \-x 77 | Test that files are executable. 78 | .SH EXIT STATUS 79 | .TP 80 | .B 0 81 | At least one file passed all tests. 82 | .TP 83 | .B 1 84 | No files passed all tests. 85 | .TP 86 | .B 2 87 | An error occurred. 88 | .SH SEE ALSO 89 | .IR dmenu (1), 90 | .IR test (1) 91 | -------------------------------------------------------------------------------- /.config/suckless/dmenu/util.c: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "util.h" 8 | 9 | void * 10 | ecalloc(size_t nmemb, size_t size) 11 | { 12 | void *p; 13 | 14 | if (!(p = calloc(nmemb, size))) 15 | die("calloc:"); 16 | return p; 17 | } 18 | 19 | void 20 | die(const char *fmt, ...) { 21 | va_list ap; 22 | 23 | va_start(ap, fmt); 24 | vfprintf(stderr, fmt, ap); 25 | va_end(ap); 26 | 27 | if (fmt[0] && fmt[strlen(fmt)-1] == ':') { 28 | fputc(' ', stderr); 29 | perror(NULL); 30 | } else { 31 | fputc('\n', stderr); 32 | } 33 | 34 | exit(1); 35 | } 36 | -------------------------------------------------------------------------------- /.config/suckless/dmenu/util.h: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | 3 | #define MAX(A, B) ((A) > (B) ? (A) : (B)) 4 | #define MIN(A, B) ((A) < (B) ? (A) : (B)) 5 | #define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B)) 6 | 7 | void die(const char *fmt, ...); 8 | void *ecalloc(size_t nmemb, size_t size); 9 | -------------------------------------------------------------------------------- /.config/suckless/dwm/Makefile: -------------------------------------------------------------------------------- 1 | # dwm - dynamic window manager 2 | 3 | include config.mk 4 | 5 | SRC = drw.c dwm.c util.c 6 | OBJ = ${SRC:.c=.o} 7 | 8 | all: options dwm 9 | 10 | options: 11 | @echo dwm build options: 12 | @echo "CFLAGS = ${CFLAGS}" 13 | @echo "LDFLAGS = ${LDFLAGS}" 14 | @echo "CC = ${CC}" 15 | 16 | .c.o: 17 | ${CC} -c ${CFLAGS} $< 18 | 19 | ${OBJ}: config.h config.mk 20 | 21 | config.h: 22 | cp config.def.h $@ 23 | 24 | dwm: ${OBJ} 25 | ${CC} -o $@ ${OBJ} ${LDFLAGS} 26 | 27 | clean: 28 | rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz *.orig *.rej config.h 29 | 30 | dist: clean 31 | mkdir -p dwm-${VERSION} 32 | cp -R LICENSE Makefile README config.def.h config.mk\ 33 | dwm.1 drw.h util.h ${SRC} dwm.png transient.c dwm-${VERSION} 34 | tar -cf dwm-${VERSION}.tar dwm-${VERSION} 35 | gzip dwm-${VERSION}.tar 36 | rm -rf dwm-${VERSION} 37 | 38 | install: all 39 | mkdir -p ${DESTDIR}${PREFIX}/bin 40 | cp -f dwm ${DESTDIR}${PREFIX}/bin 41 | chmod 755 ${DESTDIR}${PREFIX}/bin/dwm 42 | mkdir -p ${DESTDIR}${MANPREFIX}/man1 43 | sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1 44 | mkdir -p /usr/share/xsessions 45 | test -f /usr/share/xsessions/dwm.desktop || cp -n dwm.desktop /usr/share/xsessions/ 46 | chmod 644 /usr/share/xsessions/dwm.desktop 47 | chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1 48 | rm config.h *.o 49 | 50 | uninstall: 51 | rm -f ${DESTDIR}${PREFIX}/bin/dwm\ 52 | #/usr/share/xsessions/dwm.desktop\ #Enable it only if using a Display Manager 53 | ${DESTDIR}${MANPREFIX}/man1/dwm.1 54 | 55 | .PHONY: all options clean dist install uninstall 56 | -------------------------------------------------------------------------------- /.config/suckless/dwm/config.mk: -------------------------------------------------------------------------------- 1 | # dwm version 2 | VERSION = 6.4 3 | 4 | # Customize below to fit your system 5 | 6 | # paths 7 | PREFIX = /usr/local 8 | MANPREFIX = ${PREFIX}/share/man 9 | 10 | X11INC = /usr/X11R6/include 11 | X11LIB = /usr/X11R6/lib 12 | 13 | # Xinerama, comment if you don't want it 14 | XINERAMALIBS = -lXinerama 15 | XINERAMAFLAGS = -DXINERAMA 16 | 17 | # freetype 18 | FREETYPELIBS = -lfontconfig -lXft 19 | FREETYPEINC = /usr/include/freetype2 20 | 21 | # This is needed for the swallow patch 22 | XCBLIBS = -lX11-xcb -lxcb -lxcb-res 23 | 24 | # OpenBSD (uncomment) 25 | #FREETYPEINC = ${X11INC}/freetype2 26 | #MANPREFIX = ${PREFIX}/man 27 | #KVMLIB = -lkvm 28 | 29 | # includes and libs 30 | INCS = -I${X11INC} -I${FREETYPEINC} 31 | LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} ${XCBLIBS} ${KVMLIB} -lXrender -lImlib2 -lX11-xcb -lxcb -lxcb-res 32 | 33 | # flags 34 | CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} 35 | #CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS} 36 | CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS} 37 | LDFLAGS = ${LIBS} 38 | 39 | # Solaris 40 | #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" 41 | #LDFLAGS = ${LIBS} 42 | 43 | # compiler and linker 44 | CC = cc 45 | -------------------------------------------------------------------------------- /.config/suckless/dwm/dwm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/suckless/dwm/dwm -------------------------------------------------------------------------------- /.config/suckless/dwm/dwm.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=XSession 3 | Exec=dwm 4 | TryExec=dwm 5 | DesktopNames=dwm 6 | Name=dwm 7 | -------------------------------------------------------------------------------- /.config/suckless/dwm/dwm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/suckless/dwm/dwm.png -------------------------------------------------------------------------------- /.config/suckless/dwm/movestack.c: -------------------------------------------------------------------------------- 1 | void 2 | movestack(const Arg *arg) { 3 | Client *c = NULL, *p = NULL, *pc = NULL, *i; 4 | 5 | if(arg->i > 0) { 6 | /* find the client after selmon->sel */ 7 | for(c = selmon->sel->next; c && (!ISVISIBLE(c) || c->isfloating); c = c->next); 8 | if(!c) 9 | for(c = selmon->clients; c && (!ISVISIBLE(c) || c->isfloating); c = c->next); 10 | 11 | } 12 | else { 13 | /* find the client before selmon->sel */ 14 | for(i = selmon->clients; i != selmon->sel; i = i->next) 15 | if(ISVISIBLE(i) && !i->isfloating) 16 | c = i; 17 | if(!c) 18 | for(; i; i = i->next) 19 | if(ISVISIBLE(i) && !i->isfloating) 20 | c = i; 21 | } 22 | /* find the client before selmon->sel and c */ 23 | for(i = selmon->clients; i && (!p || !pc); i = i->next) { 24 | if(i->next == selmon->sel) 25 | p = i; 26 | if(i->next == c) 27 | pc = i; 28 | } 29 | 30 | /* swap c and selmon->sel selmon->clients in the selmon->clients list */ 31 | if(c && c != selmon->sel) { 32 | Client *temp = selmon->sel->next==c?selmon->sel:selmon->sel->next; 33 | selmon->sel->next = c->next==selmon->sel?c:c->next; 34 | c->next = temp; 35 | 36 | if(p && p != c) 37 | p->next = c; 38 | if(pc && pc != selmon->sel) 39 | pc->next = selmon->sel; 40 | 41 | if(selmon->sel == selmon->clients) 42 | selmon->clients = c; 43 | else if(c == selmon->clients) 44 | selmon->clients = selmon->sel; 45 | 46 | arrange(selmon); 47 | } 48 | } -------------------------------------------------------------------------------- /.config/suckless/dwm/patches/alttagsdecoration.diff: -------------------------------------------------------------------------------- 1 | diff --git a/config.def.h b/config.def.h 2 | index 1c0b587..d4b11fc 100644 3 | --- a/config.def.h 4 | +++ b/config.def.h 5 | @@ -20,6 +20,7 @@ static const char *colors[][3] = { 6 | 7 | /* tagging */ 8 | static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 9 | +static const char *alttags[] = { "<01>", "<02>", "<03>", "<04>", "<05>" }; 10 | 11 | static const Rule rules[] = { 12 | /* xprop(1): 13 | diff --git a/dwm.c b/dwm.c 14 | index 4465af1..a394159 100644 15 | --- a/dwm.c 16 | +++ b/dwm.c 17 | @@ -416,7 +416,7 @@ attachstack(Client *c) 18 | void 19 | buttonpress(XEvent *e) 20 | { 21 | - unsigned int i, x, click; 22 | + unsigned int i, x, click, occ; 23 | Arg arg = {0}; 24 | Client *c; 25 | Monitor *m; 26 | @@ -430,9 +430,13 @@ buttonpress(XEvent *e) 27 | focus(NULL); 28 | } 29 | if (ev->window == selmon->barwin) { 30 | - i = x = 0; 31 | + i = x = occ = 0; 32 | + /* Bitmask of occupied tags */ 33 | + for (c = m->clients; c; c = c->next) 34 | + occ |= c->tags; 35 | + 36 | do 37 | - x += TEXTW(tags[i]); 38 | + x += TEXTW(occ & 1 << i ? alttags[i] : tags[i]); 39 | while (ev->x >= x && ++i < LENGTH(tags)); 40 | if (i < LENGTH(tags)) { 41 | click = ClkTagBar; 42 | @@ -699,6 +703,7 @@ drawbar(Monitor *m) 43 | int boxs = drw->fonts->h / 9; 44 | int boxw = drw->fonts->h / 6 + 2; 45 | unsigned int i, occ = 0, urg = 0; 46 | + const char *tagtext; 47 | Client *c; 48 | 49 | /* draw status first so it can be overdrawn by tags later */ 50 | @@ -715,13 +720,10 @@ drawbar(Monitor *m) 51 | } 52 | x = 0; 53 | for (i = 0; i < LENGTH(tags); i++) { 54 | - w = TEXTW(tags[i]); 55 | - drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); 56 | - drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i); 57 | - if (occ & 1 << i) 58 | - drw_rect(drw, x + boxs, boxs, boxw, boxw, 59 | - m == selmon && selmon->sel && selmon->sel->tags & 1 << i, 60 | - urg & 1 << i); 61 | + tagtext = occ & 1 << i ? alttags[i] : tags[i]; 62 | + w = TEXTW(tagtext); 63 | + drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); 64 | + drw_text(drw, x, 0, w, bh, lrpad / 2, tagtext, urg & 1 << i); 65 | x += w; 66 | } 67 | w = blw = TEXTW(m->ltsymbol); 68 | -------------------------------------------------------------------------------- /.config/suckless/dwm/patches/barheight.diff: -------------------------------------------------------------------------------- 1 | diff --git a/config.def.h b/config.def.h 2 | index 1c0b587..9814500 100644 3 | --- a/config.def.h 4 | +++ b/config.def.h 5 | @@ -5,6 +5,7 @@ static const unsigned int borderpx = 1; /* border pixel of windows */ 6 | static const unsigned int snap = 32; /* snap pixel */ 7 | static const int showbar = 1; /* 0 means no bar */ 8 | static const int topbar = 1; /* 0 means bottom bar */ 9 | +static const int user_bh = 2; /* 2 is the default spacing around the bar's font */ 10 | static const char *fonts[] = { "monospace:size=10" }; 11 | static const char dmenufont[] = "monospace:size=10"; 12 | static const char col_gray1[] = "#222222"; 13 | diff --git a/dwm.c b/dwm.c 14 | index 4465af1..2c27cb3 100644 15 | --- a/dwm.c 16 | +++ b/dwm.c 17 | @@ -1545,7 +1545,7 @@ setup(void) 18 | if (!drw_fontset_create(drw, fonts, LENGTH(fonts))) 19 | die("no fonts could be loaded."); 20 | lrpad = drw->fonts->h; 21 | - bh = drw->fonts->h + 2; 22 | + bh = drw->fonts->h + user_bh; 23 | updategeom(); 24 | /* init atoms */ 25 | utf8string = XInternAtom(dpy, "UTF8_STRING", False); 26 | -------------------------------------------------------------------------------- /.config/suckless/dwm/patches/centeredwindowname.diff: -------------------------------------------------------------------------------- 1 | From f035e1e5abb19df5dced9c592ca986deac460435 Mon Sep 17 00:00:00 2001 2 | From: bastila <20937049+silentfault@users.noreply.github.com> 3 | Date: Thu, 23 Jul 2020 02:45:12 +0300 4 | Subject: [PATCH] Fix overflow when window name is bigger than window width 5 | 6 | --- 7 | dwm.c | 6 +++++- 8 | 1 file changed, 5 insertions(+), 1 deletion(-) 9 | 10 | diff --git a/dwm.c b/dwm.c 11 | index 9fd0286..42cb8dd 100644 12 | --- a/dwm.c 13 | +++ b/dwm.c 14 | @@ -731,8 +731,12 @@ drawbar(Monitor *m) 15 | 16 | if ((w = m->ww - tw - x) > bh) { 17 | if (m->sel) { 18 | + /* fix overflow when window name is bigger than window width */ 19 | + int mid = (m->ww - (int)TEXTW(m->sel->name)) / 2 - x; 20 | + /* make sure name will not overlap on tags even when it is very long */ 21 | + mid = mid >= lrpad / 2 ? mid : lrpad / 2; 22 | drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]); 23 | - drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0); 24 | + drw_text(drw, x, 0, w, bh, mid, m->sel->name, 0); 25 | if (m->sel->isfloating) 26 | drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0); 27 | } else { 28 | -- 29 | 2.27.0 30 | 31 | -------------------------------------------------------------------------------- /.config/suckless/dwm/patches/focusonnetactive.diff: -------------------------------------------------------------------------------- 1 | From 286ca3bb1af08b452bf8140abcc23d4ef61baaa2 Mon Sep 17 00:00:00 2001 2 | From: bakkeby 3 | Date: Tue, 7 Apr 2020 12:33:04 +0200 4 | Subject: [PATCH] Activate a window in response to _NET_ACTIVE_WINDOW 5 | 6 | By default, dwm response to client requests to _NET_ACTIVE_WINDOW client 7 | messages by setting the urgency bit on the named window. 8 | 9 | This patch activates the window instead. 10 | 11 | Both behaviours are legitimate according to 12 | https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472702304 13 | 14 | One should decide which of these one should perform based on the message 15 | senders' untestable claims that it represents the end-user. Setting the 16 | urgency bit is the conservative decision. This patch implements the more 17 | trusting alternative. 18 | 19 | It also allows dwm to work with `wmctrl -a` and other external window 20 | management utilities 21 | 22 | --- 23 | dwm.c | 11 +++++++++-- 24 | 1 file changed, 9 insertions(+), 2 deletions(-) 25 | 26 | diff --git a/dwm.c b/dwm.c 27 | index 4465af1..3919d47 100644 28 | --- a/dwm.c 29 | +++ b/dwm.c 30 | @@ -514,6 +514,7 @@ clientmessage(XEvent *e) 31 | { 32 | XClientMessageEvent *cme = &e->xclient; 33 | Client *c = wintoclient(cme->window); 34 | + unsigned int i; 35 | 36 | if (!c) 37 | return; 38 | @@ -523,8 +524,14 @@ clientmessage(XEvent *e) 39 | setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */ 40 | || (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */ && !c->isfullscreen))); 41 | } else if (cme->message_type == netatom[NetActiveWindow]) { 42 | - if (c != selmon->sel && !c->isurgent) 43 | - seturgent(c, 1); 44 | + for (i = 0; i < LENGTH(tags) && !((1 << i) & c->tags); i++); 45 | + if (i < LENGTH(tags)) { 46 | + const Arg a = {.ui = 1 << i}; 47 | + selmon = c->mon; 48 | + view(&a); 49 | + focus(c); 50 | + restack(selmon); 51 | + } 52 | } 53 | } 54 | 55 | -- 56 | 2.17.1 57 | 58 | -------------------------------------------------------------------------------- /.config/suckless/dwm/patches/hidevacanttags.diff: -------------------------------------------------------------------------------- 1 | diff --git a/dwm.c b/dwm.c 2 | index a96f33c..f2da729 100644 3 | --- a/dwm.c 4 | +++ b/dwm.c 5 | @@ -432,9 +432,15 @@ buttonpress(XEvent *e) 6 | } 7 | if (ev->window == selmon->barwin) { 8 | i = x = 0; 9 | - do 10 | + unsigned int occ = 0; 11 | + for(c = m->clients; c; c=c->next) 12 | + occ |= c->tags; 13 | + do { 14 | + /* Do not reserve space for vacant tags */ 15 | + if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i)) 16 | + continue; 17 | x += TEXTW(tags[i]); 18 | - while (ev->x >= x && ++i < LENGTH(tags)); 19 | + } while (ev->x >= x && ++i < LENGTH(tags)); 20 | if (i < LENGTH(tags)) { 21 | click = ClkTagBar; 22 | arg.ui = 1 << i; 23 | @@ -719,13 +725,12 @@ drawbar(Monitor *m) 24 | } 25 | x = 0; 26 | for (i = 0; i < LENGTH(tags); i++) { 27 | + /* Do not draw vacant tags */ 28 | + if(!(occ & 1 << i || m->tagset[m->seltags] & 1 << i)) 29 | + continue; 30 | w = TEXTW(tags[i]); 31 | drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); 32 | drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i); 33 | - if (occ & 1 << i) 34 | - drw_rect(drw, x + boxs, boxs, boxw, boxw, 35 | - m == selmon && selmon->sel && selmon->sel->tags & 1 << i, 36 | - urg & 1 << i); 37 | x += w; 38 | } 39 | w = blw = TEXTW(m->ltsymbol); 40 | -------------------------------------------------------------------------------- /.config/suckless/dwm/patches/noborderfloatingfix.diff: -------------------------------------------------------------------------------- 1 | From 700b0bdea872f4c00182b2bd925b41fe03f8d222 Mon Sep 17 00:00:00 2001 2 | From: Aidan Hall 3 | Date: Tue, 2 Jun 2020 14:41:53 +0000 4 | Subject: [PATCH] Prevents hiding the border if layout is floating. 5 | 6 | --- 7 | dwm.c | 8 ++++++++ 8 | 1 file changed, 8 insertions(+) 9 | 10 | diff --git a/dwm.c b/dwm.c 11 | index 4465af1..2dd959d 100644 12 | --- a/dwm.c 13 | +++ b/dwm.c 14 | @@ -1282,6 +1282,14 @@ resizeclient(Client *c, int x, int y, int w, int h) 15 | c->oldw = c->w; c->w = wc.width = w; 16 | c->oldh = c->h; c->h = wc.height = h; 17 | wc.border_width = c->bw; 18 | + if (((nexttiled(c->mon->clients) == c && !nexttiled(c->next)) 19 | + || &monocle == c->mon->lt[c->mon->sellt]->arrange) 20 | + && !c->isfullscreen && !c->isfloating 21 | + && NULL != c->mon->lt[c->mon->sellt]->arrange) { 22 | + c->w = wc.width += c->bw * 2; 23 | + c->h = wc.height += c->bw * 2; 24 | + wc.border_width = 0; 25 | + } 26 | XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc); 27 | configure(c); 28 | XSync(dpy, False); 29 | -- 30 | 2.26.2 31 | 32 | -------------------------------------------------------------------------------- /.config/suckless/dwm/patches/savefloats.diff: -------------------------------------------------------------------------------- 1 | diff --git i/dwm.c w/dwm.c 2 | index 4465af1..96b0b26 100644 3 | --- i/dwm.c 4 | +++ w/dwm.c 5 | @@ -88,6 +88,7 @@ struct Client { 6 | char name[256]; 7 | float mina, maxa; 8 | int x, y, w, h; 9 | + int sfx, sfy, sfw, sfh; /* stored float geometry, used on mode revert */ 10 | int oldx, oldy, oldw, oldh; 11 | int basew, baseh, incw, inch, maxw, maxh, minw, minh; 12 | int bw, oldbw; 13 | @@ -1056,6 +1057,10 @@ manage(Window w, XWindowAttributes *wa) 14 | updatewindowtype(c); 15 | updatesizehints(c); 16 | updatewmhints(c); 17 | + c->sfx = c->x; 18 | + c->sfy = c->y; 19 | + c->sfw = c->w; 20 | + c->sfh = c->h; 21 | XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); 22 | grabbuttons(c, 0); 23 | if (!c->isfloating) 24 | @@ -1714,8 +1719,16 @@ togglefloating(const Arg *arg) 25 | return; 26 | selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed; 27 | if (selmon->sel->isfloating) 28 | - resize(selmon->sel, selmon->sel->x, selmon->sel->y, 29 | - selmon->sel->w, selmon->sel->h, 0); 30 | + /* restore last known float dimensions */ 31 | + resize(selmon->sel, selmon->sel->sfx, selmon->sel->sfy, 32 | + selmon->sel->sfw, selmon->sel->sfh, False); 33 | + else { 34 | + /* save last known float dimensions */ 35 | + selmon->sel->sfx = selmon->sel->x; 36 | + selmon->sel->sfy = selmon->sel->y; 37 | + selmon->sel->sfw = selmon->sel->w; 38 | + selmon->sel->sfh = selmon->sel->h; 39 | + } 40 | arrange(selmon); 41 | } 42 | 43 | -------------------------------------------------------------------------------- /.config/suckless/dwm/patches/statusallmons.diff: -------------------------------------------------------------------------------- 1 | diff -up a/dwm.c b/dwm.c 2 | --- a/dwm.c 2020-07-09 16:49:10.023585649 +0200 3 | +++ b/dwm.c 2020-07-09 16:49:43.497542191 +0200 4 | @@ -702,7 +702,7 @@ drawbar(Monitor *m) 5 | Client *c; 6 | 7 | /* draw status first so it can be overdrawn by tags later */ 8 | - if (m == selmon) { /* status is only drawn on selected monitor */ 9 | + if (m == selmon || 1) { /* status is only drawn on selected monitor */ 10 | drw_setscheme(drw, scheme[SchemeNorm]); 11 | sw = TEXTW(stext) - lrpad + 2; /* 2px right padding */ 12 | drw_text(drw, m->ww - sw, 0, sw, bh, 0, stext, 0); 13 | @@ -1987,9 +1987,11 @@ updatesizehints(Client *c) 14 | void 15 | updatestatus(void) 16 | { 17 | + Monitor* m; 18 | if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext))) 19 | strcpy(stext, "dwm-"VERSION); 20 | - drawbar(selmon); 21 | + for(m = mons; m; m = m->next) 22 | + drawbar(m); 23 | } 24 | 25 | void 26 | -------------------------------------------------------------------------------- /.config/suckless/dwm/patches/togglefloatingcenter.diff: -------------------------------------------------------------------------------- 1 | From efa326b2c71f0df1d097fd52a17684f5ccc5df6c Mon Sep 17 00:00:00 2001 2 | From: Rizqi Nur Assyaufi 3 | Date: Sat, 7 Aug 2021 00:24:01 +0800 4 | Subject: [PATCH] [dwm][patch][togglefloatingcenter] centered togglefloating 5 | window 6 | 7 | Default behaviour when togglefloating() is floating from top-left corner. 8 | This patch will allows you to toggle floating window client will be centered 9 | position. 10 | --- 11 | dwm.c | 4 ++++ 12 | 1 file changed, 4 insertions(+) 13 | 14 | diff --git a/dwm.c b/dwm.c 15 | index 5e4d494..cbedb09 100644 16 | --- a/dwm.c 17 | +++ b/dwm.c 18 | @@ -1719,6 +1719,10 @@ togglefloating(const Arg *arg) 19 | if (selmon->sel->isfloating) 20 | resize(selmon->sel, selmon->sel->x, selmon->sel->y, 21 | selmon->sel->w, selmon->sel->h, 0); 22 | + 23 | + selmon->sel->x = selmon->sel->mon->mx + (selmon->sel->mon->mw - WIDTH(selmon->sel)) / 2; 24 | + selmon->sel->y = selmon->sel->mon->my + (selmon->sel->mon->mh - HEIGHT(selmon->sel)) / 2; 25 | + 26 | arrange(selmon); 27 | } 28 | 29 | -- 30 | 2.31.1 31 | 32 | -------------------------------------------------------------------------------- /.config/suckless/dwm/patches/underlinetags.diff: -------------------------------------------------------------------------------- 1 | diff -pu dwm.git/config.def.h dwm.underlinetags/config.def.h 2 | --- dwm.git/config.def.h 2021-02-27 20:04:32.030570909 -0600 3 | +++ dwm.underlinetags/config.def.h 2021-03-16 16:42:26.278703624 -0500 4 | @@ -21,6 +21,11 @@ static const char *colors[][3] = { 5 | /* tagging */ 6 | static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 7 | 8 | +static const unsigned int ulinepad = 5; /* horizontal padding between the underline and tag */ 9 | +static const unsigned int ulinestroke = 2; /* thickness / height of the underline */ 10 | +static const unsigned int ulinevoffset = 0; /* how far above the bottom of the bar the line should appear */ 11 | +static const int ulineall = 0; /* 1 to show underline on all tags, 0 for just the active ones */ 12 | + 13 | static const Rule rules[] = { 14 | /* xprop(1): 15 | * WM_CLASS(STRING) = instance, class 16 | diff -pu dwm.git/dwm.c dwm.underlinetags/dwm.c 17 | --- dwm.git/dwm.c 2021-02-27 20:04:32.030570909 -0600 18 | +++ dwm.underlinetags/dwm.c 2021-03-16 16:41:21.468077151 -0500 19 | @@ -719,6 +719,8 @@ drawbar(Monitor *m) 20 | w = TEXTW(tags[i]); 21 | drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); 22 | drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i); 23 | + if (ulineall || m->tagset[m->seltags] & 1 << i) /* if there are conflicts, just move these lines directly underneath both 'drw_setscheme' and 'drw_text' :) */ 24 | + drw_rect(drw, x + ulinepad, bh - ulinestroke - ulinevoffset, w - (ulinepad * 2), ulinestroke, 1, 0); 25 | if (occ & 1 << i) 26 | drw_rect(drw, x + boxs, boxs, boxw, boxw, 27 | m == selmon && selmon->sel && selmon->sel->tags & 1 << i, 28 | -------------------------------------------------------------------------------- /.config/suckless/dwm/transient.c: -------------------------------------------------------------------------------- 1 | /* cc transient.c -o transient -lX11 */ 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | int main(void) { 9 | Display *d; 10 | Window r, f, t = None; 11 | XSizeHints h; 12 | XEvent e; 13 | 14 | d = XOpenDisplay(NULL); 15 | if (!d) 16 | exit(1); 17 | r = DefaultRootWindow(d); 18 | 19 | f = XCreateSimpleWindow(d, r, 100, 100, 400, 400, 0, 0, 0); 20 | h.min_width = h.max_width = h.min_height = h.max_height = 400; 21 | h.flags = PMinSize | PMaxSize; 22 | XSetWMNormalHints(d, f, &h); 23 | XStoreName(d, f, "floating"); 24 | XMapWindow(d, f); 25 | 26 | XSelectInput(d, f, ExposureMask); 27 | while (1) { 28 | XNextEvent(d, &e); 29 | 30 | if (t == None) { 31 | sleep(5); 32 | t = XCreateSimpleWindow(d, r, 50, 50, 100, 100, 0, 0, 0); 33 | XSetTransientForHint(d, t, f); 34 | XStoreName(d, t, "transient"); 35 | XMapWindow(d, t); 36 | XSelectInput(d, t, ExposureMask); 37 | } 38 | } 39 | 40 | XCloseDisplay(d); 41 | exit(0); 42 | } 43 | -------------------------------------------------------------------------------- /.config/suckless/dwm/util.c: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "util.h" 8 | 9 | void 10 | die(const char *fmt, ...) 11 | { 12 | va_list ap; 13 | 14 | va_start(ap, fmt); 15 | vfprintf(stderr, fmt, ap); 16 | va_end(ap); 17 | 18 | if (fmt[0] && fmt[strlen(fmt)-1] == ':') { 19 | fputc(' ', stderr); 20 | perror(NULL); 21 | } else { 22 | fputc('\n', stderr); 23 | } 24 | 25 | exit(1); 26 | } 27 | 28 | void * 29 | ecalloc(size_t nmemb, size_t size) 30 | { 31 | void *p; 32 | 33 | if (!(p = calloc(nmemb, size))) 34 | die("calloc:"); 35 | return p; 36 | } 37 | -------------------------------------------------------------------------------- /.config/suckless/dwm/util.h: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | 3 | #define MAX(A, B) ((A) > (B) ? (A) : (B)) 4 | #define MIN(A, B) ((A) < (B) ? (A) : (B)) 5 | #define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B)) 6 | 7 | void die(const char *fmt, ...); 8 | void *ecalloc(size_t nmemb, size_t size); 9 | -------------------------------------------------------------------------------- /.config/suckless/dwmblocks-async/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: Google 2 | IndentWidth: 4 3 | ColumnLimit: 79 4 | AlignArrayOfStructures: Left 5 | AlignConsecutiveMacros: true 6 | AllowShortFunctionsOnASingleLine: None 7 | -------------------------------------------------------------------------------- /.config/suckless/dwmblocks-async/.clangd: -------------------------------------------------------------------------------- 1 | CompileFlags: 2 | Add: 3 | - "-I." 4 | - "-I./inc" 5 | - "-I.." 6 | - "-I../inc" 7 | -------------------------------------------------------------------------------- /.config/suckless/dwmblocks-async/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .cache/ 3 | dwmblocks 4 | -------------------------------------------------------------------------------- /.config/suckless/dwmblocks-async/Makefile: -------------------------------------------------------------------------------- 1 | .POSIX: 2 | 3 | BIN := dwmblocks 4 | BUILD_DIR := build 5 | SRC_DIR := src 6 | INC_DIR := inc 7 | 8 | VERBOSE := 0 9 | 10 | PREFIX := /usr/local 11 | CFLAGS := -Wall -Wextra -Ofast -I. -I$(INC_DIR) 12 | CFLAGS += -Wall -Wextra -Wno-missing-field-initializers 13 | LDLIBS := -lX11 14 | 15 | VPATH := $(SRC_DIR) 16 | OBJS := $(patsubst $(SRC_DIR)/%.c,$(BUILD_DIR)/%.o,$(wildcard $(SRC_DIR)/*.c)) 17 | OBJS += $(patsubst %.c,$(BUILD_DIR)/%.o,$(wildcard *.c)) 18 | 19 | INSTALL_DIR := $(DESTDIR)$(PREFIX)/bin 20 | 21 | # Prettify output 22 | PRINTF := @printf "%-8s %s\n" 23 | ifeq ($(VERBOSE), 0) 24 | Q := @ 25 | endif 26 | 27 | all: $(BUILD_DIR)/$(BIN) 28 | 29 | $(BUILD_DIR)/$(BIN): $(OBJS) 30 | $(PRINTF) "LD" $@ 31 | $Q$(LINK.o) $^ $(LDLIBS) -o $@ 32 | 33 | $(BUILD_DIR)/%.o: %.c config.h | $(BUILD_DIR) 34 | $(PRINTF) "CC" $@ 35 | $Q$(COMPILE.c) -o $@ $< 36 | 37 | $(BUILD_DIR): 38 | $(PRINTF) "MKDIR" $@ 39 | $Qmkdir -p $@ 40 | 41 | clean: 42 | $(PRINTF) "CLEAN" $(BUILD_DIR) 43 | $Q$(RM) $(BUILD_DIR)/* 44 | 45 | install: $(BUILD_DIR)/$(BIN) 46 | $(PRINTF) "INSTALL" $(INSTALL_DIR)/$(BIN) 47 | $Qinstall -D -m 755 $< $(INSTALL_DIR)/$(BIN) 48 | rm -rf build/ 49 | 50 | uninstall: 51 | $(PRINTF) "RM" $(INSTALL_DIR)/$(BIN) 52 | $Q$(RM) $(INSTALL_DIR)/$(BIN) 53 | 54 | .PHONY: all clean install uninstall 55 | -------------------------------------------------------------------------------- /.config/suckless/dwmblocks-async/config.c: -------------------------------------------------------------------------------- 1 | #include "config.h" 2 | 3 | #include "block.h" 4 | #include "util.h" 5 | 6 | Block blocks[] = { 7 | {"s_cmus", 1, 11}, 8 | //{"s_mpd", 1, 19}, 9 | {"s_spotify", 1, 18}, 10 | {"s_cpu", 5, 12}, 11 | {"s_hdd", 1200, 14}, 12 | {"s_mem", 5, 13}, 13 | //{"s_nettraf", 1, 20}, 14 | {"s_upd", 3600, 8}, 15 | //{"s_battery", 10, 16}, 16 | //{"s_bri", 10, 17}, 17 | {"s_mic", 0, 9}, 18 | {"s_vol", 0, 7}, 19 | {"s_date", 60, 10}, 20 | {"s_net", 60, 15}, 21 | }; 22 | 23 | const unsigned short blockCount = LEN(blocks); 24 | -------------------------------------------------------------------------------- /.config/suckless/dwmblocks-async/config.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define CLICKABLE_BLOCKS 1 // Enable clickability for blocks 4 | #define CMDLENGTH 45 // Trim block output to this length 5 | #define DELIMITER " | " // Delimiter string used to separate blocks 6 | #define LEADING_DELIMITER 0 // Whether a leading separator should be used 7 | -------------------------------------------------------------------------------- /.config/suckless/dwmblocks-async/inc/bar.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "block.h" 3 | #include "config.h" 4 | #include "util.h" 5 | 6 | typedef struct { 7 | char *current; 8 | char *previous; 9 | } BarStatus; 10 | 11 | extern unsigned short debugMode; 12 | 13 | void initStatus(BarStatus *); 14 | void freeStatus(BarStatus *); 15 | void writeStatus(BarStatus *); 16 | -------------------------------------------------------------------------------- /.config/suckless/dwmblocks-async/inc/block.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "config.h" 3 | 4 | typedef struct { 5 | const char *command; 6 | const unsigned int interval; 7 | const unsigned int signal; 8 | int pipe[2]; 9 | char output[CMDLENGTH * 4 + 1]; 10 | } Block; 11 | 12 | extern Block blocks[]; 13 | extern const unsigned short blockCount; 14 | 15 | void execBlock(const Block *, const char *); 16 | void execBlocks(unsigned int); 17 | void updateBlock(Block *); 18 | -------------------------------------------------------------------------------- /.config/suckless/dwmblocks-async/inc/util.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define LEN(arr) (sizeof(arr) / sizeof(arr[0])) 4 | #define MAX(a, b) (a > b ? a : b) 5 | 6 | int gcd(int, int); 7 | void closePipe(int[2]); 8 | void trimUTF8(char*, unsigned int); 9 | -------------------------------------------------------------------------------- /.config/suckless/dwmblocks-async/inc/x11.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | int setupX(); 4 | int closeX(); 5 | void setXRootName(char *); 6 | -------------------------------------------------------------------------------- /.config/suckless/dwmblocks-async/src/bar.c: -------------------------------------------------------------------------------- 1 | #include "bar.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "block.h" 8 | #include "x11.h" 9 | 10 | void initStatus(BarStatus *status) { 11 | const unsigned int statusLength = 12 | (blockCount * (LEN(blocks[0].output) - 1)) + 13 | (blockCount - 1 + LEADING_DELIMITER) * (LEN(DELIMITER) - 1); 14 | 15 | status->current = (char *)malloc(statusLength); 16 | status->previous = (char *)malloc(statusLength); 17 | status->current[0] = '\0'; 18 | status->previous[0] = '\0'; 19 | } 20 | 21 | void freeStatus(BarStatus *status) { 22 | free(status->current); 23 | free(status->previous); 24 | } 25 | 26 | int updateStatus(BarStatus *status) { 27 | strcpy(status->previous, status->current); 28 | status->current[0] = '\0'; 29 | 30 | for (int i = 0; i < blockCount; i++) { 31 | Block *block = blocks + i; 32 | 33 | if (strlen(block->output)) { 34 | #if LEADING_DELIMITER 35 | strcat(status->current, DELIMITER); 36 | #else 37 | if (status->current[0]) strcat(status->current, DELIMITER); 38 | #endif 39 | 40 | #if CLICKABLE_BLOCKS 41 | if (!debugMode && block->signal) { 42 | char signal[] = {block->signal, '\0'}; 43 | strcat(status->current, signal); 44 | } 45 | #endif 46 | 47 | strcat(status->current, block->output); 48 | } 49 | } 50 | return strcmp(status->current, status->previous); 51 | } 52 | 53 | void writeStatus(BarStatus *status) { 54 | // Only write out if status has changed 55 | if (!updateStatus(status)) return; 56 | 57 | if (debugMode) { 58 | printf("%s\n", status->current); 59 | return; 60 | } 61 | setXRootName(status->current); 62 | } 63 | -------------------------------------------------------------------------------- /.config/suckless/dwmblocks-async/src/block.c: -------------------------------------------------------------------------------- 1 | #include "block.h" 2 | 3 | #define _GNU_SOURCE 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "util.h" 10 | 11 | static int execLock = 0; 12 | 13 | void execBlock(const Block *block, const char *button) { 14 | unsigned short i = block - blocks; 15 | 16 | // Ensure only one child process exists per block at an instance 17 | if (execLock & 1 << i) return; 18 | // Lock execution of block until current instance finishes execution 19 | execLock |= 1 << i; 20 | 21 | if (fork() == 0) { 22 | close(block->pipe[0]); 23 | dup2(block->pipe[1], STDOUT_FILENO); 24 | close(block->pipe[1]); 25 | 26 | if (button) setenv("BLOCK_BUTTON", button, 1); 27 | 28 | FILE *file = popen(block->command, "r"); 29 | if (!file) { 30 | printf("\n"); 31 | exit(EXIT_FAILURE); 32 | } 33 | 34 | // Buffer will hold both '\n' and '\0' 35 | char buffer[LEN(block->output) + 1]; 36 | if (fgets(buffer, LEN(buffer), file) == NULL) { 37 | // Send an empty line in case of no output 38 | printf("\n"); 39 | exit(EXIT_SUCCESS); 40 | } 41 | pclose(file); 42 | 43 | // Trim to the max possible UTF-8 capacity 44 | trimUTF8(buffer, LEN(buffer)); 45 | 46 | printf("%s\n", buffer); 47 | exit(EXIT_SUCCESS); 48 | } 49 | } 50 | 51 | void execBlocks(unsigned int time) { 52 | for (int i = 0; i < blockCount; i++) { 53 | const Block *block = blocks + i; 54 | if (time == 0 || 55 | (block->interval != 0 && time % block->interval == 0)) { 56 | execBlock(block, NULL); 57 | } 58 | } 59 | } 60 | 61 | void updateBlock(Block *block) { 62 | char buffer[LEN(block->output)]; 63 | int bytesRead = read(block->pipe[0], buffer, LEN(buffer)); 64 | 65 | // String from pipe will always end with '\n' 66 | buffer[bytesRead - 1] = '\0'; 67 | 68 | strcpy(block->output, buffer); 69 | 70 | // Remove execution lock for the current block 71 | execLock &= ~(1 << (block - blocks)); 72 | } 73 | -------------------------------------------------------------------------------- /.config/suckless/dwmblocks-async/src/util.c: -------------------------------------------------------------------------------- 1 | #include "util.h" 2 | 3 | #include 4 | 5 | int gcd(int a, int b) { 6 | int temp; 7 | while (b > 0) { 8 | temp = a % b; 9 | a = b; 10 | b = temp; 11 | } 12 | return a; 13 | } 14 | 15 | void closePipe(int pipe[2]) { 16 | close(pipe[0]); 17 | close(pipe[1]); 18 | } 19 | 20 | void trimUTF8(char* buffer, unsigned int size) { 21 | int length = (size - 1) / 4; 22 | int count = 0, j = 0; 23 | char ch = buffer[j]; 24 | while (ch != '\0' && ch != '\n' && count < length) { 25 | // Skip continuation bytes, if any 26 | int skip = 1; 27 | while ((ch & 0xc0) > 0x80) { 28 | ch <<= 1; 29 | skip++; 30 | } 31 | 32 | j += skip; 33 | ch = buffer[j]; 34 | count++; 35 | } 36 | 37 | // Trim trailing newline and spaces 38 | buffer[j] = ' '; 39 | while (j >= 0 && buffer[j] == ' ') j--; 40 | buffer[j + 1] = '\0'; 41 | } 42 | -------------------------------------------------------------------------------- /.config/suckless/dwmblocks-async/src/x11.c: -------------------------------------------------------------------------------- 1 | #include "x11.h" 2 | 3 | #include 4 | 5 | static Display *display; 6 | static Window rootWindow; 7 | 8 | int setupX() { 9 | display = XOpenDisplay(NULL); 10 | if (!display) { 11 | return 1; 12 | } 13 | 14 | rootWindow = DefaultRootWindow(display); 15 | return 0; 16 | } 17 | 18 | int closeX() { 19 | return XCloseDisplay(display); 20 | } 21 | 22 | void setXRootName(char *str) { 23 | XStoreName(display, rootWindow, str); 24 | XFlush(display); 25 | } 26 | -------------------------------------------------------------------------------- /.config/suckless/slock/Makefile: -------------------------------------------------------------------------------- 1 | # slock - simple screen locker 2 | # See LICENSE file for copyright and license details. 3 | 4 | include config.mk 5 | 6 | SRC = slock.c ${COMPATSRC} 7 | OBJ = ${SRC:.c=.o} 8 | 9 | all: options slock 10 | 11 | options: 12 | @echo slock build options: 13 | @echo "CFLAGS = ${CFLAGS}" 14 | @echo "LDFLAGS = ${LDFLAGS}" 15 | @echo "CC = ${CC}" 16 | 17 | .c.o: 18 | @echo CC $< 19 | @${CC} -c ${CFLAGS} $< 20 | 21 | ${OBJ}: config.h config.mk arg.h util.h 22 | 23 | config.h: 24 | @echo creating $@ from config.def.h 25 | @cp config.def.h $@ 26 | 27 | slock: ${OBJ} 28 | @echo CC -o $@ 29 | @${CC} -o $@ ${OBJ} ${LDFLAGS} 30 | 31 | clean: 32 | @echo cleaning 33 | @rm -f slock ${OBJ} slock-${VERSION}.tar.gz 34 | 35 | dist: clean 36 | @echo creating dist tarball 37 | @mkdir -p slock-${VERSION} 38 | @cp -R LICENSE Makefile README slock.1 config.mk \ 39 | ${SRC} explicit_bzero.c config.def.h arg.h util.h slock-${VERSION} 40 | @tar -cf slock-${VERSION}.tar slock-${VERSION} 41 | @gzip slock-${VERSION}.tar 42 | @rm -rf slock-${VERSION} 43 | 44 | install: all 45 | @echo installing executable file to ${DESTDIR}${PREFIX}/bin 46 | @mkdir -p ${DESTDIR}${PREFIX}/bin 47 | @cp -f slock ${DESTDIR}${PREFIX}/bin 48 | @chmod 755 ${DESTDIR}${PREFIX}/bin/slock 49 | @chmod u+s ${DESTDIR}${PREFIX}/bin/slock 50 | @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1 51 | @mkdir -p ${DESTDIR}${MANPREFIX}/man1 52 | @sed "s/VERSION/${VERSION}/g" ${DESTDIR}${MANPREFIX}/man1/slock.1 53 | @chmod 644 ${DESTDIR}${MANPREFIX}/man1/slock.1 54 | rm config.h 55 | 56 | uninstall: 57 | @echo removing executable file from ${DESTDIR}${PREFIX}/bin 58 | @rm -f ${DESTDIR}${PREFIX}/bin/slock 59 | @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1 60 | @rm -f ${DESTDIR}${MANPREFIX}/man1/slock.1 61 | 62 | .PHONY: all options clean dist install uninstall 63 | -------------------------------------------------------------------------------- /.config/suckless/slock/arg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copy me if you can. 3 | * by 20h 4 | */ 5 | 6 | #ifndef ARG_H__ 7 | #define ARG_H__ 8 | 9 | extern char *argv0; 10 | 11 | /* use main(int argc, char *argv[]) */ 12 | #define ARGBEGIN for (argv0 = *argv, argv++, argc--;\ 13 | argv[0] && argv[0][0] == '-'\ 14 | && argv[0][1];\ 15 | argc--, argv++) {\ 16 | char argc_;\ 17 | char **argv_;\ 18 | int brk_;\ 19 | if (argv[0][1] == '-' && argv[0][2] == '\0') {\ 20 | argv++;\ 21 | argc--;\ 22 | break;\ 23 | }\ 24 | for (brk_ = 0, argv[0]++, argv_ = argv;\ 25 | argv[0][0] && !brk_;\ 26 | argv[0]++) {\ 27 | if (argv_ != argv)\ 28 | break;\ 29 | argc_ = argv[0][0];\ 30 | switch (argc_) 31 | 32 | /* Handles obsolete -NUM syntax */ 33 | #define ARGNUM case '0':\ 34 | case '1':\ 35 | case '2':\ 36 | case '3':\ 37 | case '4':\ 38 | case '5':\ 39 | case '6':\ 40 | case '7':\ 41 | case '8':\ 42 | case '9' 43 | 44 | #define ARGEND }\ 45 | } 46 | 47 | #define ARGC() argc_ 48 | 49 | #define ARGNUMF() (brk_ = 1, estrtonum(argv[0], 0, INT_MAX)) 50 | 51 | #define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\ 52 | ((x), abort(), (char *)0) :\ 53 | (brk_ = 1, (argv[0][1] != '\0')?\ 54 | (&argv[0][1]) :\ 55 | (argc--, argv++, argv[0]))) 56 | 57 | #define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\ 58 | (char *)0 :\ 59 | (brk_ = 1, (argv[0][1] != '\0')?\ 60 | (&argv[0][1]) :\ 61 | (argc--, argv++, argv[0]))) 62 | 63 | #define LNGARG() &argv[0][0] 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /.config/suckless/slock/config.def.h: -------------------------------------------------------------------------------- 1 | /* user and group to drop privileges to */ 2 | static const char *user = "aeon"; 3 | static const char *group = "power"; 4 | 5 | static const char *colorname[NUMCOLS] = { 6 | [INIT] = "#000000", /* after initialization */ 7 | [INPUT] = "#282c34", /* during input */ 8 | [FAILED] = "#be5046", /* wrong password */ 9 | }; 10 | 11 | /* lock screen opacity */ 12 | static const float alpha = 0.5; 13 | 14 | /* treat a cleared input like a wrong password (color) */ 15 | static const int failonclear = 1; 16 | 17 | /* default message */ 18 | static const char * message = "Enter password to unlock"; 19 | 20 | /* text color */ 21 | static const char * text_color = "#abb2bf"; 22 | 23 | /* text size (must be a valid size) */ 24 | static const char * text_size = "fixed"; 25 | -------------------------------------------------------------------------------- /.config/suckless/slock/config.mk: -------------------------------------------------------------------------------- 1 | # slock version 2 | VERSION = 1.4 3 | 4 | # Customize below to fit your system 5 | 6 | # paths 7 | PREFIX = /usr/local 8 | MANPREFIX = ${PREFIX}/share/man 9 | 10 | X11INC = /usr/X11R6/include 11 | X11LIB = /usr/X11R6/lib 12 | 13 | # includes and libs 14 | INCS = -I. -I/usr/include -I${X11INC} 15 | LIBS = -L/usr/lib -lc -lcrypt -L${X11LIB} -lX11 -lXext -lXrandr 16 | 17 | # flags 18 | CPPFLAGS = -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE -DHAVE_SHADOW_H 19 | CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS} 20 | LDFLAGS = -s ${LIBS} 21 | COMPATSRC = explicit_bzero.c 22 | 23 | # On OpenBSD and Darwin remove -lcrypt from LIBS 24 | #LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXext -lXrandr 25 | # On *BSD remove -DHAVE_SHADOW_H from CPPFLAGS 26 | # On NetBSD add -D_NETBSD_SOURCE to CPPFLAGS 27 | #CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_NETBSD_SOURCE 28 | # On OpenBSD set COMPATSRC to empty 29 | #COMPATSRC = 30 | 31 | # compiler and linker 32 | CC = cc 33 | -------------------------------------------------------------------------------- /.config/suckless/slock/explicit_bzero.c: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: explicit_bzero.c,v 1.3 2014/06/21 02:34:26 matthew Exp $ */ 2 | /* 3 | * Public domain. 4 | * Written by Matthew Dempsky. 5 | */ 6 | 7 | #include 8 | 9 | __attribute__((weak)) void 10 | __explicit_bzero_hook(void *buf, size_t len) 11 | { 12 | } 13 | 14 | void 15 | explicit_bzero(void *buf, size_t len) 16 | { 17 | memset(buf, 0, len); 18 | __explicit_bzero_hook(buf, len); 19 | } 20 | -------------------------------------------------------------------------------- /.config/suckless/slock/explicit_bzero.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/suckless/slock/explicit_bzero.o -------------------------------------------------------------------------------- /.config/suckless/slock/slock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/suckless/slock/slock -------------------------------------------------------------------------------- /.config/suckless/slock/slock.1: -------------------------------------------------------------------------------- 1 | .Dd 2016-08-23 2 | .Dt SLOCK 1 3 | .Sh NAME 4 | .Nm slock 5 | .Nd simple X screen locker 6 | .Sh SYNOPSIS 7 | .Nm 8 | .Op Fl v 9 | .Op Fl m Ar message 10 | .Op Ar cmd Op Ar arg ... 11 | .Sh DESCRIPTION 12 | .Nm 13 | is a simple X screen locker. If provided, 14 | .Ar cmd Op Ar arg ... 15 | is executed after the screen has been locked. 16 | .Sh OPTIONS 17 | .Bl -tag -width Ds 18 | .It Fl v 19 | Print version information to stdout and exit. 20 | .It Fl m Ar message 21 | Overrides default slock lock message. 22 | .TP 23 | .El 24 | .Sh SECURITY CONSIDERATIONS 25 | To make sure a locked screen can not be bypassed by switching VTs 26 | or killing the X server with Ctrl+Alt+Backspace, it is recommended 27 | to disable both in 28 | .Xr xorg.conf 5 29 | for maximum security: 30 | .Bd -literal -offset left 31 | Section "ServerFlags" 32 | Option "DontVTSwitch" "True" 33 | Option "DontZap" "True" 34 | EndSection 35 | .Ed 36 | .Sh EXAMPLES 37 | $ 38 | .Nm 39 | /usr/sbin/s2ram 40 | .Sh CUSTOMIZATION 41 | .Nm 42 | can be customized by creating a custom config.h from config.def.h and 43 | (re)compiling the source code. This keeps it fast, secure and simple. 44 | -------------------------------------------------------------------------------- /.config/suckless/slock/slock.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/suckless/slock/slock.o -------------------------------------------------------------------------------- /.config/suckless/slock/util.h: -------------------------------------------------------------------------------- 1 | #undef explicit_bzero 2 | void explicit_bzero(void *, size_t); 3 | -------------------------------------------------------------------------------- /.config/suckless/st/Makefile: -------------------------------------------------------------------------------- 1 | # st - simple terminal 2 | # See LICENSE file for copyright and license details. 3 | .POSIX: 4 | 5 | include config.mk 6 | 7 | SRC = st.c x.c boxdraw.c 8 | OBJ = $(SRC:.c=.o) 9 | 10 | all: options st 11 | 12 | options: 13 | @echo st build options: 14 | @echo "CFLAGS = $(STCFLAGS)" 15 | @echo "LDFLAGS = $(STLDFLAGS)" 16 | @echo "CC = $(CC)" 17 | 18 | config.h: 19 | cp config.def.h config.h 20 | 21 | .c.o: 22 | $(CC) $(STCFLAGS) -c $< 23 | 24 | st.o: config.h st.h win.h 25 | x.o: arg.h config.h st.h win.h 26 | boxdraw.o: config.h st.h boxdraw_data.h 27 | 28 | $(OBJ): config.h config.mk 29 | 30 | st: $(OBJ) 31 | $(CC) -o $@ $(OBJ) $(STLDFLAGS) 32 | 33 | clean: 34 | rm -f st $(OBJ) st-$(VERSION).tar.gz *.orig *.rej config.h 35 | 36 | dist: clean 37 | mkdir -p st-$(VERSION) 38 | cp -R FAQ LEGACY TODO LICENSE Makefile README config.mk\ 39 | config.def.h st.info st.1 arg.h st.h win.h $(SRC)\ 40 | st-$(VERSION) 41 | tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz 42 | rm -rf st-$(VERSION) 43 | 44 | install: st 45 | mkdir -p $(DESTDIR)$(PREFIX)/bin 46 | cp -f st $(DESTDIR)$(PREFIX)/bin 47 | chmod 755 $(DESTDIR)$(PREFIX)/bin/st 48 | mkdir -p $(DESTDIR)$(MANPREFIX)/man1 49 | sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1 50 | chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1 51 | tic -sx st.info 52 | mkdir -p $(DESTDIR)$(APPPREFIX) 53 | cp -f st.desktop $(DESTDIR)$(APPPREFIX) 54 | mkdir -p $(DESTDIR)$(ICONPREFIX) 55 | [ -f $(ICONNAME) ] && cp -f $(ICONNAME) $(DESTDIR)$(ICONPREFIX) || : 56 | rm config.h *.o 57 | 58 | uninstall: 59 | rm -f $(DESTDIR)$(PREFIX)/bin/st 60 | rm -f $(DESTDIR)$(APPPREFIX)/st.desktop 61 | rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1 62 | rm -f $(DESTDIR)$(ICONPREFIX)/$(ICONNAME) 63 | 64 | .PHONY: all options clean dist install uninstall 65 | 66 | -------------------------------------------------------------------------------- /.config/suckless/st/arg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copy me if you can. 3 | * by 20h 4 | */ 5 | 6 | #ifndef ARG_H__ 7 | #define ARG_H__ 8 | 9 | extern char *argv0; 10 | 11 | /* use main(int argc, char *argv[]) */ 12 | #define ARGBEGIN for (argv0 = *argv, argv++, argc--;\ 13 | argv[0] && argv[0][0] == '-'\ 14 | && argv[0][1];\ 15 | argc--, argv++) {\ 16 | char argc_;\ 17 | char **argv_;\ 18 | int brk_;\ 19 | if (argv[0][1] == '-' && argv[0][2] == '\0') {\ 20 | argv++;\ 21 | argc--;\ 22 | break;\ 23 | }\ 24 | int i_;\ 25 | for (i_ = 1, brk_ = 0, argv_ = argv;\ 26 | argv[0][i_] && !brk_;\ 27 | i_++) {\ 28 | if (argv_ != argv)\ 29 | break;\ 30 | argc_ = argv[0][i_];\ 31 | switch (argc_) 32 | 33 | #define ARGEND }\ 34 | } 35 | 36 | #define ARGC() argc_ 37 | 38 | #define EARGF(x) ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\ 39 | ((x), abort(), (char *)0) :\ 40 | (brk_ = 1, (argv[0][i_+1] != '\0')?\ 41 | (&argv[0][i_+1]) :\ 42 | (argc--, argv++, argv[0]))) 43 | 44 | #define ARGF() ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\ 45 | (char *)0 :\ 46 | (brk_ = 1, (argv[0][i_+1] != '\0')?\ 47 | (&argv[0][i_+1]) :\ 48 | (argc--, argv++, argv[0]))) 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /.config/suckless/st/config.mk: -------------------------------------------------------------------------------- 1 | # st version 2 | VERSION = 0.9 3 | 4 | # Customize below to fit your system 5 | 6 | # paths 7 | PREFIX = /usr/local 8 | APPPREFIX = $(PREFIX)/share/applications 9 | MANPREFIX = $(PREFIX)/share/man 10 | ICONPREFIX = $(PREFIX)/share/pixmaps 11 | ICONNAME = st.png 12 | 13 | X11INC = /usr/X11R6/include 14 | X11LIB = /usr/X11R6/lib 15 | 16 | PKG_CONFIG = pkg-config 17 | 18 | # includes and libs 19 | INCS = -I$(X11INC) \ 20 | `$(PKG_CONFIG) --cflags fontconfig` \ 21 | `$(PKG_CONFIG) --cflags freetype2` 22 | LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft -lgd \ 23 | `$(PKG_CONFIG) --libs fontconfig` \ 24 | `$(PKG_CONFIG) --libs freetype2` 25 | 26 | # flags 27 | STCPPFLAGS = -DVERSION=\"$(VERSION)\" -DICON=\"$(ICONPREFIX)/$(ICONNAME)\" -D_XOPEN_SOURCE=600 28 | STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS) 29 | STLDFLAGS = $(LIBS) $(LDFLAGS) 30 | 31 | # OpenBSD: 32 | #CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 -D_BSD_SOURCE 33 | #LIBS = -L$(X11LIB) -lm -lX11 -lutil -lXft \ 34 | # `$(PKG_CONFIG) --libs fontconfig` \ 35 | # `$(PKG_CONFIG) --libs freetype2` 36 | #MANPREFIX = ${PREFIX}/man 37 | 38 | # compiler and linker 39 | # CC = c99 40 | -------------------------------------------------------------------------------- /.config/suckless/st/patches/desktopentry.diff: -------------------------------------------------------------------------------- 1 | From af28f9df9b0194311c25d60a22d1ecd98bfad2e7 Mon Sep 17 00:00:00 2001 2 | From: aleks 3 | Date: Tue, 31 May 2022 00:33:38 +0200 4 | Subject: [PATCH] Create a desktop-entry for st 5 | 6 | Enables to find st in a graphical menu and to display it with a nice 7 | icon. 8 | 9 | If some applications still are not displaying an icon for st try the patch 10 | [netwmicon](../netwmicon/). Programs like tint2 and alttab rely on a hardcoded 11 | icon which has to be stored by st in the \_NET\_WM\_ICON window-property. 12 | --- 13 | Makefile | 3 +++ 14 | config.mk | 1 + 15 | st.desktop | 12 ++++++++++++ 16 | 3 files changed, 16 insertions(+) 17 | create mode 100644 st.desktop 18 | 19 | diff --git a/Makefile b/Makefile 20 | index 470ac86..2121877 100644 21 | --- a/Makefile 22 | +++ b/Makefile 23 | @@ -49,9 +49,12 @@ install: st 24 | chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1 25 | tic -sx st.info 26 | @echo Please see the README file regarding the terminfo entry of st. 27 | + mkdir -p $(DESTDIR)$(APPPREFIX) 28 | + cp -f st.desktop $(DESTDIR)$(APPPREFIX) 29 | 30 | uninstall: 31 | rm -f $(DESTDIR)$(PREFIX)/bin/st 32 | + rm -f $(DESTDIR)$(APPPREFIX)/st.desktop 33 | rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1 34 | 35 | .PHONY: all options clean dist install uninstall 36 | diff --git a/config.mk b/config.mk 37 | index 4c4c5d5..b79c517 100644 38 | --- a/config.mk 39 | +++ b/config.mk 40 | @@ -5,6 +5,7 @@ VERSION = 0.8.5 41 | 42 | # paths 43 | PREFIX = /usr/local 44 | +APPPREFIX = $(PREFIX)/share/applications 45 | MANPREFIX = $(PREFIX)/share/man 46 | 47 | X11INC = /usr/X11R6/include 48 | diff --git a/st.desktop b/st.desktop 49 | new file mode 100644 50 | index 0000000..2d2b76f 51 | --- /dev/null 52 | +++ b/st.desktop 53 | @@ -0,0 +1,12 @@ 54 | +[Desktop Entry] 55 | +Type=Application 56 | +Exec=st 57 | +TryExec=st 58 | +Icon=utilities-terminal 59 | +Terminal=false 60 | +Categories=System;TerminalEmulator; 61 | + 62 | +Name=st 63 | +GenericName=Terminal 64 | +Comment=st is a simple terminal implementation for X 65 | +StartupWMClass=st-256color 66 | -- 67 | 2.36.1 68 | 69 | -------------------------------------------------------------------------------- /.config/suckless/st/patches/patch_column.diff: -------------------------------------------------------------------------------- 1 | diff --git a/st-0.8.4/st.c b/st-0.8.4/st.c 2 | index e268ffc..20c7929 100644 3 | --- a/st-0.8.4/st.c 4 | +++ b/st-0.8.4/st.c 5 | @@ -118,6 +118,7 @@ typedef struct { 6 | typedef struct { 7 | int row; /* nb row */ 8 | int col; /* nb col */ 9 | + int maxcol; 10 | Line *line; /* screen */ 11 | Line *alt; /* alternate screen */ 12 | Line hist[HISTSIZE]; /* history buffer */ 13 | @@ -1300,8 +1301,8 @@ tclearregion(int x1, int y1, int x2, int y2) 14 | if (y1 > y2) 15 | temp = y1, y1 = y2, y2 = temp; 16 | 17 | - LIMIT(x1, 0, term.col-1); 18 | - LIMIT(x2, 0, term.col-1); 19 | + LIMIT(x1, 0, term.maxcol-1); 20 | + LIMIT(x2, 0, term.maxcol-1); 21 | LIMIT(y1, 0, term.row-1); 22 | LIMIT(y2, 0, term.row-1); 23 | 24 | @@ -2579,11 +2580,18 @@ void 25 | tresize(int col, int row) 26 | { 27 | int i, j; 28 | - int minrow = MIN(row, term.row); 29 | - int mincol = MIN(col, term.col); 30 | + int tmp; 31 | + int minrow, mincol; 32 | int *bp; 33 | TCursor c; 34 | 35 | + tmp = col; 36 | + if (!term.maxcol) 37 | + term.maxcol = term.col; 38 | + col = MAX(col, term.maxcol); 39 | + minrow = MIN(row, term.row); 40 | + mincol = MIN(col, term.maxcol); 41 | + 42 | if (col < 1 || row < 1) { 43 | fprintf(stderr, 44 | "tresize: error resizing to %dx%d\n", col, row); 45 | @@ -2634,17 +2642,18 @@ tresize(int col, int row) 46 | term.line[i] = xmalloc(col * sizeof(Glyph)); 47 | term.alt[i] = xmalloc(col * sizeof(Glyph)); 48 | } 49 | - if (col > term.col) { 50 | - bp = term.tabs + term.col; 51 | + if (col > term.maxcol) { 52 | + bp = term.tabs + term.maxcol; 53 | 54 | - memset(bp, 0, sizeof(*term.tabs) * (col - term.col)); 55 | + memset(bp, 0, sizeof(*term.tabs) * (col - term.maxcol)); 56 | while (--bp > term.tabs && !*bp) 57 | /* nothing */ ; 58 | for (bp += tabspaces; bp < term.tabs + col; bp += tabspaces) 59 | *bp = 1; 60 | } 61 | /* update terminal size */ 62 | - term.col = col; 63 | + term.col = tmp; 64 | + term.maxcol = col; 65 | term.row = row; 66 | /* reset scrolling region */ 67 | tsetscroll(0, row-1); 68 | -------------------------------------------------------------------------------- /.config/suckless/st/patches/scrollback-mouse.diff: -------------------------------------------------------------------------------- 1 | From b5d3351a21442a842e01e8c0317603b6890b379c Mon Sep 17 00:00:00 2001 2 | From: asparagii 3 | Date: Thu, 27 Jan 2022 15:44:02 +0100 4 | Subject: [PATCH] st-scrollback-mouse 5 | 6 | --- 7 | config.def.h | 2 ++ 8 | 1 file changed, 2 insertions(+) 9 | 10 | diff --git a/config.def.h b/config.def.h 11 | index e3b469b..c217315 100644 12 | --- a/config.def.h 13 | +++ b/config.def.h 14 | @@ -176,6 +176,8 @@ static uint forcemousemod = ShiftMask; 15 | */ 16 | static MouseShortcut mshortcuts[] = { 17 | /* mask button function argument release */ 18 | + { ShiftMask, Button4, kscrollup, {.i = 1} }, 19 | + { ShiftMask, Button5, kscrolldown, {.i = 1} }, 20 | { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, 21 | { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} }, 22 | { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, 23 | -- 24 | 2.34.1 25 | 26 | -------------------------------------------------------------------------------- /.config/suckless/st/st: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/suckless/st/st -------------------------------------------------------------------------------- /.config/suckless/st/st.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Exec=st 4 | TryExec=st 5 | Icon=st 6 | Terminal=false 7 | Categories=System;TerminalEmulator; 8 | 9 | Name=st 10 | GenericName=Terminal 11 | Comment=st is a simple terminal implementation for X 12 | StartupWMClass=st-256color 13 | -------------------------------------------------------------------------------- /.config/suckless/st/st.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/suckless/st/st.png -------------------------------------------------------------------------------- /.config/suckless/st/win.h: -------------------------------------------------------------------------------- 1 | /* See LICENSE for license details. */ 2 | 3 | enum win_mode { 4 | MODE_VISIBLE = 1 << 0, 5 | MODE_FOCUSED = 1 << 1, 6 | MODE_APPKEYPAD = 1 << 2, 7 | MODE_MOUSEBTN = 1 << 3, 8 | MODE_MOUSEMOTION = 1 << 4, 9 | MODE_REVERSE = 1 << 5, 10 | MODE_KBDLOCK = 1 << 6, 11 | MODE_HIDE = 1 << 7, 12 | MODE_APPCURSOR = 1 << 8, 13 | MODE_MOUSESGR = 1 << 9, 14 | MODE_8BIT = 1 << 10, 15 | MODE_BLINK = 1 << 11, 16 | MODE_FBLINK = 1 << 12, 17 | MODE_FOCUS = 1 << 13, 18 | MODE_MOUSEX10 = 1 << 14, 19 | MODE_MOUSEMANY = 1 << 15, 20 | MODE_BRCKTPASTE = 1 << 16, 21 | MODE_NUMLOCK = 1 << 17, 22 | MODE_MOUSE = MODE_MOUSEBTN|MODE_MOUSEMOTION|MODE_MOUSEX10\ 23 | |MODE_MOUSEMANY, 24 | }; 25 | 26 | void xbell(void); 27 | void xclipcopy(void); 28 | void xdrawcursor(int, int, Glyph, int, int, Glyph); 29 | void xdrawline(Line, int, int, int); 30 | void xfinishdraw(void); 31 | void xloadcols(void); 32 | int xsetcolorname(int, const char *); 33 | int xgetcolor(int, unsigned char *, unsigned char *, unsigned char *); 34 | void xseticontitle(char *); 35 | void xsettitle(char *); 36 | int xsetcursor(int); 37 | void xsetmode(int, unsigned int); 38 | void xsetpointermotion(int); 39 | void xsetsel(char *); 40 | int xstartdraw(void); 41 | void xximspot(int, int); 42 | -------------------------------------------------------------------------------- /.config/sxiv/exec/key-handler: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | is_process_running() { 4 | pgrep -x "$1" >/dev/null 5 | } 6 | 7 | if is_process_running "dwm"; then 8 | window_manager="dwm" 9 | elif is_process_running "awesome"; then 10 | window_manager="awesome" 11 | else 12 | window_manager="unknown" 13 | fi 14 | 15 | while read file 16 | do 17 | case "$1" in 18 | "w") 19 | wal -i "$file" 20 | sed -i ~/.Xresources -re '1,1000d' 21 | cat ~/.cache/wal/colors.Xresources >> ~/.Xresources 22 | oomox-cli /opt/oomox/scripted_colors/xresources/xresources-reverse 23 | betterlockscreen -u "$file" 24 | wal-telegram -t 25 | pywalfox update 26 | killall dunst && dunst & 27 | 28 | if [ "$window_manager" = "dwm" ]; then 29 | killall dwm 30 | killall dwmblocks 31 | dwmblocks & 32 | elif [ "$window_manager" = "awesome" ]; then 33 | pkill -HUP awesome 34 | picom --experimental-backends 35 | fi 36 | 37 | pkill sxiv 38 | notify-send "Enjoy your new colorscheme!" 39 | ;; 40 | 41 | "y") 42 | xclip -selection clipboard "$file" -t image/png && 43 | notify-send "$file copied to clipboard!" 44 | esac 45 | done 46 | -------------------------------------------------------------------------------- /.config/user-dirs.dirs: -------------------------------------------------------------------------------- 1 | # This file is written by xdg-user-dirs-update 2 | # If you want to change or add directories, just edit the line you're 3 | # interested in. All local changes will be retained on the next run. 4 | # Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped 5 | # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an 6 | # absolute path. No other format is supported. 7 | # 8 | XDG_DESKTOP_DIR="$HOME/Desktop" 9 | XDG_DOWNLOAD_DIR="$HOME/Downloads" 10 | XDG_DOCUMENTS_DIR="$HOME/Documents" 11 | XDG_MUSIC_DIR="$HOME/Music" 12 | XDG_PICTURES_DIR="$HOME/Pictures" 13 | XDG_VIDEOS_DIR="$HOME/Videos" 14 | XDG_TEMPLATES_DIR="$HOME/" 15 | XDG_PUBLICSHARE_DIR="$HOME/" 16 | -------------------------------------------------------------------------------- /.config/wal/templates/flameshot.ini: -------------------------------------------------------------------------------- 1 | [General] 2 | contrastOpacity=188 3 | contrastUiColor="{color1}" 4 | drawColor="{color4}" 5 | savePath=/home/aeon 6 | showDesktopNotification=false 7 | showHelp=false 8 | showStartupLaunchMessage=false 9 | uiColor="{color4}" 10 | -------------------------------------------------------------------------------- /.config/wal/templates/zathurarc: -------------------------------------------------------------------------------- 1 | ### Settings from original zathurarc ### 2 | set statusbar-h-padding 0 3 | set statusbar-v-padding 0 4 | map r reload 5 | # map i color 6 | map w toggle_page_mode 7 | 8 | ### zathura-pywal ### 9 | # Allow recolor 10 | set recolor 'true' 11 | 12 | # Don't allow original hue when recoloring 13 | set recolor-keephue 'false' 14 | 15 | # Don't keep original image colors while recoloring 16 | set recolor-reverse-video 'false' 17 | 18 | # Command line completion entries 19 | set completion-fg "{foreground}" 20 | set completion-bg "{background}" 21 | 22 | # Command line completion group elements 23 | set completion-group-fg "{color13}" 24 | set completion-group-bg "{background}" 25 | 26 | # Current command line completion element 27 | set completion-highlight-fg "{background}" 28 | set completion-highlight-bg "{foreground}" 29 | 30 | # Default foreground/background color 31 | set default-bg rgba(16,19,22,1) 32 | 33 | # Input bar 34 | set inputbar-fg "{foreground}" 35 | set inputbar-bg "{background}" 36 | 37 | # Notification 38 | set notification-fg "{foreground}" 39 | set notification-bg "{background}" 40 | 41 | # Error notification 42 | set notification-error-fg "{foreground}" 43 | set notification-error-bg "{color14}" 44 | 45 | # Warning notification 46 | set notification-warning-fg "{foreground}" 47 | set notification-warning-bg "{color14}" 48 | 49 | # Tab - TODO 50 | # set tabbar-fg 51 | # set tabbar-bg 52 | 53 | # Focused tab - TODO 54 | # set tabbar-focus-fg 55 | # set tabbar-focus-bg 56 | 57 | # Status bar 58 | set statusbar-fg "{foreground}" 59 | set statusbar-bg "{background}" 60 | 61 | # Highlighting parts of the document (e.g. show search results) 62 | set highlight-color "{color13}" 63 | set highlight-active-color "{color13}" 64 | 65 | # Represent light/dark colors in recoloring mode 66 | set recolor-lightcolor rgba(0,0,0,0) 67 | set recolor-darkcolor "{foreground}" 68 | 69 | # 'Loading...' text 70 | set render-loading-fg "{foreground}" 71 | set render-loading-bg "{background}" 72 | 73 | # Index mode 74 | set index-fg "{foreground}" 75 | set index-bg "{background}" 76 | 77 | # Selected element in index mode 78 | set index-active-fg "{foreground}" 79 | set index-active-bg "{background}" 80 | -------------------------------------------------------------------------------- /.config/xmenu/Makefile: -------------------------------------------------------------------------------- 1 | # program name 2 | PROG = xmenu 3 | 4 | # paths 5 | PREFIX ?= /usr/local 6 | MANPREFIX ?= ${PREFIX}/share/man 7 | LOCALINC ?= /usr/local/include 8 | LOCALLIB ?= /usr/local/lib 9 | X11INC ?= /usr/X11R6/include 10 | X11LIB ?= /usr/X11R6/lib 11 | FREETYPEINC ?= /usr/include/freetype2 12 | # OpenBSD (uncomment) 13 | #FREETYPEINC = ${X11INC}/freetype2 14 | 15 | # includes and libs 16 | INCS += -I${LOCALINC} -I${X11INC} -I${FREETYPEINC} 17 | LIBS += -L${LOCALLIB} -L${X11LIB} -lfontconfig -lXft -lX11 -lXinerama -lImlib2 18 | 19 | # flags 20 | CFLAGS += ${DEBUG} -Wall -Wextra ${INCS} ${CPPFLAGS} 21 | LDFLAGS += ${LIBS} 22 | 23 | # compiler and linker 24 | CC = cc 25 | 26 | bindir = ${DESTDIR}${PREFIX} 27 | mandir = ${DESTDIR}${MANPREFIX} 28 | 29 | SRCS = ${PROG}.c 30 | OBJS = ${SRCS:.c=.o} 31 | 32 | all: ${PROG} 33 | 34 | ${PROG}: ${OBJS} 35 | ${CC} -o $@ ${OBJS} ${LDFLAGS} 36 | 37 | ${OBJS}: config.h 38 | 39 | .c.o: 40 | ${CC} ${CFLAGS} -c $< 41 | 42 | clean: 43 | -rm ${OBJS} ${PROG} 44 | 45 | install: all 46 | mkdir -p ${bindir}/bin 47 | install -m 755 ${PROG} ${bindir}/bin/${PROG} 48 | mkdir -p ${mandir}/man1 49 | install -m 644 ${PROG}.1 ${mandir}/man1/${PROG}.1 50 | 51 | uninstall: 52 | rm -f ${bindir}/bin/${PROG} 53 | rm -f ${mandir}/man1/${PROG}.1 54 | 55 | .PHONY: all clean install uninstall 56 | -------------------------------------------------------------------------------- /.config/xmenu/xmenu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/xmenu/xmenu -------------------------------------------------------------------------------- /.config/xmenu/xmenu.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/xmenu/xmenu.o -------------------------------------------------------------------------------- /.config/xsettingsd/xsettingsd.conf: -------------------------------------------------------------------------------- 1 | Xft/RGBA "rgb" 2 | Xft/lcdfilter "lcddefault" 3 | Xft/HintStyle "hintslight" 4 | Xft/Hinting 1 5 | Xft/AutoHint 0 6 | Xft/Antialias 1 7 | Gtk/FontName "Cantarell 11" 8 | Gtk/ToolbarStyle "Icons" 9 | Gtk/ToolbarIconSize "LARGE_TOOLBAR" 10 | Gtk/MenuImages 1 11 | Gtk/ButtonImages 0 12 | Gtk/CursorThemeName "Adwaita" 13 | Gtk/CursorSize 28 14 | Gtk/OverlayScrolling 1 15 | Gtk/DecorationLayout ":" 16 | Net/CursorBlink 1 17 | Net/CursorBlinkTime 1200 18 | Net/EnableEventSounds 1 19 | Net/IconThemeName "Archdroid-Grey" 20 | Net/ThemeName "oomox-xresources-reverse" 21 | -------------------------------------------------------------------------------- /.config/zathura/.gitignore: -------------------------------------------------------------------------------- 1 | zathurarc.bak 2 | -------------------------------------------------------------------------------- /.config/zathura/zathurarc: -------------------------------------------------------------------------------- 1 | /home/aeon/.cache/wal/zathurarc -------------------------------------------------------------------------------- /.config/zsh/.zprofile: -------------------------------------------------------------------------------- 1 | export PATH="$HOME/.local/bin:$PATH" 2 | export PATH="$HOME/.local/bin/statusbar:$PATH" 3 | startx 4 | -------------------------------------------------------------------------------- /.config/zsh/.zshrc: -------------------------------------------------------------------------------- 1 | # Set the path of Oh-My-Zsh installation directory 2 | export ZSH="$HOME/.config/.oh-my-zsh" 3 | 4 | # Set zsh theme 5 | ZSH_THEME="lambda" 6 | 7 | # Set the auto update mode and frequency for Oh-My-Zsh 8 | zstyle ':omz:update' mode auto 9 | zstyle ':omz:update' frequency 13 10 | 11 | # Enable autocorrection of mistyped commands 12 | ENABLE_CORRECTION="true" 13 | 14 | # Set the path to the custom directory for Zsh configuration 15 | ZSH_CUSTOM=~/.config/zsh 16 | 17 | # Set the plugins to be used in the terminal 18 | plugins=(git sudo) 19 | 20 | # Load the Oh-My-Zsh shell script 21 | source $ZSH/oh-my-zsh.sh 22 | 23 | # Set the display to use X11 protocol 24 | export DISPLAY=:0 25 | 26 | # Set the path of the history file for Zsh 27 | export HISTFILE=~/.cache/.zsh_history 28 | 29 | # Set the maximum size of the history file 30 | export HISTSIZE=10000 31 | 32 | # Set the maximum number of commands to be saved in the history file 33 | export SAVEHIST=10000 34 | 35 | # Set the list of commands to be ignored in the history 36 | export HISTORY_IGNORE="(ls|ls -a|cd|clear|pwd|exit|cd -|cd ..)" 37 | 38 | # Enable ignoring duplicate commands in the history 39 | setopt HIST_IGNORE_ALL_DUPS 40 | 41 | # Enable finding and skipping duplicate commands in the history 42 | setopt HIST_FIND_NO_DUPS 43 | 44 | # Load plugins 45 | source $HOME/.config/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 46 | source $HOME/.config/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 47 | source $HOME/.config/zsh/plugins/zsh-autopair/autopair.plugin.zsh 48 | 49 | # Bind the forward and backward word keys 50 | bindkey "^[[1;5C" forward-word 51 | bindkey "^[[1;5D" backward-word 52 | 53 | # Define some commonly used aliases 54 | alias ls="exa --icons --group-directories-first" 55 | alias cp="cp -iv" 56 | alias mv='mv -iv' 57 | alias rm='rm -iv' 58 | alias c="clear" 59 | alias syu="sudo pacman -Syu && kill -42 $(pidof dwmblocks)" 60 | alias s="sudo pacman -S" 61 | alias ss="pacman -Ss" 62 | alias r="sudo pacman -Rsn" 63 | alias ys="yay -S" 64 | alias yss="yay -Ss" 65 | alias zshrc="nvim ~/.config/zsh/.zshrc" 66 | alias vim="nvim" 67 | alias yt-best="yt-dlp --extract-audio --audio-format best " 68 | alias yt-mp3="yt-dlp --extract-audio --audio-format mp3 " 69 | alias ytb-best="yt-dlp -f bestvideo+bestaudio " 70 | 71 | # Define a function to upload files 72 | upload() { curl -F"file=@$1" https://envs.sh ; } 73 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/.fast-read-ini-file: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2018 Sebastian Gniazdowski 2 | # 3 | # $1 - path to the ini file to parse 4 | # $2 - name of output hash (INI by default) 5 | # $3 - prefix for keys in the hash (can be empty) 6 | # 7 | # Writes to given hash under keys built in following way: ${3}
_field. 8 | # Values are values from ini file. 9 | 10 | local __ini_file="$1" __out_hash="${2:-INI}" __key_prefix="$3" 11 | local IFS='' __line __cur_section="void" __access_string 12 | local -a match mbegin mend 13 | 14 | [[ ! -r "$__ini_file" ]] && { builtin print -r "fast-syntax-highlighting: an ini file is unreadable ($__ini_file)"; return 1; } 15 | 16 | while read -r -t 1 __line; do 17 | if [[ "$__line" = [[:blank:]]#\;* ]]; then 18 | continue 19 | elif [[ "$__line" = (#b)[[:blank:]]#\[([^\]]##)\][[:blank:]]# ]]; then 20 | __cur_section="${match[1]}" 21 | elif [[ "$__line" = (#b)[[:blank:]]#([^[:blank:]=]##)[[:blank:]]#[=][[:blank:]]#(*) ]]; then 22 | match[2]="${match[2]%"${match[2]##*[! $'\t']}"}" # remove trailing whitespace 23 | __access_string="${__out_hash}[${__key_prefix}<$__cur_section>_${match[1]}]" 24 | : "${(P)__access_string::=${match[2]}}" 25 | fi 26 | done < "$__ini_file" 27 | 28 | return 0 29 | 30 | # vim:ft=zsh:sw=4:sts=4:et 31 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/.fast-run-command: -------------------------------------------------------------------------------- 1 | # -*- mode: sh; sh-indentation: 4; indent-tabs-mode: nil; sh-basic-offset: 4; -*- 2 | # Copyright (c) 2018 Sebastian Gniazdowski 3 | # 4 | # FAST_HIGHLIGHT hash serves as container for variables that 5 | # prevents creating them in global scope. (P) flag is not used, 6 | # output array is fixed (__lines_list). 7 | # 8 | # $1 - the command, e.g. "git remote"; 2>/dev/null redirection is 9 | # added automatically 10 | # $2 - FAST_HIGHLIGHT field name, e.g. "chroma-git-branches"; two 11 | # additional fields will be used, $2-cache, $2-cache-born-at 12 | # $3 - what to remove from beginning of the lines returned by the 13 | # command 14 | # $4 - cache validity time, default 5 (seconds) 15 | # 16 | # Output: array __lines_list, with output of the command ran 17 | 18 | # User should not forget to define this array, the below code 19 | # will only ensure that it's array (can also define a global) 20 | typeset -ga __lines_list 21 | local -a __response 22 | 23 | if [[ -z "${FAST_HIGHLIGHT[$2-cache]}" || $(( EPOCHSECONDS - FAST_HIGHLIGHT[$2-cache-born-at] )) -gt ${4:-5} ]]; then 24 | FAST_HIGHLIGHT[$2-cache-born-at]="$EPOCHSECONDS" 25 | __response=( ${${(f)"$(command ${(Qz)1#+} 2>/dev/null)"}#${~3}} ) 26 | [[ "$1" = "+"* ]] && __lines_list+=( "${__response[@]}" ) || __lines_list=( "${__response[@]}" ) 27 | FAST_HIGHLIGHT[$2-cache]="${(j:;:)__response}" 28 | else 29 | # Quoted (s:;:) flag without @ will skip empty elements. It 30 | # still produces array output, interesingly. All this is for 31 | # the trailing ";" above, to skip last, empty element. 32 | [[ "$1" = "+"* ]] && \ 33 | __lines_list+=( "${(@s:;:)FAST_HIGHLIGHT[$2-cache]}" ) || \ 34 | __lines_list=( "${(@s:;:)FAST_HIGHLIGHT[$2-cache]}" ) 35 | fi 36 | 37 | # vim:ft=zsh:et:sw=4 38 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/.fast-zts-read-all: -------------------------------------------------------------------------------- 1 | # $1 - file-descriptor to be read from 2 | # $2 - name of output variable (default: REPLY) 3 | 4 | local __in_fd=${1:-0} __out_var=${2:-REPLY} 5 | local -a __tmp 6 | integer __ret=1 __repeat=10 __tmp_size=0 7 | 8 | while sysread -s 65535 -i "$__in_fd" '__tmp[__tmp_size + 1]'; do 9 | (( ( __ret=$? ) == 0 )) && (( ++ __tmp_size )) 10 | (( __ret == 5 )) && { __ret=0; (( --__repeat == 0 )) && break; } 11 | done 12 | 13 | : ${(P)__out_var::="${(j::)__tmp}"} 14 | 15 | return __ret 16 | 17 | # vim: ft=zsh:et:sw=4:sts=4 18 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/.travis.yml: -------------------------------------------------------------------------------- 1 | addons: 2 | apt: 3 | packages: 4 | zsh 5 | install: 6 | - mkdir .bin 7 | - curl -L https://github.com/zunit-zsh/zunit/releases/download/v0.8.2/zunit > .bin/zunit 8 | - curl -L https://raw.githubusercontent.com/molovo/revolver/master/revolver > .bin/revolver 9 | - curl -L https://raw.githubusercontent.com/molovo/color/master/color.zsh > .bin/color 10 | before_script: 11 | - chmod u+x .bin/{color,revolver,zunit} 12 | - export PATH="$PWD/.bin:$PATH" 13 | script: zunit 14 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/.zunit.yml: -------------------------------------------------------------------------------- 1 | tap: false 2 | directories: 3 | tests: tests 4 | output: tests/_output 5 | support: tests/_support 6 | time_limit: 0 7 | fail_fast: false 8 | allow_risky: false 9 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/_fast-theme: -------------------------------------------------------------------------------- 1 | #compdef fast-theme 2 | 3 | # 4 | # Copyright (c) 2018 Sebastian Gniazdowski 5 | # 6 | # Completion for theme-switching function, fast-theme, 7 | # part of zdharma/fast-syntax-highlighting. 8 | # 9 | 10 | integer ret=1 11 | local -a arguments 12 | 13 | arguments=( 14 | {-h,--help}'[display help text]' 15 | {-l,--list}'[list available themes]' 16 | {-r,--reset}'[unset any theme (revert to default highlighting)]' 17 | {-R,--ov-reset}'[unset overlay, use styles only from main-theme (requires restart)]' 18 | {-q,--quiet}'[no default messages]' 19 | {-s,--show}'[get and display the theme currently being set]' 20 | {-v,--verbose}'[more messages during operation]' 21 | {-t,--test}'[test theme after setting it (show example code)]' 22 | {-p,--palette}'[just print all 256 colors and exit (useful when creating a theme)]' 23 | {-w,--workdir}'[cd into $FAST_WORK_DIR (if not set, then into the plugin directory)]' 24 | ) 25 | 26 | typeset -a themes 27 | themes=( "$FAST_WORK_DIR"/themes/*.ini(:t:r) ) 28 | 29 | if [[ -d ${XDG_CONFIG_HOME:-$HOME/.config}/fsh ]] { 30 | typeset -a themes2 31 | themes2=( "${XDG_CONFIG_HOME:-$HOME/.config}"/fsh/*.ini(:t:r) ) 32 | themes+=( XDG:${^themes2[@]} ) 33 | } 34 | 35 | _wanted themes expl "Themes" \ 36 | compadd "$@" -a - themes && ret=0 37 | _arguments -s $arguments && ret=0 38 | 39 | return $ret 40 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/tests/_output/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/zsh/plugins/fast-syntax-highlighting/tests/_output/.gitkeep -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/tests/_support/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seeingangelz/dotfiles/d5b34dfafcaa02c551958c4b1da21bd2bec33bf0/.config/zsh/plugins/fast-syntax-highlighting/tests/_support/.gitkeep -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/tests/_support/bootstrap: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | # Write your bootstrap code here 3 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/tests/example.zunit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zunit 2 | @setup { 3 | load "../fast-highlight" 4 | } 5 | 6 | @test 'ls /usr/bin' { 7 | PREBUFFER="" 8 | BUFFER="ls /usr/bin" 9 | run -fast-highlight-process "$PREBUFFER" "$BUFFER" 0 \; print -rl -- \$reply 10 | 11 | assert "$lines[1]" same_as "0 2 fg=green" 12 | assert "$lines[2]" same_as "3 11 fg=magenta,underline" 13 | } 14 | 15 | # vim:ft=zsh:sw=4:sts=4:et 16 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/themes/clean.ini: -------------------------------------------------------------------------------- 1 | [base] 2 | default = none 3 | unknown-token = 124,bold 4 | commandseparator = none 5 | redirection = none 6 | here-string-tri = yellow 7 | here-string-text = bg:19 8 | here-string-var = 185,bg:19 9 | exec-descriptor = yellow,bold 10 | comment = black,bold 11 | correct-subtle = bg:55 12 | incorrect-subtle = bg:52 13 | subtle-bg = bg:17 14 | secondary = zdharma 15 | recursive-base = 183 16 | 17 | [command-point] 18 | reserved-word = 146 19 | subcommand = 146 20 | alias = 109 21 | suffix-alias = 109 22 | global-alias = bg:19 23 | builtin = 109 24 | function = 109 25 | command = 109 26 | precommand = 109 27 | hashed-command = 109 28 | single-sq-bracket = 109 29 | double-sq-bracket = 109 30 | double-paren = 146 31 | 32 | [paths] 33 | path = 208 34 | pathseparator = 35 | path-to-dir = 208,underline 36 | globbing = 220 37 | globbing-ext = 225 38 | 39 | [brackets] 40 | paired-bracket = bg:blue 41 | bracket-level-1 = 115 42 | bracket-level-2 = 177 43 | bracket-level-3 = 220 44 | 45 | [arguments] 46 | single-hyphen-option = 185 47 | double-hyphen-option = 185 48 | back-quoted-argument = none 49 | single-quoted-argument = 147 50 | double-quoted-argument = 147 51 | dollar-quoted-argument = 147 52 | 53 | [in-string] 54 | ; backslash in $'...' 55 | back-dollar-quoted-argument = 185 56 | ; backslash or $... in "..." (i.e. variable in string) 57 | back-or-dollar-double-quoted-argument = 185 58 | 59 | [other] 60 | variable = none 61 | assign = none 62 | assign-array-bracket = 109 63 | history-expansion = blue,bold 64 | 65 | [math] 66 | mathvar = blue,bold 67 | mathnum = 208 68 | matherr = 124 69 | 70 | [for-loop] 71 | forvar = none 72 | fornum = 208 73 | ; operator 74 | foroper = 147 75 | ; separator 76 | forsep = 109 77 | 78 | [case] 79 | case-input = 109 80 | case-parentheses = 116 81 | case-condition = bg:19 82 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/themes/default.ini: -------------------------------------------------------------------------------- 1 | ; default theme, also embedded in the source of fast-syntax-highlighting 2 | 3 | [base] 4 | default = none 5 | unknown-token = red,bold 6 | commandseparator = none 7 | redirection = none 8 | here-string-tri = yellow 9 | here-string-text = 18 10 | here-string-var = cyan,bg:18 11 | exec-descriptor = yellow,bold 12 | comment = black,bold 13 | correct-subtle = 12 14 | incorrect-subtle = red 15 | subtle-separator = green 16 | subtle-bg = bg:18 17 | secondary = free 18 | ; recursive-base = 19 | 20 | [command-point] 21 | reserved-word = yellow 22 | subcommand = yellow 23 | alias = green 24 | suffix-alias = green 25 | global-alias = bg:blue 26 | builtin = green 27 | function = green 28 | command = green 29 | precommand = green 30 | hashed-command = green 31 | single-sq-bracket = green 32 | double-sq-bracket = green 33 | double-paren = yellow 34 | 35 | [paths] 36 | path = magenta 37 | pathseparator = 38 | path-to-dir = magenta,underline 39 | globbing = blue,bold 40 | globbing-ext = 13 41 | 42 | [brackets] 43 | paired-bracket = bg:blue 44 | bracket-level-1 = green,bold 45 | bracket-level-2 = yellow,bold 46 | bracket-level-3 = cyan,bold 47 | 48 | [arguments] 49 | single-hyphen-option = cyan 50 | double-hyphen-option = cyan 51 | back-quoted-argument = none 52 | single-quoted-argument = yellow 53 | double-quoted-argument = yellow 54 | dollar-quoted-argument = yellow 55 | 56 | [in-string] 57 | ; backslash in $'...' 58 | back-dollar-quoted-argument = cyan 59 | ; backslash or $... in "..." 60 | back-or-dollar-double-quoted-argument = cyan 61 | 62 | [other] 63 | variable = 113 64 | assign = none 65 | assign-array-bracket = green 66 | history-expansion = blue,bold 67 | 68 | [math] 69 | mathvar = blue,bold 70 | mathnum = magenta 71 | matherr = red 72 | 73 | [for-loop] 74 | forvar = none 75 | fornum = magenta 76 | ; operator 77 | foroper = yellow 78 | ; separator 79 | forsep = yellow,bold 80 | 81 | [case] 82 | case-input = green 83 | case-parentheses = yellow 84 | case-condition = bg:blue 85 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/themes/forest.ini: -------------------------------------------------------------------------------- 1 | [base] 2 | default = none 3 | unknown-token = 124,bold 4 | commandseparator = none 5 | redirection = none 6 | here-string-tri = yellow 7 | here-string-text = underline 8 | here-string-var = 65,underline 9 | exec-descriptor = yellow,bold 10 | comment = black,bold 11 | correct-subtle = bg:55 12 | incorrect-subtle = bg:52 13 | subtle-bg = bg:18 14 | secondary = zdharma 15 | recursive-base = 183 16 | 17 | [command-point] 18 | reserved-word = 186 19 | subcommand = 186 20 | alias = 101 21 | suffix-alias = 101 22 | global-alias = bg:55 23 | builtin = 101 24 | function = 101 25 | command = 101 26 | precommand = 101 27 | hashed-command = 101 28 | single-sq-bracket = 101 29 | double-sq-bracket = 101 30 | double-paren = 186 31 | 32 | [paths] 33 | path = 107 34 | pathseparator = 35 | path-to-dir = 107,underline 36 | globbing = 114 37 | globbing-ext = 118 38 | 39 | [brackets] 40 | paired-bracket = bg:blue 41 | bracket-level-1 = green,bold 42 | bracket-level-2 = yellow,bold 43 | bracket-level-3 = cyan,bold 44 | 45 | [arguments] 46 | single-hyphen-option = 65 47 | double-hyphen-option = 65 48 | back-quoted-argument = none 49 | single-quoted-argument = 186 50 | double-quoted-argument = 186 51 | dollar-quoted-argument = 186 52 | 53 | [in-string] 54 | ; backslash in $'...' 55 | back-dollar-quoted-argument = 65 56 | ; backslash or $... in "..." 57 | back-or-dollar-double-quoted-argument = 65 58 | 59 | [other] 60 | variable = none 61 | assign = none 62 | assign-array-bracket = 101 63 | history-expansion = 114 64 | 65 | [math] 66 | mathvar = 114 67 | mathnum = 107 68 | matherr = 124 69 | 70 | [for-loop] 71 | forvar = none 72 | fornum = 107 73 | ; operator 74 | foroper = 186 75 | ; separator 76 | forsep = 109 77 | 78 | [case] 79 | case-input = 101 80 | case-parentheses = 65 81 | case-condition = underline 82 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/themes/free.ini: -------------------------------------------------------------------------------- 1 | [base] 2 | default = none 3 | unknown-token = red,bold 4 | commandseparator = none 5 | redirection = none 6 | here-string-tri = yellow 7 | here-string-text = bg:19 8 | here-string-var = 110,bg:19 9 | exec-descriptor = yellow,bold 10 | comment = black,bold 11 | correct-subtle = bg:55 12 | incorrect-subtle = bg:52 13 | subtle-bg = bg:18 14 | secondary = zdharma 15 | recursive-base = 183 16 | 17 | [command-point] 18 | reserved-word = 150 19 | subcommand = 150 20 | alias = 180 21 | suffix-alias = 180 22 | global-alias = bg:19 23 | builtin = 180 24 | function = 180 25 | command = 180 26 | precommand = 180 27 | hashed-command = 180 28 | single-sq-bracket = 180 29 | double-sq-bracket = 180 30 | double-paren = 150 31 | 32 | [paths] 33 | path = 166 34 | pathseparator = 35 | path-to-dir = 166,underline 36 | globbing = 112 37 | globbing-ext = 118 38 | 39 | [brackets] 40 | paired-bracket = bg:blue 41 | bracket-level-1 = 130 42 | bracket-level-2 = 70 43 | bracket-level-3 = 69 44 | 45 | [arguments] 46 | single-hyphen-option = 110 47 | double-hyphen-option = 110 48 | back-quoted-argument = none 49 | single-quoted-argument = 150 50 | double-quoted-argument = 150 51 | dollar-quoted-argument = 150 52 | 53 | [in-string] 54 | ; backslash in $'...' 55 | back-dollar-quoted-argument = 110 56 | ; backslash or $... in "..." (i.e. variable inside a string) 57 | back-or-dollar-double-quoted-argument = 110 58 | 59 | [other] 60 | variable = none 61 | assign = none 62 | assign-array-bracket = 180 63 | history-expansion = blue,bold 64 | 65 | [math] 66 | mathvar = blue,bold 67 | mathnum = 166 68 | matherr = red 69 | 70 | [for-loop] 71 | forvar = none 72 | fornum = 150 73 | ; operator 74 | foroper = 150 75 | ; separator 76 | forsep = 109 77 | 78 | [case] 79 | case-input = 180 80 | case-parentheses = 116 81 | case-condition = bg:19 82 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/themes/safari.ini: -------------------------------------------------------------------------------- 1 | ; Light theme with colors of a Sahara oasis 2 | 3 | [base] 4 | default = none 5 | unknown-token = red,bold 6 | commandseparator = none 7 | redirection = none 8 | here-string-tri = yellow 9 | here-string-text = bg:19 10 | here-string-var = 153,bg:19 11 | exec-descriptor = yellow,bold 12 | comment = black,bold 13 | correct-subtle = bg:55 14 | incorrect-subtle = bg:52 15 | subtle-bg = bg:18 16 | secondary = zdharma 17 | recursive-base = 183 18 | 19 | [command-point] 20 | reserved-word = 150 21 | subcommand = 150 22 | alias = 185 23 | suffix-alias = 185 24 | global-alias = bg:19 25 | builtin = 185 26 | function = 185 27 | command = 185 28 | precommand = 185 29 | hashed-command = 185 30 | single-sq-bracket = 185 31 | double-sq-bracket = 185 32 | double-paren = 150 33 | 34 | [paths] 35 | path = 187 36 | pathseparator = 37 | path-to-dir = 187,underline 38 | globbing = 180 39 | globbing-ext = 184 40 | 41 | [brackets] 42 | paired-bracket = bg:blue 43 | bracket-level-1 = 178 44 | bracket-level-2 = 148 45 | bracket-level-3 = 141 46 | 47 | [arguments] 48 | single-hyphen-option = 152 49 | double-hyphen-option = 152 50 | back-quoted-argument = none 51 | single-quoted-argument = 151 52 | double-quoted-argument = 151 53 | dollar-quoted-argument = 151 54 | 55 | [in-string] 56 | ; backslash in $'...' 57 | back-dollar-quoted-argument = 153 58 | ; backslash or $... in "..." (i.e. variable inside a string) 59 | back-or-dollar-double-quoted-argument = 153 60 | 61 | [other] 62 | variable = none 63 | assign = none 64 | assign-array-bracket = 185 65 | history-expansion = blue,bold 66 | 67 | [math] 68 | mathvar = blue,bold 69 | mathnum = 187 70 | matherr = red 71 | 72 | [for-loop] 73 | forvar = none 74 | fornum = 187 75 | ; operator 76 | foroper = 151 77 | ; separator 78 | forsep = 109 79 | 80 | [case] 81 | case-input = 185 82 | case-parentheses = 116 83 | case-condition = bg:19 84 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/themes/spa.ini: -------------------------------------------------------------------------------- 1 | ; 144, 187, 110, 203 2 | [base] 3 | default = none 4 | unknown-token = 196 5 | commandseparator = 150 6 | redirection = none 7 | here-string-tri = yellow 8 | here-string-text = bg:19 9 | here-string-var = 186,bg:19 10 | exec-descriptor = yellow,bold 11 | comment = black,bold 12 | correct-subtle = bg:55 13 | incorrect-subtle = bg:52 14 | subtle-bg = bg:17 15 | secondary = zdharma 16 | recursive-base = 183 17 | 18 | [command-point] 19 | reserved-word = 144 20 | subcommand = 144 21 | alias = 187 22 | suffix-alias = 187 23 | global-alias = bg:19 24 | builtin = 150 25 | function = 187 26 | command = 187 27 | precommand = 187 28 | hashed-command = 187 29 | single-sq-bracket = 150 30 | double-sq-bracket = 150 31 | double-paren = 144 32 | 33 | [paths] 34 | path = 110 35 | pathseparator = 36 | path-to-dir = 110,underline 37 | globbing = 220 38 | globbing-ext = 225 39 | 40 | [brackets] 41 | paired-bracket = bg:blue 42 | bracket-level-1 = 115 43 | bracket-level-2 = 177 44 | bracket-level-3 = 220 45 | 46 | [arguments] 47 | single-hyphen-option = 185 48 | double-hyphen-option = 185 49 | back-quoted-argument = none 50 | single-quoted-argument = 110 51 | double-quoted-argument = 110 52 | dollar-quoted-argument = 110 53 | 54 | [in-string] 55 | ; backslash in $'...' 56 | back-dollar-quoted-argument = 186 57 | ; backslash or $... in "..." (i.e. variable in string) 58 | back-or-dollar-double-quoted-argument = 186 59 | 60 | [other] 61 | variable = none 62 | assign = none 63 | assign-array-bracket = 187 64 | history-expansion = blue,bold 65 | 66 | [math] 67 | mathvar = 150 68 | mathnum = 110 69 | matherr = 196 70 | 71 | [for-loop] 72 | forvar = 71 73 | fornum = 110 74 | ; operator 75 | foroper = 203 76 | ; separator 77 | forsep = 147 78 | 79 | [case] 80 | case-input = 187 81 | case-parentheses = 116 82 | case-condition = bg:19 83 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/themes/zdharma.ini: -------------------------------------------------------------------------------- 1 | [base] 2 | default = none 3 | unknown-token = red,bold 4 | commandseparator = none 5 | redirection = none 6 | here-string-tri = 141 7 | here-string-text = bg:19 8 | here-string-var = 177,bg:19 9 | exec-descriptor = yellow,bold 10 | comment = black,bold 11 | correct-subtle = bg:55 12 | incorrect-subtle = bg:52 13 | subtle-bg = bg:17 14 | secondary = safari 15 | recursive-base = 186 16 | 17 | [command-point] 18 | reserved-word = 146 19 | reserved-word = 146 20 | alias = 63 21 | suffix-alias = 63 22 | global-alias = bg:19 23 | builtin = 63 24 | function = 63 25 | command = 63 26 | precommand = 63 27 | hashed-command = 63 28 | single-sq-bracket = 63 29 | double-sq-bracket = 63 30 | double-paren = 146 31 | 32 | [paths] 33 | path = 154 34 | pathseparator = 35 | path-to-dir = 154,underline 36 | globbing = 114 37 | globbing-ext = 153 38 | 39 | [brackets] 40 | paired-bracket = bg:blue 41 | bracket-level-1 = 117 42 | bracket-level-2 = 141 43 | bracket-level-3 = 90 44 | 45 | [arguments] 46 | single-hyphen-option = 177 47 | double-hyphen-option = 177 48 | back-quoted-argument = none 49 | single-quoted-argument = 146 50 | double-quoted-argument = 146 51 | dollar-quoted-argument = 146 52 | 53 | [in-string] 54 | ; backslash in $'...' 55 | back-dollar-quoted-argument = 177 56 | ; backslash or $... in "..." 57 | back-or-dollar-double-quoted-argument = 177 58 | 59 | [other] 60 | variable = none 61 | assign = none 62 | assign-array-bracket = 63 63 | history-expansion = blue,bold 64 | 65 | [math] 66 | mathvar = blue,bold 67 | mathnum = 154 68 | matherr = red 69 | 70 | [for-loop] 71 | forvar = none 72 | fornum = 154 73 | ; operator 74 | foroper = 146 75 | ; separator 76 | forsep = 109 77 | 78 | [case] 79 | case-input = 63 80 | case-parentheses = 141 81 | case-condition = bg:19 82 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/→chroma/-alias.ch: -------------------------------------------------------------------------------- 1 | # vim:ft=zsh:et:sw=4 2 | (( next_word = 2 | 8192 )) 3 | [[ "$__arg_type" = 3 ]] && return 2 4 | 5 | local __first_call="$1" __wrd="${2%%=*}" __start_pos="$3" __end_pos="$4" 6 | 7 | if (( __first_call )) || [[ "$2" = -* ]]; then 8 | return 1 9 | else 10 | if (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then 11 | return 1 12 | elif (( $+aliases[(e)$__wrd] )) || (( ${+galiases[(e)$__wrd]} )); then 13 | (( __start=__start_pos-${#PREBUFFER}, __end=__start_pos+${#__wrd}-${#PREBUFFER}, __start >= 0 )) \ 14 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}correct-subtle]}") 15 | elif (( $+functions[(e)$__wrd] )) || (( $+builtins[(e)$__wrd] )) || (( $+commands[(e)$__wrd] )) || (( $reswords[(Ie)$__wrd] )); then 16 | (( __start=__start_pos-${#PREBUFFER}, __end=__start_pos+${#__wrd}-${#PREBUFFER}, __start >= 0 )) \ 17 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}incorrect-subtle]}") 18 | else 19 | return 1 20 | fi 21 | if [[ "$__wrd" != "$2" ]]; then 22 | return 1 23 | fi 24 | fi 25 | 26 | (( this_word = next_word )) 27 | _start_pos=$_end_pos 28 | 29 | return 0 30 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/→chroma/-autorandr.ch: -------------------------------------------------------------------------------- 1 | # vim:ft=zsh:et:sw=4 2 | (( next_word = 2 | 8192 )) 3 | [[ "$__arg_type" = 3 ]] && return 2 4 | 5 | local __first_call="$1" __wrd="$2" __start_pos="$3" __end_pos="$4" 6 | 7 | if (( __first_call )) || [[ "$__wrd" = -* ]]; then 8 | return 1 9 | else 10 | if (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then 11 | return 1 12 | fi 13 | if [[ -d "${XDG_CONFIG_HOME:-$HOME/.config}/autorandr/$__wrd" ]] then 14 | (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \ 15 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}correct-subtle]}") 16 | fi 17 | fi 18 | 19 | (( this_word = next_word )) 20 | _start_pos=$_end_pos 21 | 22 | return 0 23 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/→chroma/-fast-theme.ch: -------------------------------------------------------------------------------- 1 | # vim:ft=zsh:et:sw=4 2 | (( next_word = 2 | 8192 )) 3 | [[ "$__arg_type" = 3 ]] && return 2 4 | 5 | local __first_call="$1" __wrd="${(Q)2}" __start_pos="$3" __end_pos="$4" 6 | local __style 7 | 8 | if (( __first_call )); then 9 | FAST_HIGHLIGHT[chroma-fast-theme-first]=0 10 | return 1 11 | elif (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then 12 | return 1 13 | elif (( ${FAST_HIGHLIGHT[chroma-fast-theme-first]} )) || [[ $__wrd = -* ]]; then 14 | return 1 15 | else 16 | FAST_HIGHLIGHT[chroma-fast-theme-first]=1 17 | fi 18 | 19 | if [[ "$__wrd" = */* || "$__wrd" = (XDG|LOCAL|HOME|OPT):* ]]; then 20 | __wrd="${${__wrd/(#s)XDG:/${${XDG_CONFIG_HOME:-$HOME/.config}%/}/fsh/}%.ini}.ini" 21 | __wrd="${${__wrd/(#s)LOCAL://usr/local/share/fsh/}%.ini}.ini" 22 | __wrd="${${__wrd/(#s)HOME:/$HOME/.fsh/}%.ini}.ini" 23 | __wrd="${${__wrd/(#s)OPT://opt/local/share/fsh/}%.ini}.ini" 24 | __wrd=${~__wrd} # allow user to quote ~ 25 | else 26 | __wrd="$FAST_BASE_DIR/themes/$__wrd.ini" 27 | fi 28 | 29 | if [[ -f $__wrd ]]; then 30 | __style=${FAST_THEME_NAME}path 31 | else 32 | __style=${FAST_THEME_NAME}incorrect-subtle 33 | fi 34 | 35 | (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \ 36 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[$__style]}") 37 | (( this_word = next_word )) 38 | _start_pos=$_end_pos 39 | 40 | return 0 41 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/→chroma/-node.ch: -------------------------------------------------------------------------------- 1 | # vim:ft=zsh:et:sw=4 2 | (( next_word = 2 | 8192 )) 3 | [[ "$__arg_type" = 3 ]] && return 2 4 | 5 | local __first_call="$1" __wrd="$2" __start_pos="$3" __end_pos="$4" 6 | local __style 7 | 8 | if (( __first_call )); then 9 | FAST_HIGHLIGHT[chroma-node-file]=1 10 | elif (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then 11 | return 1 12 | elif [[ "$__wrd" = -- ]]; then 13 | FAST_HIGHLIGHT[chroma-node-file]=2 14 | elif (( FAST_HIGHLIGHT[chroma-node-file] != 2 )) && [[ "$__wrd" = -* ]]; then 15 | if [[ "$__wrd" = -*e* || "$__wrd" = --eval ]]; then 16 | FAST_HIGHLIGHT[chroma-node-file]=0 17 | fi 18 | elif (( FAST_HIGHLIGHT[chroma-node-file] )); then 19 | if [[ "$__wrd" = debug || "$__wrd" = inspect ]]; then 20 | __style=${FAST_THEME_NAME}subcommand 21 | else 22 | FAST_HIGHLIGHT[chroma-node-file]=0 23 | if [[ -f ${~__wrd} || -f ${~__wrd}.js || -f ${~__wrd}/index.js ]]; then 24 | __style=${FAST_THEME_NAME}path 25 | else 26 | __style=${FAST_THEME_NAME}incorrect-subtle 27 | fi 28 | fi 29 | (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \ 30 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[$__style]}") 31 | (( this_word = next_word )) 32 | _start_pos=$_end_pos 33 | 34 | return 0 35 | fi 36 | 37 | return 1 38 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/→chroma/-precommand.ch: -------------------------------------------------------------------------------- 1 | # vim:ft=zsh:et:sw=4 2 | 3 | local __first_call="$1" __start_pos="$3" __end_pos="$4" 4 | 5 | [[ "$__arg_type" = 3 ]] && return 2 6 | 7 | (( __first_call )) && { 8 | (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \ 9 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}precommand]}") 10 | (( next_word = (next_word & ~2) | 4 | 1 )) 11 | } || { 12 | return 1 13 | } 14 | 15 | (( this_word = next_word )) 16 | _start_pos=$_end_pos 17 | return 0 18 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/→chroma/-subcommand.ch: -------------------------------------------------------------------------------- 1 | # vim:ft=zsh:et:sw=4 2 | (( next_word = 2 | 8192 )) 3 | [[ "$__arg_type" = 3 ]] && return 2 4 | 5 | local __first_call="$1" __wrd="$2" __start_pos="$3" __end_pos="$4" 6 | 7 | if (( __first_call )); then 8 | FAST_HIGHLIGHT[chroma-subcommand]="" 9 | return 1 10 | elif (( in_redirection > 0 || this_word & 128 )) || [[ $__wrd == "<<<" ]]; then 11 | return 1 12 | elif [[ "$2" = -* ]]; then 13 | return 1 14 | elif [[ -z "${FAST_HIGHLIGHT[chroma-subcommand]}" ]]; then 15 | FAST_HIGHLIGHT[chroma-subcommand]="$__wrd" 16 | (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) \ 17 | && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}subcommand]}") 18 | else 19 | return 1 20 | fi 21 | 22 | (( this_word = next_word )) 23 | _start_pos=$_end_pos 24 | 25 | return 0 26 | -------------------------------------------------------------------------------- /.config/zsh/plugins/fast-syntax-highlighting/→chroma/-vim.ch: -------------------------------------------------------------------------------- 1 | # -*- mode: sh; sh-indentation: 4; indent-tabs-mode: nil; sh-basic-offset: 4; -*- 2 | # Copyright (c) 2018 Sebastian Gniazdowski 3 | # 4 | # Chroma for vim, shows last opened files under prompt. 5 | # 6 | # $1 - 0 or 1, denoting if it's first call to the chroma, or following one 7 | # 8 | # $2 - the current token, also accessible by $__arg from the above scope - 9 | # basically a private copy of $__arg; the token can be eg.: "grep" 10 | # 11 | # $3 - a private copy of $_start_pos, i.e. the position of the token in the 12 | # command line buffer, used to add region_highlight entry (see man), 13 | # because Zsh colorizes by *ranges* in command line buffer 14 | # 15 | # $4 - a private copy of $_end_pos from the above scope 16 | # 17 | 18 | (( next_word = 2 | 8192 )) 19 | 20 | local __first_call="$1" __wrd="$2" __start_pos="$3" __end_pos="$4" 21 | local __style __chars 22 | integer __idx1 __idx2 23 | local -a __viminfo 24 | 25 | # First call, i.e. command starts, i.e. "grep" token etc. 26 | (( __first_call )) && { 27 | (( ${+commands[vim]} )) && __style=${FAST_THEME_NAME}command || __style=${FAST_THEME_NAME}unknown-token 28 | 29 | { __viminfo=( ${(f)"$(<$HOME/.viminfo)"} ); } >> /dev/null 30 | __viminfo=( "${${(M)__viminfo[@]:#>*}[@]:t}" ) 31 | __viminfo=( "${__viminfo[@]:#COMMIT_EDITMSG}" ) 32 | zle -M "Last opened:"$'\n'"${(F)__viminfo[1,5]}" 33 | } || { 34 | # Pass almost everything to big loop 35 | return 1 36 | } 37 | 38 | # Add region_highlight entry (via `reply' array). 39 | # 40 | # This is a common place of adding such entry, but any above 41 | # code can do it itself (and it does, see other chromas) and 42 | # skip setting __style to disable this code. 43 | [[ -n "$__style" ]] && (( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[$__style]}") 44 | 45 | # We aren't passing-through (no return 1 occured), do obligatory things ourselves. 46 | (( this_word = next_word )) 47 | _start_pos=$_end_pos 48 | 49 | return 0 50 | 51 | # vim:ft=zsh:et:sw=4 52 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autopair/.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset = utf-8 3 | end_of_line = lf 4 | insert_final_newline = true 5 | trim_trailing_whitespace = true 6 | indent_style = space 7 | indent_size = 4 8 | 9 | [*.md] 10 | indent_style = space 11 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autopair/.travis.yml: -------------------------------------------------------------------------------- 1 | dist: trusty 2 | sudo: required 3 | 4 | language: generic 5 | 6 | env: 7 | - ZSH_VERSION=5.3.1 URL=https://downloads.sourceforge.net/project/zsh/zsh/5.3.1/zsh-5.3.1.tar.xz 8 | - ZSH_VERSION=5.2 URL=https://downloads.sourceforge.net/project/zsh/zsh/5.2/zsh-5.2.tar.xz 9 | - ZSH_VERSION=5.1.1 URL=https://downloads.sourceforge.net/project/zsh/zsh/5.1.1/zsh-5.1.1.tar.xz 10 | - ZSH_VERSION=5.0.8 URL=https://downloads.sourceforge.net/project/zsh/zsh/5.0.8/zsh-5.0.8.tar.gz 11 | 12 | addons: 13 | apt: 14 | packages: 15 | - build-essential 16 | 17 | before_install: 18 | - export LOCAL="$(mktemp --directory --tmpdir=${TMPDIR:/tmp} local.bin.XXXXXX)" 19 | - wget $URL 20 | - tar -xf zsh-$ZSH_VERSION.tar.* 21 | - cd zsh-$ZSH_VERSION 22 | - ./configure --prefix=$LOCAL 23 | - make 24 | - make install 25 | - cd - 26 | - export PATH="$LOCAL/bin:$HOME/bin:$PATH" 27 | 28 | before_script: 29 | - mkdir -p ~/bin 30 | - curl -L https://github.com/zunit-zsh/zunit/releases/download/v0.8.1/zunit > ~/bin/zunit 31 | - curl -L https://raw.githubusercontent.com/molovo/revolver/master/revolver > ~/bin/revolver 32 | - chmod u+x ~/bin/{revolver,zunit} 33 | 34 | script: 35 | - zunit --verbose 36 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autopair/.zunit.yml: -------------------------------------------------------------------------------- 1 | tap: false 2 | directories: 3 | tests: tests 4 | output: tests/_output 5 | support: tests/_support 6 | time_limit: 0 7 | fail_fast: false 8 | allow_risky: false 9 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autopair/autopair.plugin.zsh: -------------------------------------------------------------------------------- 1 | # 2 | 0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" 3 | 0="${${(M)0:#/*}:-$PWD/$0}" 4 | source "${0:A:h}/autopair.zsh" 5 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autopair/zsh-autopair.plugin.zsh: -------------------------------------------------------------------------------- 1 | # 2 | 0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" 3 | 0="${${(M)0:#/*}:-$PWD/$0}" 4 | source "${0:A:h}/autopair.zsh" 5 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build: 4 | parallelism: 4 5 | shell: /bin/bash --login 6 | docker: 7 | - image: ericfreese/zsh-autosuggestions-test:latest 8 | steps: 9 | - checkout 10 | - run: 11 | name: Running tests 12 | command: | 13 | for v in $(grep "^[^#]" ZSH_VERSIONS | awk "(NR + $CIRCLE_NODE_INDEX) % $CIRCLE_NODE_TOTAL == 0"); do 14 | TEST_ZSH_BIN=zsh-$v make test || exit 1 15 | done 16 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset = utf-8 3 | end_of_line = lf 4 | insert_final_newline = true 5 | trim_trailing_whitespace = true 6 | indent_style = tab 7 | indent_size = 4 8 | 9 | [*.md] 10 | indent_style = space 11 | 12 | [*.rb] 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.yml] 17 | indent_style = space 18 | indent_size = 2 19 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --require spec_helper 3 | --format documentation 4 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/.rubocop.yml: -------------------------------------------------------------------------------- 1 | # Rails: 2 | # Enabled: true 3 | 4 | AllCops: 5 | TargetRubyVersion: 2.3 6 | Include: 7 | - '**/Rakefile' 8 | - '**/config.ru' 9 | - '**/Gemfile' 10 | 11 | Metrics/LineLength: 12 | Max: 120 13 | 14 | Style/Documentation: 15 | Enabled: false 16 | 17 | Style/DotPosition: 18 | EnforcedStyle: trailing 19 | 20 | Style/FrozenStringLiteralComment: 21 | Enabled: false 22 | 23 | Style/Lambda: 24 | Enabled: false 25 | 26 | Style/MultilineMethodCallIndentation: 27 | EnforcedStyle: indented 28 | 29 | Style/TrailingUnderscoreVariable: 30 | Enabled: false 31 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.5.3 2 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/Makefile: -------------------------------------------------------------------------------- 1 | SRC_DIR := ./src 2 | 3 | SRC_FILES := \ 4 | $(SRC_DIR)/config.zsh \ 5 | $(SRC_DIR)/util.zsh \ 6 | $(SRC_DIR)/bind.zsh \ 7 | $(SRC_DIR)/highlight.zsh \ 8 | $(SRC_DIR)/widgets.zsh \ 9 | $(SRC_DIR)/strategies/*.zsh \ 10 | $(SRC_DIR)/fetch.zsh \ 11 | $(SRC_DIR)/async.zsh \ 12 | $(SRC_DIR)/start.zsh 13 | 14 | HEADER_FILES := \ 15 | DESCRIPTION \ 16 | URL \ 17 | VERSION \ 18 | LICENSE 19 | 20 | PLUGIN_TARGET := zsh-autosuggestions.zsh 21 | 22 | all: $(PLUGIN_TARGET) 23 | 24 | $(PLUGIN_TARGET): $(HEADER_FILES) $(SRC_FILES) 25 | cat $(HEADER_FILES) | sed -e 's/^/# /g' > $@ 26 | cat $(SRC_FILES) >> $@ 27 | 28 | .PHONY: clean 29 | clean: 30 | rm $(PLUGIN_TARGET) 31 | 32 | .PHONY: test 33 | test: all 34 | @test -n "$$TEST_ZSH_BIN" && echo "Testing zsh binary: $(TEST_ZSH_BIN)" || true 35 | bundle exec rspec $(TESTS) 36 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/install_test_zsh.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -ex 4 | 5 | for v in $(grep "^[^#]" ZSH_VERSIONS); do 6 | mkdir zsh-$v 7 | cd zsh-$v 8 | 9 | curl -L https://api.github.com/repos/zsh-users/zsh/tarball/zsh-$v | tar xz --strip=1 10 | 11 | ./Util/preconfig 12 | ./configure --enable-pcre \ 13 | --enable-cap \ 14 | --enable-multibyte \ 15 | --with-term-lib='ncursesw tinfo' \ 16 | --with-tcsetpgrp \ 17 | --program-suffix="-$v" 18 | 19 | make install.bin 20 | make install.modules 21 | make install.fns 22 | 23 | cd .. 24 | 25 | rm -rf zsh-$v 26 | done 27 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/async_spec.rb: -------------------------------------------------------------------------------- 1 | context 'with asynchronous suggestions enabled' do 2 | let(:options) { ["ZSH_AUTOSUGGEST_USE_ASYNC="] } 3 | 4 | describe '`up-line-or-beginning-search`' do 5 | let(:before_sourcing) do 6 | -> do 7 | session. 8 | run_command('autoload -U up-line-or-beginning-search'). 9 | run_command('zle -N up-line-or-beginning-search'). 10 | send_string('bindkey "'). 11 | send_keys('C-v').send_keys('up'). 12 | send_string('" up-line-or-beginning-search'). 13 | send_keys('enter') 14 | end 15 | end 16 | 17 | it 'should show previous history entries' do 18 | with_history( 19 | 'echo foo', 20 | 'echo bar', 21 | 'echo baz' 22 | ) do 23 | session.clear_screen 24 | 3.times { session.send_keys('up') } 25 | wait_for { session.content }.to eq("echo foo") 26 | end 27 | end 28 | end 29 | 30 | describe '`copy-earlier-word`' do 31 | let(:before_sourcing) do 32 | -> do 33 | session. 34 | run_command('autoload -Uz copy-earlier-word'). 35 | run_command('zle -N copy-earlier-word'). 36 | run_command('bindkey "^N" copy-earlier-word') 37 | end 38 | end 39 | 40 | it 'should cycle through previous words in the buffer' do 41 | session.clear_screen 42 | session.send_string('foo bar baz') 43 | sleep 0.5 44 | session.send_keys('C-n') 45 | wait_for { session.content }.to eq('foo bar bazbaz') 46 | session.send_keys('C-n') 47 | wait_for { session.content }.to eq('foo bar bazbar') 48 | session.send_keys('C-n') 49 | wait_for { session.content }.to eq('foo bar bazfoo') 50 | end 51 | end 52 | 53 | describe 'pressing ^C after fetching a suggestion' do 54 | before do 55 | skip 'Workaround does not work below v5.0.8' if session.zsh_version < Gem::Version.new('5.0.8') 56 | end 57 | 58 | it 'terminates the prompt and begins a new one' do 59 | session.send_keys('e') 60 | sleep 0.5 61 | session.send_keys('C-c') 62 | sleep 0.5 63 | session.send_keys('echo') 64 | 65 | wait_for { session.content }.to eq("e\necho") 66 | end 67 | end 68 | end 69 | 70 | 71 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/integrations/auto_cd_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'with `AUTO_CD` option set' do 2 | let(:after_sourcing) do 3 | -> { 4 | session.run_command('setopt AUTO_CD') 5 | session.run_command('autoload compinit && compinit') 6 | } 7 | end 8 | 9 | it 'directory names are still completed' do 10 | session.send_string('sr') 11 | session.send_keys('C-i') 12 | wait_for { session.content }.to eq('src/') 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/integrations/bracketed_paste_magic_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'pasting using bracketed-paste-magic' do 2 | let(:before_sourcing) do 3 | -> do 4 | session. 5 | run_command('autoload -Uz bracketed-paste-magic'). 6 | run_command('zle -N bracketed-paste bracketed-paste-magic') 7 | end 8 | end 9 | 10 | context 'with suggestions disabled while pasting' do 11 | before do 12 | session. 13 | run_command('bpm_init() { zle autosuggest-disable }'). 14 | run_command('bpm_finish() { zle autosuggest-enable }'). 15 | run_command('zstyle :bracketed-paste-magic paste-init bpm_init'). 16 | run_command('zstyle :bracketed-paste-magic paste-finish bpm_finish') 17 | end 18 | 19 | it 'does not show an incorrect suggestion' do 20 | with_history('echo hello') do 21 | session.paste_string("echo #{'a' * 60}") 22 | sleep 1 23 | expect(session.content).to eq("echo #{'a' * 60}") 24 | end 25 | end 26 | end 27 | 28 | context 'with `bracketed-paste` added to the list of widgets that clear the suggestion' do 29 | let(:options) { ['ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(bracketed-paste)'] } 30 | 31 | it 'does not retain an old suggestion' do 32 | with_history ('echo foo') do 33 | session.send_string('echo ') 34 | wait_for { session.content }.to eq('echo foo') 35 | session.paste_string('bar') 36 | wait_for { session.content }.to eq('echo bar') 37 | session.send_keys('C-a') # Any cursor movement works 38 | sleep 1 39 | expect(session.content).to eq('echo bar') 40 | end 41 | end 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/integrations/client_zpty_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'a running zpty command' do 2 | let(:before_sourcing) { -> { session.run_command('zmodload zsh/zpty && zpty -b kitty cat') } } 3 | 4 | context 'when using `completion` strategy' do 5 | let(:options) { ["ZSH_AUTOSUGGEST_STRATEGY=completion"] } 6 | 7 | it 'is not affected' do 8 | session.send_keys('a').send_keys('C-h') 9 | session.run_command('zpty -t kitty; echo $?') 10 | 11 | wait_for { session.content }.to end_with("\n0") 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/integrations/glob_subst_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'with `GLOB_SUBST` option set' do 2 | let(:after_sourcing) do 3 | -> { 4 | session.run_command('setopt GLOB_SUBST') 5 | } 6 | end 7 | 8 | it 'error messages are not printed' do 9 | session.send_string('[[') 10 | wait_for { session.content }.to eq('[[') 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/integrations/rebound_bracket_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'rebinding [' do 2 | context 'initialized before sourcing the plugin' do 3 | before do 4 | session.run_command("function [ { $commands[\\[] \"$@\" }") 5 | session.clear_screen 6 | end 7 | 8 | it 'executes the custom behavior and the built-in behavior' do 9 | session.send_string('asdf') 10 | wait_for { session.content }.to eq('asdf') 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/integrations/wrapped_widget_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'a wrapped widget' do 2 | let(:widget) { 'backward-delete-char' } 3 | 4 | context 'initialized before sourcing the plugin' do 5 | let(:before_sourcing) do 6 | -> do 7 | session. 8 | run_command("_orig_#{widget}() { zle .#{widget} }"). 9 | run_command("zle -N orig-#{widget} _orig_#{widget}"). 10 | run_command("#{widget}-magic() { zle orig-#{widget}; BUFFER+=b }"). 11 | run_command("zle -N #{widget} #{widget}-magic") 12 | end 13 | end 14 | 15 | it 'executes the custom behavior and the built-in behavior' do 16 | with_history('foobar', 'foodar') do 17 | session.send_string('food').send_keys('C-h') 18 | wait_for { session.content }.to eq('foobar') 19 | end 20 | end 21 | end 22 | 23 | context 'initialized after sourcing the plugin' do 24 | before do 25 | session. 26 | run_command("zle -N orig-#{widget} ${widgets[#{widget}]#*:}"). 27 | run_command("#{widget}-magic() { zle orig-#{widget}; BUFFER+=b }"). 28 | run_command("zle -N #{widget} #{widget}-magic"). 29 | clear_screen 30 | end 31 | 32 | it 'executes the custom behavior and the built-in behavior' do 33 | with_history('foobar', 'foodar') do 34 | session.send_string('food').send_keys('C-h') 35 | wait_for { session.content }.to eq('foobar') 36 | end 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/integrations/zle_input_stack_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'using `zle -U`' do 2 | let(:before_sourcing) do 3 | -> do 4 | session. 5 | run_command('_zsh_autosuggest_strategy_test() { sleep 1; _zsh_autosuggest_strategy_history "$1" }'). 6 | run_command('foo() { zle -U - "echo hello" }; zle -N foo; bindkey ^B foo') 7 | end 8 | end 9 | 10 | let(:options) { ['unset ZSH_AUTOSUGGEST_USE_ASYNC', 'ZSH_AUTOSUGGEST_STRATEGY=test'] } 11 | 12 | # TODO: This is only possible with the $KEYS_QUEUED_COUNT widget parameter, coming soon... 13 | xit 'does not fetch a suggestion for every inserted character' do 14 | session.send_keys('C-b') 15 | wait_for { session.content }.to eq('echo hello') 16 | end 17 | 18 | it 'shows a suggestion when the widget completes' do 19 | with_history('echo hello world') do 20 | session.send_keys('C-b') 21 | wait_for { session.content(esc_seqs: true) }.to match(/\Aecho hello\e\[[0-9]+m world/) 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/kill_ring_spec.rb: -------------------------------------------------------------------------------- 1 | context 'with some items in the kill ring' do 2 | before do 3 | session. 4 | send_string('echo foo'). 5 | send_keys('C-u'). 6 | send_string('echo bar'). 7 | send_keys('C-u') 8 | end 9 | 10 | describe '`yank-pop`' do 11 | it 'should cycle through all items in the kill ring' do 12 | session.send_keys('C-y') 13 | wait_for { session.content }.to eq('echo bar') 14 | 15 | session.send_keys('escape').send_keys('y') 16 | wait_for { session.content }.to eq('echo foo') 17 | 18 | session.send_keys('escape').send_keys('y') 19 | wait_for { session.content }.to eq('echo bar') 20 | end 21 | end 22 | end 23 | 24 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/line_init_spec.rb: -------------------------------------------------------------------------------- 1 | context 'with zle-line-init unignored' do 2 | let(:after_sourcing) do 3 | -> do 4 | session. 5 | run_command('setopt extendedglob'). 6 | run_command('ZSH_AUTOSUGGEST_IGNORE_WIDGETS=(${(@)ZSH_AUTOSUGGEST_IGNORE_WIDGETS:#zle-\*} zle-\^line-init)'). 7 | run_command('zle-line-init() { BUFFER="echo" }') 8 | end 9 | end 10 | 11 | it 'should fetch a suggestion on each line initialization' do 12 | with_history('echo foo') do 13 | session.run_command('zle -N zle-line-init') 14 | wait_for { session.content }.to end_with('echo foo') 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/multi_line_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'a multi-line suggestion' do 2 | it 'should be displayed on multiple lines' do 3 | with_history("echo \"\n\"") do 4 | session.send_keys('e') 5 | wait_for { session.content }.to eq("echo \"\n\"") 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/options/buffer_max_size_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'a suggestion' do 2 | let(:term_opts) { { width: 200 } } 3 | let(:long_command) { "echo #{'a' * 100}" } 4 | 5 | around do |example| 6 | with_history(long_command) { example.run } 7 | end 8 | 9 | it 'is provided for any buffer length' do 10 | session.send_string(long_command[0...-1]) 11 | wait_for { session.content }.to eq(long_command) 12 | end 13 | 14 | context 'when ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE is specified' do 15 | let(:buffer_max_size) { 10 } 16 | let(:options) { ["ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=#{buffer_max_size}"] } 17 | 18 | it 'is provided when the buffer is shorter than the specified length' do 19 | session.send_string(long_command[0...(buffer_max_size - 1)]) 20 | wait_for { session.content }.to eq(long_command) 21 | end 22 | 23 | it 'is provided when the buffer is equal to the specified length' do 24 | session.send_string(long_command[0...(buffer_max_size)]) 25 | wait_for { session.content }.to eq(long_command) 26 | end 27 | 28 | it 'is not provided when the buffer is longer than the specified length' 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/options/highlight_style_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'a displayed suggestion' do 2 | it 'is shown in the default style' 3 | 4 | describe 'when ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE is set to a zle_highlight string' do 5 | it 'is shown in the specified style' 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/options/original_widget_prefix_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'an original zle widget' do 2 | context 'is accessible with the default prefix' 3 | 4 | context 'when ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX is set' do 5 | it 'is accessible with the specified prefix' 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/options/strategy_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'a suggestion for a given prefix' do 2 | let(:history_strategy) { '_zsh_autosuggest_strategy_history() { suggestion="history" }' } 3 | let(:foobar_strategy) { '_zsh_autosuggest_strategy_foobar() { [[ "foobar baz" = $1* ]] && suggestion="foobar baz" }' } 4 | let(:foobaz_strategy) { '_zsh_autosuggest_strategy_foobaz() { [[ "foobaz bar" = $1* ]] && suggestion="foobaz bar" }' } 5 | 6 | let(:after_sourcing) do 7 | -> do 8 | session.run_command(history_strategy) 9 | end 10 | end 11 | 12 | it 'by default is determined by calling the `history` strategy function' do 13 | session.send_string('h') 14 | wait_for { session.content }.to eq('history') 15 | end 16 | 17 | context 'when ZSH_AUTOSUGGEST_STRATEGY is set to an array' do 18 | let(:after_sourcing) do 19 | -> do 20 | session. 21 | run_command(foobar_strategy). 22 | run_command(foobaz_strategy). 23 | run_command('ZSH_AUTOSUGGEST_STRATEGY=(foobar foobaz)') 24 | end 25 | end 26 | 27 | it 'is determined by the first strategy function to return a suggestion' do 28 | session.send_string('foo') 29 | wait_for { session.content }.to eq('foobar baz') 30 | 31 | session.send_string('baz') 32 | wait_for { session.content }.to eq('foobaz bar') 33 | end 34 | end 35 | 36 | context 'when ZSH_AUTOSUGGEST_STRATEGY is set to a string' do 37 | let(:after_sourcing) do 38 | -> do 39 | session. 40 | run_command(foobar_strategy). 41 | run_command(foobaz_strategy). 42 | run_command('ZSH_AUTOSUGGEST_STRATEGY="foobar foobaz"') 43 | end 44 | end 45 | 46 | it 'is determined by the first strategy function to return a suggestion' do 47 | session.send_string('foo') 48 | wait_for { session.content }.to eq('foobar baz') 49 | 50 | session.send_string('baz') 51 | wait_for { session.content }.to eq('foobaz bar') 52 | end 53 | end 54 | end 55 | 56 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'pry' 2 | require 'rspec/wait' 3 | require 'terminal_session' 4 | require 'tempfile' 5 | 6 | RSpec.shared_context 'terminal session' do 7 | let(:term_opts) { {} } 8 | let(:session) { TerminalSession.new(term_opts) } 9 | let(:before_sourcing) { -> {} } 10 | let(:after_sourcing) { -> {} } 11 | let(:options) { [] } 12 | 13 | around do |example| 14 | before_sourcing.call 15 | session.run_command(['source zsh-autosuggestions.zsh', *options].join('; ')) 16 | after_sourcing.call 17 | session.clear_screen 18 | 19 | example.run 20 | 21 | session.destroy 22 | end 23 | 24 | def with_history(*commands, &block) 25 | Tempfile.create do |f| 26 | f.write(commands.map{|c| c.gsub("\n", "\\\n")}.join("\n")) 27 | f.flush 28 | 29 | session.run_command('fc -p') 30 | session.run_command("fc -R #{f.path}") 31 | 32 | session.clear_screen 33 | 34 | yield block 35 | 36 | session.send_keys('C-c') 37 | session.run_command('fc -P') 38 | end 39 | end 40 | end 41 | 42 | RSpec.configure do |config| 43 | config.expect_with :rspec do |expectations| 44 | expectations.include_chain_clauses_in_custom_matcher_descriptions = true 45 | end 46 | 47 | config.mock_with :rspec do |mocks| 48 | mocks.verify_partial_doubles = true 49 | end 50 | 51 | config.wait_timeout = 2 52 | 53 | config.include_context 'terminal session' 54 | end 55 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/strategies/history_spec.rb: -------------------------------------------------------------------------------- 1 | require 'strategies/special_characters_helper' 2 | 3 | describe 'the `history` suggestion strategy' do 4 | it 'suggests the last matching history entry' do 5 | with_history('ls foo', 'ls bar', 'echo baz') do 6 | session.send_string('ls') 7 | wait_for { session.content }.to eq('ls bar') 8 | end 9 | end 10 | 11 | context 'when ZSH_AUTOSUGGEST_HISTORY_IGNORE is set to a pattern' do 12 | let(:options) { ['ZSH_AUTOSUGGEST_HISTORY_IGNORE="* bar"'] } 13 | 14 | it 'does not make suggestions that match the pattern' do 15 | with_history('ls foo', 'ls bar', 'echo baz') do 16 | session.send_string('ls') 17 | wait_for { session.content }.to eq('ls foo') 18 | end 19 | end 20 | end 21 | 22 | include_examples 'special characters' 23 | end 24 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/strategies/match_prev_cmd_spec.rb: -------------------------------------------------------------------------------- 1 | require 'strategies/special_characters_helper' 2 | 3 | describe 'the `match_prev_cmd` strategy' do 4 | let(:options) { ['ZSH_AUTOSUGGEST_STRATEGY=match_prev_cmd'] } 5 | 6 | let(:history) { [ 7 | 'echo what', 8 | 'ls foo', 9 | 'echo what', 10 | 'ls bar', 11 | 'ls baz', 12 | 'echo what' 13 | ] } 14 | 15 | it 'suggests the last matching history entry after the previous command' do 16 | with_history(*history) do 17 | session.send_string('ls') 18 | wait_for { session.content }.to eq('ls bar') 19 | end 20 | end 21 | 22 | context 'when ZSH_AUTOSUGGEST_HISTORY_IGNORE is set to a pattern' do 23 | let(:options) { ['ZSH_AUTOSUGGEST_STRATEGY=match_prev_cmd', 'ZSH_AUTOSUGGEST_HISTORY_IGNORE="* bar"'] } 24 | 25 | it 'does not make suggestions that match the pattern' do 26 | with_history(*history) do 27 | session.send_string('ls') 28 | wait_for { session.content }.to eq('ls foo') 29 | end 30 | end 31 | end 32 | 33 | include_examples 'special characters' 34 | end 35 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/terminal_session.rb: -------------------------------------------------------------------------------- 1 | require 'securerandom' 2 | 3 | class TerminalSession 4 | ZSH_BIN = ENV['TEST_ZSH_BIN'] || 'zsh' 5 | 6 | def initialize(opts = {}) 7 | opts = { 8 | width: 80, 9 | height: 24, 10 | prompt: '', 11 | term: 'xterm-256color', 12 | zsh_bin: ZSH_BIN 13 | }.merge(opts) 14 | 15 | @opts = opts 16 | 17 | cmd="PS1=\"#{opts[:prompt]}\" TERM=#{opts[:term]} #{ZSH_BIN} -f" 18 | tmux_command("new-session -d -x #{opts[:width]} -y #{opts[:height]} '#{cmd}'") 19 | end 20 | 21 | def zsh_version 22 | @zsh_version ||= Gem::Version.new(`#{ZSH_BIN} -c 'echo -n $ZSH_VERSION'`) 23 | end 24 | 25 | def tmux_socket_name 26 | @tmux_socket_name ||= SecureRandom.hex(6) 27 | end 28 | 29 | def run_command(command) 30 | send_string(command) 31 | send_keys('enter') 32 | 33 | self 34 | end 35 | 36 | def send_string(str) 37 | tmux_command("send-keys -t 0 -l -- '#{str.gsub("'", "\\'")}'") 38 | 39 | self 40 | end 41 | 42 | def send_keys(*keys) 43 | tmux_command("send-keys -t 0 #{keys.join(' ')}") 44 | 45 | self 46 | end 47 | 48 | def paste_string(str) 49 | tmux_command("set-buffer -- '#{str}'") 50 | tmux_command("paste-buffer -dpr -t 0") 51 | 52 | self 53 | end 54 | 55 | def content(esc_seqs: false) 56 | cmd = 'capture-pane -p -t 0' 57 | cmd += ' -e' if esc_seqs 58 | tmux_command(cmd).strip 59 | end 60 | 61 | def clear_screen 62 | send_keys('C-l') 63 | 64 | i = 0 65 | until content == opts[:prompt] || i > 20 do 66 | sleep(0.1) 67 | i = i + 1 68 | end 69 | 70 | self 71 | end 72 | 73 | def destroy 74 | tmux_command('kill-session') 75 | end 76 | 77 | def cursor 78 | tmux_command("display-message -t 0 -p '\#{cursor_x},\#{cursor_y}'"). 79 | strip. 80 | split(','). 81 | map(&:to_i) 82 | end 83 | 84 | def attach! 85 | tmux_command('attach-session') 86 | end 87 | 88 | private 89 | 90 | attr_reader :opts 91 | 92 | def tmux_command(cmd) 93 | out = `tmux -u -L #{tmux_socket_name} #{cmd}` 94 | 95 | raise("tmux error running: '#{cmd}'") unless $?.success? 96 | 97 | out 98 | end 99 | end 100 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/widgets/disable_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'the `autosuggest-disable` widget' do 2 | before do 3 | session.run_command('bindkey ^B autosuggest-disable') 4 | end 5 | 6 | it 'disables suggestions and clears the suggestion' do 7 | with_history('echo hello') do 8 | session.send_string('echo') 9 | wait_for { session.content }.to eq('echo hello') 10 | 11 | session.send_keys('C-b') 12 | wait_for { session.content }.to eq('echo') 13 | 14 | session.send_string(' h') 15 | sleep 1 16 | expect(session.content).to eq('echo h') 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/widgets/enable_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'the `autosuggest-enable` widget' do 2 | before do 3 | session. 4 | run_command('typeset -g _ZSH_AUTOSUGGEST_DISABLED'). 5 | run_command('bindkey ^B autosuggest-enable') 6 | end 7 | 8 | it 'enables suggestions and fetches a suggestion' do 9 | with_history('echo hello') do 10 | session.send_string('e') 11 | sleep 1 12 | expect(session.content).to eq('e') 13 | 14 | session.send_keys('C-b') 15 | session.send_string('c') 16 | wait_for { session.content }.to eq('echo hello') 17 | end 18 | end 19 | 20 | context 'invoked on an empty buffer' do 21 | it 'does not fetch a suggestion' do 22 | with_history('echo hello') do 23 | session.send_keys('C-b') 24 | sleep 1 25 | expect(session.content).to eq('') 26 | end 27 | end 28 | end 29 | 30 | context 'invoked on a non-empty buffer' do 31 | it 'fetches a suggestion' do 32 | with_history('echo hello') do 33 | session.send_string('e') 34 | sleep 1 35 | expect(session.content).to eq('e') 36 | 37 | session.send_keys('C-b') 38 | wait_for { session.content }.to eq('echo hello') 39 | end 40 | end 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/widgets/fetch_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'the `autosuggest-fetch` widget' do 2 | context 'when suggestions are disabled' do 3 | before do 4 | session. 5 | run_command('bindkey ^B autosuggest-disable'). 6 | run_command('bindkey ^F autosuggest-fetch'). 7 | send_keys('C-b') 8 | end 9 | 10 | it 'will fetch and display a suggestion' do 11 | with_history('echo hello') do 12 | session.send_string('echo h') 13 | sleep 1 14 | expect(session.content).to eq('echo h') 15 | 16 | session.send_keys('C-f') 17 | wait_for { session.content }.to eq('echo hello') 18 | 19 | session.send_string('e') 20 | wait_for { session.content }.to eq('echo hello') 21 | end 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/spec/widgets/toggle_spec.rb: -------------------------------------------------------------------------------- 1 | describe 'the `autosuggest-toggle` widget' do 2 | before do 3 | session.run_command('bindkey ^B autosuggest-toggle') 4 | end 5 | 6 | it 'toggles suggestions' do 7 | with_history('echo world', 'echo hello') do 8 | session.send_string('echo') 9 | wait_for { session.content }.to eq('echo hello') 10 | 11 | session.send_keys('C-b') 12 | wait_for { session.content }.to eq('echo') 13 | 14 | session.send_string(' h') 15 | sleep 1 16 | expect(session.content).to eq('echo h') 17 | 18 | session.send_keys('C-b') 19 | wait_for { session.content }.to eq('echo hello') 20 | 21 | session.send_keys('C-h') 22 | session.send_string('w') 23 | wait_for { session.content }.to eq('echo world') 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/src/fetch.zsh: -------------------------------------------------------------------------------- 1 | 2 | #--------------------------------------------------------------------# 3 | # Fetch Suggestion # 4 | #--------------------------------------------------------------------# 5 | # Loops through all specified strategies and returns a suggestion 6 | # from the first strategy to provide one. 7 | # 8 | 9 | _zsh_autosuggest_fetch_suggestion() { 10 | typeset -g suggestion 11 | local -a strategies 12 | local strategy 13 | 14 | # Ensure we are working with an array 15 | strategies=(${=ZSH_AUTOSUGGEST_STRATEGY}) 16 | 17 | for strategy in $strategies; do 18 | # Try to get a suggestion from this strategy 19 | _zsh_autosuggest_strategy_$strategy "$1" 20 | 21 | # Ensure the suggestion matches the prefix 22 | [[ "$suggestion" != "$1"* ]] && unset suggestion 23 | 24 | # Break once we've found a valid suggestion 25 | [[ -n "$suggestion" ]] && break 26 | done 27 | } 28 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/src/highlight.zsh: -------------------------------------------------------------------------------- 1 | 2 | #--------------------------------------------------------------------# 3 | # Highlighting # 4 | #--------------------------------------------------------------------# 5 | 6 | # If there was a highlight, remove it 7 | _zsh_autosuggest_highlight_reset() { 8 | typeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT 9 | 10 | if [[ -n "$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT" ]]; then 11 | region_highlight=("${(@)region_highlight:#$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT}") 12 | unset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT 13 | fi 14 | } 15 | 16 | # If there's a suggestion, highlight it 17 | _zsh_autosuggest_highlight_apply() { 18 | typeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT 19 | 20 | if (( $#POSTDISPLAY )); then 21 | typeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT="$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE" 22 | region_highlight+=("$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT") 23 | else 24 | unset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT 25 | fi 26 | } 27 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/src/start.zsh: -------------------------------------------------------------------------------- 1 | 2 | #--------------------------------------------------------------------# 3 | # Start # 4 | #--------------------------------------------------------------------# 5 | 6 | # Start the autosuggestion widgets 7 | _zsh_autosuggest_start() { 8 | # By default we re-bind widgets on every precmd to ensure we wrap other 9 | # wrappers. Specifically, highlighting breaks if our widgets are wrapped by 10 | # zsh-syntax-highlighting widgets. This also allows modifications to the 11 | # widget list variables to take effect on the next precmd. However this has 12 | # a decent performance hit, so users can set ZSH_AUTOSUGGEST_MANUAL_REBIND 13 | # to disable the automatic re-binding. 14 | if (( ${+ZSH_AUTOSUGGEST_MANUAL_REBIND} )); then 15 | add-zsh-hook -d precmd _zsh_autosuggest_start 16 | fi 17 | 18 | _zsh_autosuggest_bind_widgets 19 | } 20 | 21 | # Mark for auto-loading the functions that we use 22 | autoload -Uz add-zsh-hook is-at-least 23 | 24 | # Automatically enable asynchronous mode in newer versions of zsh. Disable for 25 | # older versions because there is a bug when using async mode where ^C does not 26 | # work immediately after fetching a suggestion. 27 | # See https://github.com/zsh-users/zsh-autosuggestions/issues/364 28 | if is-at-least 5.0.8; then 29 | typeset -g ZSH_AUTOSUGGEST_USE_ASYNC= 30 | fi 31 | 32 | # Start the autosuggestion widgets on the next precmd 33 | add-zsh-hook precmd _zsh_autosuggest_start 34 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/src/strategies/history.zsh: -------------------------------------------------------------------------------- 1 | 2 | #--------------------------------------------------------------------# 3 | # History Suggestion Strategy # 4 | #--------------------------------------------------------------------# 5 | # Suggests the most recent history item that matches the given 6 | # prefix. 7 | # 8 | 9 | _zsh_autosuggest_strategy_history() { 10 | # Reset options to defaults and enable LOCAL_OPTIONS 11 | emulate -L zsh 12 | 13 | # Enable globbing flags so that we can use (#m) and (x~y) glob operator 14 | setopt EXTENDED_GLOB 15 | 16 | # Escape backslashes and all of the glob operators so we can use 17 | # this string as a pattern to search the $history associative array. 18 | # - (#m) globbing flag enables setting references for match data 19 | # TODO: Use (b) flag when we can drop support for zsh older than v5.0.8 20 | local prefix="${1//(#m)[\\*?[\]<>()|^~#]/\\$MATCH}" 21 | 22 | # Get the history items that match the prefix, excluding those that match 23 | # the ignore pattern 24 | local pattern="$prefix*" 25 | if [[ -n $ZSH_AUTOSUGGEST_HISTORY_IGNORE ]]; then 26 | pattern="($pattern)~($ZSH_AUTOSUGGEST_HISTORY_IGNORE)" 27 | fi 28 | 29 | # Give the first history item matching the pattern as the suggestion 30 | # - (r) subscript flag makes the pattern match on values 31 | typeset -g suggestion="${history[(r)$pattern]}" 32 | } 33 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/src/util.zsh: -------------------------------------------------------------------------------- 1 | 2 | #--------------------------------------------------------------------# 3 | # Utility Functions # 4 | #--------------------------------------------------------------------# 5 | 6 | _zsh_autosuggest_escape_command() { 7 | setopt localoptions EXTENDED_GLOB 8 | 9 | # Escape special chars in the string (requires EXTENDED_GLOB) 10 | echo -E "${1//(#m)[\"\'\\()\[\]|*?~]/\\$MATCH}" 11 | } 12 | -------------------------------------------------------------------------------- /.config/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh: -------------------------------------------------------------------------------- 1 | source ${0:A:h}/zsh-autosuggestions.zsh 2 | -------------------------------------------------------------------------------- /.config/zsh/themes/lambda.zsh-theme: -------------------------------------------------------------------------------- 1 | local ret_status="%(?:%{$fg_bold[green]%}λ :%{$fg_bold[red]%}λ )" 2 | PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)' 3 | 4 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}" 5 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " 6 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗" 7 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" 8 | -------------------------------------------------------------------------------- /.github/dots_bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if ! command -v git >/dev/null || ! pacman -Qi xdg-user-dirs >/dev/null; then 4 | echo "Installing required packages..." 5 | sudo pacman -Sy --noconfirm git xdg-user-dirs 6 | fi 7 | 8 | echo "Preparing folders..." 9 | sleep 1 && clear 10 | 11 | if [ ! -e $HOME/.config/user-dirs.dirs ]; then 12 | xdg-user-dirs-update 13 | echo "Creating xdg-user-dirs..." 14 | sleep 1 && clear 15 | else 16 | xdg-user-dirs-update 17 | echo "user-dirs.dirs already exists!" 18 | sleep 1 && clear 19 | fi 20 | 21 | sleep 1 && clear 22 | 23 | echo "Downloading dotfiles repository..." 24 | git clone https://github.com/seeingangelz/dotfiles.git $HOME/Documents/dotfiles 25 | 26 | cd $HOME/Documents/dotfiles/ 27 | -------------------------------------------------------------------------------- /.local/bin/alwayslock: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | while true; do 3 | player_status=$(playerctl status 2> /dev/null) 4 | if [[ "$player_status" == "Playing" ]]; then 5 | if ps -C xautolock >/dev/null; then 6 | pkill -f "xautolock -detectsleep" 7 | fi 8 | else 9 | if ! ps -C xautolock >/dev/null; then 10 | xautolock -detectsleep -time 10 -locker "(xset dpms force off; betterlockscreen -l)" \ 11 | -notify 15 -notifier "notify-send 'SLOCK' 'Screen will be locked in 15 seconds.\nPress any key to cancel.'" & 12 | fi 13 | fi 14 | sleep 10 15 | done 16 | -------------------------------------------------------------------------------- /.local/bin/calendar: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if pgrep yad >/dev/null 2>&1; then 3 | pkill yad 4 | else 5 | yad --title='Calendar' --calendar --no-buttons --undecorated --posx=1630 --posy=43 & 6 | fi 7 | -------------------------------------------------------------------------------- /.local/bin/colorpicker: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | color=$(gpick --single --output) 4 | if [ -n "$color" ]; then 5 | echo -n "$color" | xclip -selection clipboard 6 | notify-send "HEX code sent to your clipboard!" 7 | fi 8 | -------------------------------------------------------------------------------- /.local/bin/dfiles: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ARCHIVE="DWM 4 | ST 5 | DMENU 6 | DWMBLOCKS 7 | ZSH 8 | NEOVIM 9 | PACKER 10 | PICOM" 11 | DMENUCHOICE=$(printf "$ARCHIVE" | dmenu -l 8 -p "EDIT:") 12 | 13 | case $DMENUCHOICE in 14 | DWM) st -e nvim $HOME/.config/suckless/dwm/config.def.h ;; 15 | ST) st -e nvim $HOME/.config/suckless/st/config.def.h ;; 16 | DMENU) st -e nvim $HOME/.config/suckless/dmenu/config.def.h ;; 17 | DWMBLOCKS) st -e nvim $HOME/.config/suckless/dwmblocks-async/config.c ;; 18 | NEOVIM) st -e nvim $HOME/.config/nvim/init.lua ;; 19 | PACKER) st -e nvim $HOME/.config/nvim/lua/aeon/plugins.lua ;; 20 | ZSH) st -e nvim $HOME/.config/zsh/.zshrc ;; 21 | PICOM) st -e nvim $HOME/.config/picom/picom.conf ;; 22 | esac 23 | -------------------------------------------------------------------------------- /.local/bin/dots: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DIRECTORIES="DOTFILES 4 | DWM 5 | ST 6 | DMENU 7 | DWMBLOCKS" 8 | DMENUCHOICE=$(printf "$DIRECTORIES" | dmenu -l 5 -p "Select directory:") 9 | 10 | case $DMENUCHOICE in 11 | DOTFILES) st -d ~/Documents/dotfiles/ ;; 12 | DWM) st -d ~/Documents/dotfiles/.config/suckless/dwm/ ;; 13 | ST) st -d ~/Documents/dotfiles/.config/suckless/st/ ;; 14 | DMENU) st -d ~/Documents/dotfiles/.config/suckless/dmenu/ ;; 15 | DWMBLOCKS) st -d ~/Documents/dotfiles/.config/suckless/dwmblocks-async/ ;; 16 | esac 17 | -------------------------------------------------------------------------------- /.local/bin/droidmount: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | dir=~/Documents/android 3 | 4 | # Make the cell directory if it doesn't exist 5 | if [ ! -d "$dir" ]; then 6 | mkdir "$dir" 7 | fi 8 | 9 | # Select device 10 | Devices=$(simple-mtpfs -l) 11 | 12 | if [ ! -n "$Devices" ]; then 13 | notify-send "No devices found" 14 | exit 15 | else 16 | Device=$(echo "$Devices" | dmenu -l 10 -p "Select device:" || notify-send "No device selected") 17 | Id=${Device%%:*} 18 | Name=${Device##*: } 19 | if [ ! -d "$dir/$Name" ]; then 20 | mkdir "$dir/$Name" 21 | fi 22 | fi 23 | 24 | if [ ! -n "$(find "$dir/$Name" -maxdepth 0 -empty)" ]; then 25 | fusermount -u "$dir/$Name" && notify-send "Android Mount" "Device unmounted" 26 | else 27 | simple-mtpfs --device "$Id" "$dir/$Name" && notify-send "Android mount" "Device mounted in $dir/$Name" 28 | fi 29 | -------------------------------------------------------------------------------- /.local/bin/dstreaming: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #input a movie variable 4 | search=$(dmenu -l 1 -p "Search a movie" < /dev/null) 5 | # change the search variable spaces with + 6 | query=$(printf "$search" | tr ' ' '+' ) 7 | #if statement to see if search variable is NULL 8 | if [ -z "$search" ]; then 9 | exit 0 10 | fi 11 | site="https://1337x.to/search/$query/1/" 12 | magnet="https://1337x.to/" 13 | # search the movie on 1337x and send output to dmenu prompt 14 | movie=$(curl -s $site | grep -o 'torrent/[^"]*' | dmenu -l 20 -p 'which movie?') 15 | magnetlink=$( curl -s $magnet$movie | grep -Po 'magnet:[^"]*' | head -n 1) 16 | 17 | #if statement to see if magnetlink variable is NULL 18 | 19 | if [ -z "$magnetlink" ]; then 20 | exit 0 21 | elif [ -n "$magnetlink" ]; then 22 | choices=$(printf "Watch\nDownload" | dmenu -l 2 -p 'What to do? ') 23 | if [ $choices == "Watch" ]; then 24 | st -e webtorrent "$magnetlink" --mpv --no-quit 25 | else 26 | format=$(printf "$query" | tr '+' ' ') 27 | transmission-remote -a "$magnetlink" -w ~/ 28 | notify-send "$format adicionado para download" 29 | fi 30 | fi 31 | -------------------------------------------------------------------------------- /.local/bin/dwall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | is_process_running() { 4 | pgrep -x "$1" >/dev/null 5 | } 6 | 7 | if is_process_running "dwm"; then 8 | window_manager="dwm" 9 | elif is_process_running "awesome"; then 10 | window_manager="awesome" 11 | else 12 | window_manager="unknown" 13 | fi 14 | 15 | set -e 16 | WALLPAPER_PATH="$HOME/Pictures/wallpapers/" 17 | DMENU="$(ls $WALLPAPER_PATH | dmenu -p "Set Wallpaper:" -l 20)" 18 | SELECTED="$WALLPAPER_PATH$DMENU" 19 | if [ -z "$DMENU"]; then 20 | exit 0 21 | else 22 | wal -i $SELECTED 23 | sed -i ~/.Xresources -re '1,1000d' 24 | cat ~/.cache/wal/colors.Xresources >> ~/.Xresources 25 | oomox-cli /opt/oomox/scripted_colors/xresources/xresources-reverse 26 | wal-telegram -t 27 | pywalfox update 28 | killall dunst && dunst & 29 | 30 | if [ "$window_manager" = "dwm" ]; then 31 | killall dwm 32 | dwmblocks & 33 | elif [ "$window_manager" = "awesome" ]; then 34 | pkill -HUP awesome 35 | picom --experimental-backends 36 | fi 37 | 38 | pkill sxiv 39 | notify-send "Enjoy your new colorscheme!" 40 | fi 41 | -------------------------------------------------------------------------------- /.local/bin/dwifi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ssid=$(nmcli dev wifi list | dmenu -l 30 -p 'Connect:' | awk '{print $2}') 4 | 5 | [ -n "$ssid" ] && passwd=$(printf '' | dmenu -P -p 'Password?') 6 | 7 | [ -n "$passwd" ] && status=$(nmcli dev wifi connect "$ssid" password "$passwd") 8 | 9 | [ -n "$status" ] && notify-send "wificli" "$status" 10 | -------------------------------------------------------------------------------- /.local/bin/layoutmenu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cat </dev/null 2>&1 10 | 11 | case $1 in 12 | info) 13 | notify-send --icon="$cover_path" "Now Playing ♫" "$(mpc current)" 14 | ;; 15 | toggle) 16 | mpc toggle 17 | mpc_status="$(mpc status | awk 'NR==2 {print $1}')" 18 | case "$mpc_status" in 19 | "[paused]") 20 | notify-send --icon="$cover_path" "Paused" "$(mpc current)" 21 | ;; 22 | "[playing]") 23 | notify-send --icon="$cover_path" "Resume" "$(mpc current)" 24 | ;; 25 | esac 26 | ;; 27 | esac 28 | 29 | rm -f "$cover_path" 30 | -------------------------------------------------------------------------------- /.local/bin/nightmode: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | CHOICES="ON 4 | OFF" 5 | 6 | OPTION=$(printf "$CHOICES" | dmenu -l 2 -p "NIGHT MODE:") 7 | 8 | case $OPTION in 9 | ON) redshift ;; 10 | OFF) pkill redshift ;; 11 | esac 12 | -------------------------------------------------------------------------------- /.local/bin/playerctlstatus: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if pgrep -x "cmus" > /dev/null; then 4 | case $1 in 5 | play-pause) 6 | playerctl play-pause 7 | ;; 8 | next) 9 | playerctl next 10 | ;; 11 | previous) 12 | playerctl previous 13 | ;; 14 | esac 15 | else 16 | case $1 in 17 | play-pause) 18 | status=$(playerctl status) 19 | playerctl play-pause 20 | if [ "$status" = "Paused" ]; then 21 | notify-send "Playing" -i "$(playerctl metadata --format '{{mpris:artUrl}}')" "$(playerctl metadata --format '{{xesam:title}}')" 22 | else 23 | notify-send "Paused" -i "$(playerctl metadata --format '{{mpris:artUrl}}')" "$(playerctl metadata --format '{{xesam:title}}')" 24 | fi 25 | ;; 26 | next) 27 | playerctl next 28 | notify-send "Playing" -i "$(playerctl metadata --format '{{mpris:artUrl}}')" "$(playerctl metadata --format '{{xesam:title}}')" 29 | ;; 30 | previous) 31 | playerctl previous 32 | notify-send "Playing" -i "$(playerctl metadata --format '{{mpris:artUrl}}')" "$(playerctl metadata --format '{{xesam:title}}')" 33 | ;; 34 | esac 35 | fi 36 | -------------------------------------------------------------------------------- /.local/bin/screenshot: -------------------------------------------------------------------------------- 1 | filename="$(mktemp).png" 2 | flameshot gui -r -c > "$filename" && [ -s "$filename" ] && { 3 | xclip -selection clipboard -t image/png < "$filename" 4 | notify-send -i "$filename" "Screenshot captured!" 5 | } 6 | -------------------------------------------------------------------------------- /.local/bin/snipertext: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | flameshot gui -p /tmp/screenshot.png > /dev/null 2>&1 4 | 5 | if [ -f /tmp/screenshot.png ]; then 6 | tesseract /tmp/screenshot.png stdout -l eng+por | xclip -selection clipboard; 7 | rm /tmp/screenshot.png; 8 | notify-send "Text copied to clipboard" 9 | else 10 | true 11 | fi 12 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_battery: -------------------------------------------------------------------------------- 1 | acpi=`acpi -b` 2 | if echo $acpi | grep -q "Charging"; then 3 | bat=`echo $acpi | awk '{print $4}' | sed s/,//` 4 | echo -e " $bat" 5 | else 6 | bat=`echo $acpi | awk '{print $4}' | sed s/,//` 7 | charge=`echo $bat | sed -e 's/%//g'` 8 | if [ $charge -gt 75 ]; then 9 | echo -e " $bat" 10 | elif [ $charge -gt 50 ]; then 11 | echo -e " $bat" 12 | elif [ $charge -gt 25 ]; then 13 | echo -e " $bat" 14 | else 15 | echo -e " $bat" 16 | fi 17 | fi 18 | 19 | case $BLOCK_BUTTON in 20 | 3) notify-send "Battery module" " : discharging 21 |  : charging 22 |  : charged 23 |  : battery very low! 24 | 25 | - Scroll to change adjust xbacklight." ;; 26 | 4) statusbrightness up ;; 27 | 5) statusbrightness down ;; 28 | 6) st -e nvim "$0" ;; 29 | esac 30 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_bri: -------------------------------------------------------------------------------- 1 | bri=`xbacklight -get` 2 | echo -e " $bri%" 3 | 4 | case $BLOCK_BUTTON in 5 | 4) statusbrightness up ;; 6 | 5) statusbrightness down ;; 7 | 6) st -e nvim "$0" ;; 8 | esac 9 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_cmus: -------------------------------------------------------------------------------- 1 | if pgrep -x "cmus" > /dev/null; then 2 | output=$(cmus-remote -Q) 3 | artist=$(echo "$output" | awk '/artist/ { if (found != 1) { found=1; for (i=3; i<=NF; i++) { printf "%s ", $i } } }') 4 | title=$(echo "$output" | awk '/title/ { for (i=3; i<=NF; i++) { printf "%s ", $i } }') 5 | if [ -z "$artist" ] && [ -z "$title" ]; then 6 | echo "" 7 | else 8 | echo -e " $artist- $title" | sed 's/.$//' 9 | fi 10 | fi 11 | 12 | case $BLOCK_BUTTON in 13 | 1) xdotool key --clearmodifiers "Super_L+F4" ;; 14 | 3) cmus-remote -u ;; 15 | 4) statusvolume up ;; 16 | 5) statusvolume down ;; 17 | 6) st -e nvim "$0" ;; 18 | esac 19 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_cpu: -------------------------------------------------------------------------------- 1 | cpu(){ 2 | read cpu a b c previdle rest < /proc/stat 3 | prevtotal=$((a+b+c+previdle)) 4 | sleep 0.5 5 | read cpu a b c idle rest < /proc/stat 6 | total=$((a+b+c+idle)) 7 | cpu=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) )) 8 | echo -e " $cpu%" 9 | } 10 | 11 | temp(){ 12 | sensors | grep Tctl | awk '{print $2}' 13 | } 14 | 15 | echo "$(cpu)" 16 | 17 | case $BLOCK_BUTTON in 18 | 1) xdotool key --clearmodifiers "Super_L+F8"; ;; 19 | 3) notify-send "CPU usage" "$(ps axch -o cmd,%cpu --sort=-%cpu | head)" ;; 20 | 6) st -e nvim "$0" ;; 21 | esac 22 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_date: -------------------------------------------------------------------------------- 1 | dte="$(date +"%d/%m  %H:%M")" 2 | echo -e "󰸗 $dte" 3 | 4 | case $BLOCK_BUTTON in 5 | 1) calendar ;; 6 | 6) st -e nvim "$0" ;; 7 | esac 8 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_hdd: -------------------------------------------------------------------------------- 1 | hdd=`df -h --output=used,pcent / | awk 'NR==2{print $1" "$2}'` 2 | echo -e " $hdd" 3 | 4 | case $BLOCK_BUTTON in 5 | 1) xdotool key --clearmodifiers "Super_L+F8"; ;; 6 | 3) notify-send "System status" "Disk usage:\n$(df -h | awk '/^\/dev/{print $NF ": " $3}')\n\nRoot usage:\n$(df -h | awk '$NF=="/"{printf "Used: %s/%s (%.2f%%)\n", $3, $2, $5}')" ;; 7 | 6) st -e nvim "$0" ;; 8 | esac 9 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_kern: -------------------------------------------------------------------------------- 1 | kern=`uname -r` 2 | echo " $kern" 3 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_mem: -------------------------------------------------------------------------------- 1 | mem=`free -h | awk '/^Mem/ { print $3"/"$2 }' | sed 's/i//g'` 2 | echo -e " $mem" 3 | 4 | case $BLOCK_BUTTON in 5 | 1) xdotool key --clearmodifiers "Super_L+F8"; ;; 6 | 3) notify-send "RAM usage" "$(ps axch -o cmd,rss | awk '{printf "%-30s %s\n", $1, $2/1024}' | sort -k2 -n -r | head | awk '{printf "%-30s %s\n", $1, $2}')" ;; 7 | 6) st -e nvim "$0" ;; 8 | esac 9 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_mic: -------------------------------------------------------------------------------- 1 | pctlHead=$(pactl list sources | grep -v monitor | grep -A 7 -e 'Name: .\+analog-stereo') 2 | isMute=$(echo "$pctlHead" | grep Mute | awk '{print $2}') 3 | vol=$(echo "$pctlHead" | grep -m 1 Volume | awk '{print $5}' | sed 's/%$//') 4 | 5 | if [[ $isMute = "yes" ]]; then 6 | echo -en "" 7 | else 8 | if [[ $vol -eq 0 ]]; then 9 | echo -en "" 10 | else 11 | echo -en " $vol%" 12 | fi 13 | fi 14 | 15 | case $BLOCK_BUTTON in 16 | 1) xdotool key --clearmodifiers "Super_L+F6"; kill -41 $(pidof dwmblocks) ;; 17 | 2) statusmic mute ;; 18 | 3) notify-send " Microphone module" "\- Shows volume ,  if muted. 19 | - Middle click to mute." ;; 20 | 4) statusmic up ;; 21 | 5) statusmic down ;; 22 | 6) st -e nvim "$0" ;; 23 | esac 24 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_mpd: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | current_song=$(mpc current) 4 | 5 | echo "$(if [ -n "$current_song" ]; then echo " $current_song"; fi)" 6 | 7 | case $BLOCK_BUTTON in 8 | 1) mpdnotify toggle ;; 9 | 4) statusvolume up ;; 10 | 5) statusvolume down ;; 11 | 6) st -e nvim "$0" ;; 12 | esac 13 | fi 14 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_net: -------------------------------------------------------------------------------- 1 | if ping -c 1 "9.9.9.9" > /dev/null; then 2 | echo -e "󰖩 " 3 | else 4 | echo -e "󱛅 " 5 | fi 6 | 7 | case $BLOCK_BUTTON in 8 | 1) setsid -f st -n spterm -g 120x34 -e sh -c "nmtui; exec zsh" ;; 9 | 1) st -e nmtui ;; 10 | 3) notify-send " Internet module" "\- Click to connect 11 | 12 | 󰖩 internet connection 13 | 󱛅 no internet connection 14 | " ;; 15 | 6) st -e nvim "$0" ;; 16 | esac 17 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_nettraf: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | update() { 4 | sum=0 5 | for arg; do 6 | read -r i < "$arg" 7 | sum=$(( sum + i )) 8 | done 9 | cache=/tmp/${1##*/} 10 | [ -f "$cache" ] && read -r old < "$cache" || old=0 11 | printf %d\\n "$sum" > "$cache" 12 | printf %d\\n $(( sum - old )) 13 | } 14 | 15 | rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes) 16 | tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes) 17 | 18 | printf " %4sB  %4sB\\n" $(numfmt --to=iec $rx $tx) 19 | 20 | case $BLOCK_BUTTON in 21 | 1) st -e bmon ;; 22 | 3) notify-send " Network traffic module" ": Traffic received 23 | : Traffic transmitted" ;; 24 | 6) st -e nvim "$0" ;; 25 | esac 26 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_spotify: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | main() { 3 | if ! pgrep -x spotify >/dev/null; then 4 | echo ""; exit 5 | fi 6 | 7 | cmd="org.freedesktop.DBus.Properties.Get" 8 | domain="org.mpris.MediaPlayer2" 9 | path="/org/mpris/MediaPlayer2" 10 | 11 | meta=$(dbus-send --print-reply --dest=${domain}.spotify \ 12 | /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:${domain}.Player string:Metadata) 13 | 14 | artist=$(echo "$meta" | sed -nr '/xesam:artist"/,+2s/^ +string "(.*)"$/\1/p' | tail -1 | sed 's/\&/\\&/g' | sed 's#\/#\\/#g') 15 | album=$(echo "$meta" | sed -nr '/xesam:album"/,+2s/^ +variant +string "(.*)"$/\1/p' | tail -1| sed 's/\&/\\&/g'| sed 's#\/#\\/#g') 16 | title=$(echo "$meta" | sed -nr '/xesam:title"/,+2s/^ +variant +string "(.*)"$/\1/p' | tail -1 | sed 's/\&/\\&/g'| sed 's#\/#\\/#g') 17 | 18 | echo " ${*:-%artist% - %title%} " | sed "s/%artist%/$artist/g;s/%title%/$title/g;s/%album%/$album/g"i | sed "s/\&/\&/g" | sed "s#\/#\/#g" 19 | } 20 | 21 | main "$@" 22 | 23 | case $BLOCK_BUTTON in 24 | 1) playerctl play-pause ;; 25 | 6) st -e nvim "$0" ;; 26 | esac 27 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_upd: -------------------------------------------------------------------------------- 1 | NUM_UPDATES=$(checkupdates | wc -l ) > /dev/null 2 | if [ $NUM_UPDATES -gt 0 ]; then 3 | echo " $NUM_UPDATES" 4 | fi 5 | 6 | case $BLOCK_BUTTON in 7 | 1) setsid -f st -n spterm -g 90x20 -e sh -c "sudo pacman -Syu && kill -42 $(pidof dwmblocks) > /dev/null 2>&1 && setxkbmap br; exec zsh" ;; 8 | 2) xdotool key --clearmodifiers "Super_L+Shift+Return"; ;; 9 | 3) notify-send "UPDATES AVALIABLE:" "$(checkupdates | awk '{print $1}')" ;; 10 | 6) st -e nvim "$0" ;; 11 | esac 12 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_vol: -------------------------------------------------------------------------------- 1 | status=$(pulsemixer --get-mute) 2 | if [ -n "$status" ] && [ "$status" == "1" ]; then 3 | echo -e "󰖁" 4 | else 5 | vol=$(pulsemixer --get-volume | awk '{print ($1+$2)/2}') 6 | if [ $(echo "$vol >= 1 && $vol <= 49" | bc) -eq 1 ]; then 7 | echo -e "󰖀 $vol%" 8 | else 9 | if [ $(echo "$vol == 0" | bc) -eq 1 ]; then 10 | echo -e "󰝟" 11 | else 12 | echo -e "󰕾 $vol%" 13 | fi 14 | fi 15 | fi 16 | 17 | case $BLOCK_BUTTON in 18 | 1) xdotool key --clearmodifiers "Super_L+F6"; kill -41 $(pidof dwmblocks) ;; 19 | 2) statusvolume mute ;; 20 | 4) statusvolume up ;; 21 | 5) statusvolume down ;; 22 | 3) notify-send " Volume module" "\- Shows volume  , 󰖁 if muted. 23 | - Middle click to mute. 24 | - Scroll to change." ;; 25 | 6) st -e nvim "$0" ;; 26 | esac 27 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_wtr: -------------------------------------------------------------------------------- 1 | wtr=`curl -s "wttr.in/?format=3" | grep -o -E '[0-9]+°C'` 2 | echo -e "󰀸 $wtr" 3 | -------------------------------------------------------------------------------- /.local/bin/statusbar/s_xkb: -------------------------------------------------------------------------------- 1 | layout=$(setxkbmap -query | awk '/layout/{print $2}') 2 | echo " $layout" 3 | -------------------------------------------------------------------------------- /.local/bin/statusbrightness: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | bar_color="#ffffff" 4 | hi_bar_color="#ffffff" 5 | brightness_step=10 6 | 7 | # Uses regex to get brightness from xbacklight 8 | function get_brightness { 9 | xbacklight -get 10 | } 11 | 12 | # Always returns the same icon - I couldn't get the brightness-low icon to work with fontawesome 13 | function get_brightness_icon { 14 | brightness_icon="" 15 | } 16 | 17 | # Displays a brightness notification using dunstify 18 | function show_brightness_notif { 19 | brightness=$(get_brightness) 20 | get_brightness_icon 21 | dunstify -i brightness -t 1000 -r 2593 -u normal "$brightness_icon $brightness%" -h int:value:$brightness -h string:hlcolor:$bar_color 22 | } 23 | 24 | # Main function - Takes user input, "up", or "down" 25 | case $1 in 26 | up) 27 | # Increases brightness and displays the notification 28 | xbacklight -inc $brightness_step -time 0 29 | show_brightness_notif 30 | kill -51 $(pidof dwmblocks) 31 | ;; 32 | 33 | down) 34 | # Decreases brightness and displays the notification 35 | xbacklight -dec $brightness_step -time 0 36 | show_brightness_notif 37 | kill -51 $(pidof dwmblocks) 38 | ;; 39 | esac 40 | -------------------------------------------------------------------------------- /.local/bin/statusmic: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | bar_color="#ffffff" 4 | hi_bar_color="#ffffff" 5 | volume_step=5 6 | max_volume=125 7 | 8 | # Uses regex to get volume from pactl 9 | function get_volume { 10 | pactl get-source-volume @DEFAULT_SOURCE@ | grep -Po '[0-9]{1,3}(?=%)' | head -1 11 | } 12 | 13 | # Uses regex to get mute status from pactl 14 | function get_mute { 15 | pactl get-source-mute @DEFAULT_SOURCE@ | grep -Po '(?<=Mute: )(yes|no)' 16 | } 17 | 18 | # Returns a mute icon, a volume-low icon, or a volume-high icon, depending on the volume 19 | function get_volume_icon { 20 | volume=$(get_volume) 21 | mute=$(get_mute) 22 | if [ "$volume" -eq 0 ] || [ "$mute" == "yes" ] ; then 23 | volume_icon="" 24 | elif [ "$volume" -le 25 ]; then 25 | volume_icon="" 26 | elif [ "$volume" -le 50 ]; then 27 | volume_icon="" 28 | elif [ "$volume" -le 100 ]; then 29 | volume_icon="" 30 | elif [ "$volume" -gt 100 ]; then 31 | volume_icon="" 32 | fi 33 | } 34 | 35 | # Displays a volume notification using dunstify 36 | function show_volume_notif { 37 | volume=$(get_volume) 38 | get_volume_icon 39 | if [ "$volume" -gt 100 ]; then 40 | dunstify -t 1000 -r 2593 -u normal "$volume_icon $volume%" -h int:value:$volume -h string:hlcolor:$hi_bar_color 41 | else 42 | dunstify -t 1000 -r 2593 -u normal "$volume_icon $volume%" -h int:value:$volume -h string:hlcolor:$bar_color 43 | fi 44 | } 45 | 46 | # Main function - Takes user input, "up", "down" or "mute" 47 | case $1 in 48 | up) 49 | # Unmutes and increases volume, then displays the notification 50 | pactl set-source-mute @DEFAULT_SOURCE@ 0 51 | volume=$(get_volume) 52 | if [ $(( "$volume" + "$volume_step" )) -gt $max_volume ]; then 53 | pactl set-source-volume @DEFAULT_SOURCE@ $max_volume% 54 | else 55 | pactl set-source-volume @DEFAULT_SOURCE@ +$volume_step% 56 | fi 57 | show_volume_notif 58 | kill -43 $(pidof dwmblocks) 59 | ;; 60 | 61 | down) 62 | # Raises volume and displays the notification 63 | pactl set-source-volume @DEFAULT_SOURCE@ -$volume_step% 64 | show_volume_notif 65 | kill -43 $(pidof dwmblocks) 66 | ;; 67 | 68 | mute) 69 | # Toggles mute and displays the notification 70 | pactl set-source-mute @DEFAULT_SOURCE@ toggle 71 | show_volume_notif 72 | kill -43 $(pidof dwmblocks) 73 | ;; 74 | esac 75 | -------------------------------------------------------------------------------- /.local/bin/updnotify: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | while true; do 4 | count=$(checkupdates | wc -l) 5 | 6 | if [ "$count" -gt 0 ]; then 7 | notify-send "UPDATES AVAILABLE:" "$count packages are ready to update." 8 | fi 9 | 10 | sleep 1h 11 | done 12 | -------------------------------------------------------------------------------- /.local/bin/wg: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | wallpaper_dir="$HOME/Pictures/wallpapers" 4 | 5 | if [ ! -d "$wallpaper_dir" ]; then 6 | notify-send "Wallpaper directory not found" 7 | exit 1 8 | fi 9 | 10 | sxiv -t -b "$wallpaper_dir" & 11 | sxiv_pid=$! 12 | 13 | while ! ps -p $sxiv_pid > /dev/null; do 14 | sleep 1 15 | done 16 | 17 | notify-send "Select your wallpaper!" 18 | -------------------------------------------------------------------------------- /.xinitrc: -------------------------------------------------------------------------------- 1 | # Set variables for the locations of the system and user Xresources and Xmodmap files 2 | sysresources=/etc/X11/xinit/Xresources 3 | userresources=$HOME/.Xresources 4 | 5 | # Set the wallpaper using wal 6 | wal -R & 7 | 8 | # Start the compositor (picom) with experimental backends enabled 9 | picom & 10 | 11 | # Start dunst 12 | dunst & 13 | 14 | # Start dwmblocks 15 | dwmblocks & 16 | 17 | # Start clipmenud 18 | clipmenud & 19 | 20 | # Enable numlock 21 | numlockx on & 22 | 23 | # Start udiskie 24 | udiskie & 25 | 26 | # Start xsettingsd 27 | xsettingsd & 28 | 29 | # Set the keyboard layout to brazilian portuguese 30 | setxkbmap br & 31 | 32 | # Start xautolock 33 | alwayslock & 34 | 35 | # Check updates 36 | updnotify & 37 | 38 | # Check if sysresources and sysmodmap exist 39 | if [ -f $sysresources ]; then 40 | xrdb -merge $sysresources 41 | fi 42 | 43 | # Check if userresources exist 44 | if [ -f "$userresources" ]; then 45 | xrdb -merge "$userresources" 46 | fi 47 | 48 | # Run ssh-agent and dwm in an infinite loop 49 | while :; do 50 | ssh-agent dwm 51 | done 52 | 53 | # Execute wm 54 | exec dbus-launch --sh-syntax --exit-with-session dwm 55 | #exec dbus-launch --sh-syntax --exit-with-session awesome 56 | -------------------------------------------------------------------------------- /.zshenv: -------------------------------------------------------------------------------- 1 | export XDG_CONFIG_HOME="$HOME/.config" 2 | export ZDOTDIR=$XDG_CONFIG_HOME/zsh 3 | export XDG_CACHE_HOME="$HOME/.cache" 4 | export ZSH_CACHE_DIR="$XDG_CACHE_HOME/zsh" 5 | export ZSH_COMPDUMP="${ZSH_CACHE_DIR}/.zcompdump-${(%):-%m}-${ZSH_VERSION}" 6 | --------------------------------------------------------------------------------