├── .config ├── alacritty │ ├── alacritty-light.yml │ └── alacritty-nord.yml ├── bspwm │ ├── bin │ │ ├── apps_as_root │ │ ├── askpass │ │ ├── bspbar │ │ ├── bspcolors │ │ ├── bspcomp │ │ ├── bspfloat │ │ ├── bspterm │ │ └── winmask │ ├── bspwmrc │ ├── bspwmrc-gruvbox │ ├── flag │ ├── polybar │ │ ├── colors │ │ ├── colors-gruvbox │ │ ├── colors-light │ │ ├── colors-nord │ │ ├── colors-solar │ │ ├── config │ │ └── script │ │ │ ├── openweathermap-fullfeatured.sh │ │ │ └── weather-bar.sh │ ├── rofi │ │ ├── bin │ │ │ ├── asroot │ │ │ ├── confirm │ │ │ ├── launcher │ │ │ ├── mpd │ │ │ ├── network │ │ │ ├── powermenu │ │ │ ├── screenshot │ │ │ ├── themes │ │ │ └── windows │ │ └── themes │ │ │ ├── askpass.rasi │ │ │ ├── asroot.rasi │ │ │ ├── colors-light.rasi │ │ │ ├── colors-nord.rasi │ │ │ ├── colors.rasi │ │ │ ├── confirm.rasi │ │ │ ├── launcher.rasi │ │ │ ├── mpd.rasi │ │ │ ├── network.rasi │ │ │ ├── networkmenu.rasi │ │ │ ├── powermenu.rasi │ │ │ ├── screenshot.rasi │ │ │ ├── themes.rasi │ │ │ └── window.rasi │ └── scripts │ │ ├── start.sh │ │ └── start_ides.sh ├── cava │ └── config ├── conky │ └── conky.conf ├── dunst │ ├── dunstrc │ ├── dunstrc-gruvbox │ ├── dunstrc-light │ ├── dunstrc-nord │ ├── dunstrc-solar │ └── sid ├── fcitx5 │ └── conf │ │ └── classicui.conf ├── fish │ ├── completions │ │ └── fisher.fish │ ├── conf.d │ │ └── omf.fish │ ├── config.fish │ ├── fish_plugins │ ├── fish_variables │ └── functions │ │ ├── add_manga.fish │ │ ├── addmanga.fish │ │ ├── custom_fetch.fish │ │ ├── dwm_recompile.fish │ │ ├── fetch.fish │ │ ├── fisher.fish │ │ ├── gofile.fish │ │ ├── light.fish │ │ ├── manga_menu.fish │ │ ├── manga_update.fish │ │ ├── nord.fish │ │ ├── openmanga.fish │ │ ├── playerstatus.fish │ │ ├── record.fish │ │ ├── recording.fish │ │ ├── river_c.fish │ │ ├── update_mangas.fish │ │ ├── vim.fish │ │ ├── wofar.fish │ │ └── wofer.fish ├── i3 │ ├── Blocks │ │ ├── bandwidth │ │ ├── battery │ │ ├── brightness │ │ ├── cpu │ │ ├── fcitx │ │ ├── firewall │ │ ├── headphone │ │ ├── keystate │ │ ├── mediaplayer │ │ ├── memory │ │ ├── microphone │ │ ├── notifier │ │ ├── playerctl2 │ │ ├── ssid │ │ ├── sslocal │ │ ├── temperature │ │ ├── time │ │ ├── usb │ │ ├── volume │ │ ├── weather │ │ ├── webcam │ │ └── window │ ├── Pictures │ │ └── b-1.png │ ├── bin │ │ └── i3bar │ ├── config │ ├── i3blocks.conf │ └── polybar │ │ ├── colors │ │ ├── colors-gruvbox │ │ ├── colors-light │ │ ├── colors-nord │ │ ├── colors-solar │ │ ├── config │ │ └── script │ │ ├── openweathermap-fullfeatured.sh │ │ └── weather-bar.sh ├── kitty │ ├── kitty-w.conf │ ├── kitty.conf │ ├── nord.conf │ └── polar.conf ├── mako │ └── config ├── neofetch │ └── config.conf ├── nvim │ ├── init.vim │ └── plugin │ │ ├── a_map.vim │ │ ├── a_sets.vim │ │ ├── b_gitgutter.vim │ │ ├── b_lightline.vim │ │ ├── b_markdown.vim │ │ ├── b_nerdtree.vim │ │ ├── b_ycm.vim │ │ ├── c_colorscheme.vim │ │ └── d_filetypes.vim ├── picom │ └── picom.conf ├── polybar │ ├── colors │ ├── colors-gruvbox │ ├── colors-light │ ├── colors-nord │ ├── colors-solar │ ├── config │ └── script │ │ ├── openweathermap-fullfeatured.sh │ │ └── weather-bar.sh ├── rofi │ ├── colors-light.rasi │ ├── colors-nord.rasi │ ├── colors.rasi │ ├── config.rasi │ ├── light.rasi │ ├── networkmenu.rasi │ └── nord.rasi ├── spectrwm │ ├── autorun.sh │ ├── baraction.sh │ ├── shot.sh │ └── spectrwm.conf ├── sway │ ├── config │ ├── lockman.sh │ └── window.sh ├── sxhkd │ ├── reset.sh │ └── sxhkdrc ├── waybar │ ├── .nord.css.kate-swp │ ├── config │ ├── scripts │ │ ├── mediaplayer.sh │ │ ├── power.sh │ │ └── weather.sh │ ├── style-light.css │ ├── style-nord.css │ ├── style.css │ └── taskbar ├── xmobar │ ├── trayer-padding-icon.sh │ ├── xmobarrc0 │ ├── xmobarrc1 │ └── xmobarrc2 ├── xsettingsd │ └── xsettingsd.conf └── zathura │ ├── zathurarc-light │ └── zathurarc-nord ├── .dmenu ├── LICENSE ├── Makefile ├── README ├── arg.h ├── config.def.h ├── config.def.h.orig ├── config.def.h.rej ├── config.h ├── config.mk ├── dmenu ├── dmenu-lineheight-5.0.diff ├── dmenu.1 ├── dmenu.c ├── dmenu.o ├── dmenu_path ├── dmenu_run ├── drw.c ├── drw.h ├── drw.o ├── recompile ├── stest ├── stest.1 ├── stest.c ├── stest.o ├── util.c ├── util.h └── util.o ├── .doom.d ├── config.el ├── custom.el ├── init.el ├── package.el └── packages.el ├── .dwm-bar ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── bar-functions │ ├── dwm_alarm.sh │ ├── dwm_alsa.sh │ ├── dwm_backlight.sh │ ├── dwm_battery.sh │ ├── dwm_ccurse.sh │ ├── dwm_cmus.sh │ ├── dwm_connman.sh │ ├── dwm_countdown.sh │ ├── dwm_currency.sh │ ├── dwm_date.sh │ ├── dwm_kernel.sh │ ├── dwm_keyboard.sh │ ├── dwm_loadavg.sh │ ├── dwm_mail.sh │ ├── dwm_mpc.sh │ ├── dwm_networkmanager.sh │ ├── dwm_pulse.sh │ ├── dwm_resources.sh │ ├── dwm_solar_panel.sh │ ├── dwm_spotify.sh │ ├── dwm_transmission.sh │ ├── dwm_upt.sh │ ├── dwm_vpn.sh │ ├── dwm_weather.sh │ └── dwm_wpa.sh └── dwm_bar.sh ├── .dwm-with-polybar ├── IPCClient.c ├── IPCClient.h ├── LICENSE ├── Makefile ├── README.md ├── autostart.sh ├── config.def.h ├── config.def.h.orig ├── config.def.h.rej ├── config.h ├── config.mk ├── config.mk.orig ├── drw.c ├── drw.h ├── drw.o ├── dwm ├── dwm-msg ├── dwm-msg.c ├── dwm-msg.o ├── dwm.1 ├── dwm.1.orig ├── dwm.c ├── dwm.c.orig ├── dwm.c.rej ├── dwm.o ├── dwm.png ├── ipc.c ├── ipc.h ├── layouts.c ├── patches │ ├── dwm-00-regex-rules.diff │ ├── dwm-6.2-tab-v2b.diff │ ├── dwm-anybar-polybar-tray-fix-20200810-bb2e722.diff │ ├── dwm-attachasideandbelow-20200702-f04cac6.diff │ ├── dwm-autostart-20200610-cb3f58a.diff │ ├── dwm-bottomstack-20160719-56a31dc.diff │ ├── dwm-focusmaster-20200717-bb2e722.diff │ ├── dwm-focusonnetactive-6.2.diff │ ├── dwm-gridmode-20170909-ceac8c9.diff │ ├── dwm-ipc-20201106-f04cac6.diff │ ├── dwm-pertag-perseltag-6.2.diff │ ├── dwm-restartsig-20180523-6.2.diff │ ├── dwm-status2d-6.2.diff │ ├── dwm-status2d-xrdb-6.2.diff │ ├── dwm-steam-6.2.diff │ ├── dwm-uselessgap-6.2.diff │ └── dwm-xrdb-6.2.diff ├── recompile ├── tcl.c ├── transient.c ├── util.c ├── util.h ├── util.o ├── yajl_dumps.c └── yajl_dumps.h ├── .dwm ├── LICENSE ├── Makefile ├── README.md ├── autostart.sh ├── config.def.h ├── config.def.h.orig ├── config.def.h.rej ├── config.h ├── config.mk ├── drw.c ├── drw.h ├── drw.o ├── dwm ├── dwm.1 ├── dwm.1.orig ├── dwm.c ├── dwm.c.orig ├── dwm.c.rej ├── dwm.o ├── dwm.png ├── layouts.c ├── patches │ ├── dwm-00-regex-rules.diff │ ├── dwm-6.2-tab-v2b.diff │ ├── dwm-attachasideandbelow-20200702-f04cac6.diff │ ├── dwm-autostart-20200610-cb3f58a.diff │ ├── dwm-bottomstack-20160719-56a31dc.diff │ ├── dwm-focusmaster-20200717-bb2e722.diff │ ├── dwm-focusonnetactive-6.2.diff │ ├── dwm-gridmode-20170909-ceac8c9.diff │ ├── dwm-pertag-perseltag-6.2.diff │ ├── dwm-restartsig-20180523-6.2.diff │ ├── dwm-status2d-6.2.diff │ ├── dwm-status2d-xrdb-6.2.diff │ ├── dwm-steam-6.2.diff │ ├── dwm-uselessgap-6.2.diff │ └── dwm-xrdb-6.2.diff ├── recompile ├── tcl.c ├── transient.c ├── util.c ├── util.h └── util.o ├── .gitignore ├── .local ├── bin │ ├── clip │ ├── clipmenu │ ├── clipmenud │ ├── dmenu_run_history │ ├── kitty_reload_w │ ├── kitty_reload_x │ ├── lock │ ├── mountmenu │ ├── recordmenu │ ├── searchmenu │ ├── startdaemon │ ├── startdaemon-sway │ ├── switch │ └── umountmenu └── share │ └── fcitx5 │ └── themes │ ├── nord-dark │ ├── arrow.png │ ├── panel.png │ ├── radio.png │ └── theme.conf │ └── nord-light │ ├── arrow.png │ ├── panel.png │ ├── radio.png │ └── theme.conf ├── .vimrc ├── .xmonad ├── xmonad-x86_64-linux ├── xmonad.errors ├── xmonad.hi ├── xmonad.hs ├── xmonad.o ├── xmonadctl.hs └── xpm │ ├── calendar-clock-icon_20.xpm │ ├── cpu_20.xpm │ ├── harddisk-icon_20.xpm │ ├── haskell_20.xpm │ ├── memory-icon_20.xpm │ ├── net_down_20.xpm │ └── net_up_20.xpm ├── .xprofile ├── Pictures ├── Background │ ├── NordDay.png │ └── NordNight.png ├── nord.png └── shot │ ├── bspwm.png │ ├── dwm.png │ ├── firefox.png │ ├── i3.png │ ├── spectrwm.png │ ├── sway.png │ ├── switch.gif │ └── xmonad.png ├── README.md ├── chrome ├── LICENSE ├── README.md ├── add.svg ├── demo.gif ├── install.sh ├── left-arrow.svg ├── preview.png ├── right-arrow.svg ├── userChrome-light.css ├── userChrome-nord.css ├── userChrome.css └── userContent.css ├── startpage ├── README.md ├── css │ └── style.css ├── icons │ ├── Nord │ │ ├── 01d.png │ │ ├── 01n.png │ │ ├── 02d.png │ │ ├── 02n.png │ │ ├── 03d.png │ │ ├── 03n.png │ │ ├── 04d.png │ │ ├── 04n.png │ │ ├── 09d.png │ │ ├── 09n.png │ │ ├── 10d.png │ │ ├── 10n.png │ │ ├── 11d.png │ │ ├── 11n.png │ │ ├── 13d.png │ │ ├── 13n.png │ │ ├── 50d.png │ │ ├── 50n.png │ │ └── unknown.png │ ├── White │ │ ├── 01d.png │ │ ├── 01n.png │ │ ├── 02d.png │ │ ├── 02n.png │ │ ├── 03d.png │ │ ├── 03n.png │ │ ├── 04d.png │ │ ├── 04n.png │ │ ├── 09d.png │ │ ├── 09n.png │ │ ├── 10d.png │ │ ├── 10n.png │ │ ├── 11d.png │ │ ├── 11n.png │ │ ├── 13d.png │ │ ├── 13n.png │ │ ├── 50d.png │ │ ├── 50n.png │ │ └── unknown.png │ └── favicon-32x32.png ├── img │ └── gnu-linux.png ├── index.html ├── js │ ├── greeting.js │ ├── theme.js │ ├── time.js │ └── weather.js └── sass │ └── main.scss └── wofer ├── LICENSE ├── README.md ├── config ├── extensions ├── gofile ├── imgur ├── kdeconnect ├── manga └── nvim ├── scrots ├── directory.png ├── file.png ├── hidden.png └── rice.png ├── style.css └── wofer.sh /.config/bspwm/bin/apps_as_root: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## rofi sudo askpass helper 4 | export SUDO_ASKPASS=~/.config/bspwm/bin/askpass 5 | 6 | ## execute the application 7 | sudo -A $1 8 | -------------------------------------------------------------------------------- /.config/bspwm/bin/askpass: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | rofi -dmenu\ 3 | -password\ 4 | -i\ 5 | -no-fixed-num-lines\ 6 | -p "Sudo Password: "\ 7 | -theme ~/.config/bspwm/rofi/themes/askpass.rasi 8 | -------------------------------------------------------------------------------- /.config/bspwm/bin/bspbar: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Terminate already running bar instances 4 | killall -q polybar 5 | 6 | # Wait until the processes have been shut down 7 | while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done 8 | 9 | # Launch polybar 10 | polybar main -c ~/.config/bspwm/polybar/config & 11 | -------------------------------------------------------------------------------- /.config/bspwm/bin/bspcomp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Terminate if compton is already running 4 | killall -q compton 5 | 6 | # Wait until the processes have been shut down 7 | while pgrep -u $UID -x compton >/dev/null; do sleep 1; done 8 | 9 | # Launch compton 10 | compton --config ~/.config/bspwm/compton.conf & 11 | -------------------------------------------------------------------------------- /.config/bspwm/bin/bspfloat: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # All windows are floating on desktop 8 4 | FLOATING_DESKTOP_ID=$(bspc query -D -d '^8') 5 | 6 | bspc subscribe node_add | while read -a msg ; do 7 | desk_id=${msg[2]} 8 | wid=${msg[4]} 9 | [ "$FLOATING_DESKTOP_ID" = "$desk_id" ] && bspc node "$wid" -t floating 10 | done 11 | -------------------------------------------------------------------------------- /.config/bspwm/bin/bspterm: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # launch termite with other config 4 | if [ "$1" == "-f" ]; then 5 | termite --class termite-float -o ~/.config/bspwm/termite/config 6 | else 7 | kitty 8 | fi 9 | -------------------------------------------------------------------------------- /.config/bspwm/bin/winmask: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | masked=$(bspc query -N -n .hidden -d focused) 4 | 5 | if [ -z "$masked" ]; then 6 | bspc node focused -g hidden=on 7 | else 8 | bspc node "$masked" -g hidden=off 9 | fi 10 | -------------------------------------------------------------------------------- /.config/bspwm/bspwmrc: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | sh $HOME/.config/bspwm/scripts/start.sh 3 | 4 | bspc monitor -d 1 2 3 4 5 6 7 8 9 5 | 6 | bspc config border_width 3 7 | bspc config window_gap 10 8 | bspc config focus_follows_pointer true 9 | bspc config ignore_ewmh_focus true 10 | 11 | bspc config focused_border_color "#88C0D0" 12 | bspc config normal_border_color "#e6eef3" 13 | bspc config active_border_color "#eceff4" 14 | bspc config presel_feedback_color "#98C379" 15 | 16 | bspc config split_ratio 0.5 17 | bspc config borderless_monocle false 18 | bspc config gapless_monocle true 19 | bspc config paddingless_monocle true 20 | unclutter --ignore-scrooling & 21 | 22 | bspc rule -a firefox desktop='^3' 23 | bspc rule -a Nightly desktop='^3' state=tiled 24 | bspc rule -a FirefoxNightly desktop='^3' state=tiled 25 | bspc rule -a xdman-Main state=floating 26 | bspc rule -a Nitrogen state=floating 27 | bspc rule -a Zathura state=tiled 28 | bspc rule -a Emacs state=tiled 29 | bspc rule -a Lxappearance state=floating 30 | bspc rule -a Xfce4-about state=floating 31 | bspc rule -a Steam desktop='^5' state=floating 32 | bspc rule -a kitty-music desktop='^4' state=pseudo_tiled 33 | bspc rule -a spotify desktop='^4' state=pseudo_tiled 34 | bspc rule -a 'VirtualBox Manager' desktop='^6' state=floating 35 | bspc rule -a 'VirtualBox Machine' desktop='^6' 36 | bspc rule -a "Qalculate-gtk" state=floating 37 | bspc rule -a Qq state=floating desktop='^8' 38 | bspc rule -a TelegramDesktop desktop='^8' 39 | bspc rule -a Gpick state=floating 40 | bspc rule -a jetbrains-toolbox state=floating 41 | bspc rule -a jetbrains-idea desktop='^2' 42 | bspc rule -a jetbrains-pycharm desktop='^2' 43 | bspc rule -a jetbrains-clion desktop='^2' 44 | bspc rule -a jetbrains-webstorm desktop='^2' 45 | bspc rule -a jetbrains-datagrip desktop='^2' 46 | bspc rule -a jetbrains-phpstorm desktop='^2' 47 | bspc rule -a jetbrains-studio desktop='^2' 48 | bspc rule -a jetbrains-goland desktop='^2' 49 | -------------------------------------------------------------------------------- /.config/bspwm/flag: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /.config/bspwm/polybar/colors: -------------------------------------------------------------------------------- 1 | ; vim:ft=dosini 2 | 3 | [color] 4 | 5 | FOREGROUND = #D8DEE9 6 | BACKGROUND = #2E3440 7 | BLACK = #3B4252 8 | RED = #BF616A 9 | GREEN = #A3BE8C 10 | YELLOW = #EBCB8B 11 | BLUE = #81A1C1 12 | MAGENTA = #B48EAD 13 | CYAN = #88C0D0 14 | WHITE = #E5E9F0 15 | ALTBLACK = #4C566A 16 | ALTRED = #BF616A 17 | ALTGREEN = #A3BE8C 18 | ALTYELLOW = #EBCB8B 19 | ALTBLUE = #81A1C1 20 | ALTMAGENTA = #B48EAD 21 | ALTCYAN = #8FBCBB 22 | ALTWHITE = #ECEFF4 23 | nord7 = #8FBCBB 24 | nord8 = #88C0D0 25 | -------------------------------------------------------------------------------- /.config/bspwm/polybar/colors-gruvbox: -------------------------------------------------------------------------------- 1 | ; vim:ft=dosini 2 | 3 | [color] 4 | 5 | ;BACKGROUND = #fdf6e3 6 | ;FOREGROUND = #2E3440 7 | 8 | BACKGROUND = #282828 9 | FOREGROUND = #EBDBB2 10 | 11 | BLACK = #282828 12 | RED = #FB4934 13 | GREEN = #B8BB26 14 | YELLOW = #FABD2F 15 | BLUE = #83A598 16 | MAGENTA = #D3869B 17 | CYAN = #8EC07C 18 | WHITE = #EBDBB2 19 | ALTBLACK = #32302F 20 | ALTRED = #CC241D 21 | ALTGREEN = #98971A 22 | ALTYELLOW = #D79921 23 | ALTBLUE = #458588 24 | ALTMAGENTA = #B16286 25 | ALTCYAN = #688D6A 26 | ALTWHITE = #FBF1C7 27 | -------------------------------------------------------------------------------- /.config/bspwm/polybar/colors-light: -------------------------------------------------------------------------------- 1 | ; vim:ft=dosini 2 | 3 | [color] 4 | 5 | ;BACKGROUND = #fdf6e3 6 | ;FOREGROUND = #2E3440 7 | 8 | BACKGROUND = #E5E9F0 9 | FOREGROUND = #3B4252 10 | 11 | BLACK = #2E3440 12 | RED = #FF6655 13 | GREEN = #A3BE8C 14 | YELLOW = #ECBE7B 15 | BLUE = #81A1C1 16 | MAGENTA = #C678DD 17 | CYAN = #46D9FF 18 | WHITE = #F0F4FC 19 | ALTBLACK = #2D2D2D 20 | ALTRED = #99324B 21 | ALTGREEN = #4F894C 22 | ALTYELLOW = #9A7500 23 | ALTBLUE = #3B61A8 24 | ALTMAGENTA = #97365B 25 | ALTCYAN = #398EAC 26 | ALTWHITE = #ECEFF4 27 | -------------------------------------------------------------------------------- /.config/bspwm/polybar/colors-nord: -------------------------------------------------------------------------------- 1 | ; vim:ft=dosini 2 | 3 | [color] 4 | 5 | FOREGROUND = #D8DEE9 6 | BACKGROUND = #2E3440 7 | BLACK = #3B4252 8 | RED = #BF616A 9 | GREEN = #A3BE8C 10 | YELLOW = #EBCB8B 11 | BLUE = #81A1C1 12 | MAGENTA = #B48EAD 13 | CYAN = #88C0D0 14 | WHITE = #E5E9F0 15 | ALTBLACK = #4C566A 16 | ALTRED = #BF616A 17 | ALTGREEN = #A3BE8C 18 | ALTYELLOW = #EBCB8B 19 | ALTBLUE = #81A1C1 20 | ALTMAGENTA = #B48EAD 21 | ALTCYAN = #8FBCBB 22 | ALTWHITE = #ECEFF4 23 | nord7 = #8FBCBB 24 | nord8 = #88C0D0 25 | -------------------------------------------------------------------------------- /.config/bspwm/polybar/colors-solar: -------------------------------------------------------------------------------- 1 | ; vim:ft=dosini 2 | 3 | [color] 4 | 5 | BACKGROUND = #fdf6e3 6 | FOREGROUND = #2E3440 7 | 8 | ;BACKGROUND = #2E3440 9 | ;FOREGROUND = #D8DEE9 10 | 11 | BLACK = #3B4252 12 | RED = #BF616A 13 | GREEN = #A3BE8C 14 | YELLOW = #EBCB8B 15 | BLUE = #81A1C1 16 | MAGENTA = #B48EAD 17 | CYAN = #88C0D0 18 | WHITE = #E5E9F0 19 | ALTBLACK = #4C566A 20 | ALTRED = #BF616A 21 | ALTGREEN = #A3BE8C 22 | ALTYELLOW = #EBCB8B 23 | ALTBLUE = #81A1C1 24 | ALTMAGENTA = #B48EAD 25 | ALTCYAN = #8FBCBB 26 | ALTWHITE = #ECEFF4 27 | -------------------------------------------------------------------------------- /.config/bspwm/polybar/script/weather-bar.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #curl -sS "wttr.in/?format=%t" 3 | #curl -sS "wttr.in/38.906551,111.2222683?format="%c+%t+%h"" 4 | curl -sS "wttr.in/beijing?format="%c+%t+%h"" 5 | -------------------------------------------------------------------------------- /.config/bspwm/rofi/bin/asroot: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$HOME/.config/bspwm" 4 | 5 | rofi_command="rofi -theme $DIR/rofi/themes/asroot.rasi" 6 | 7 | # Apps 8 | terminal=" Kitty" 9 | files=" Thunar" 10 | editor=" Geany" 11 | clifm=" Ranger" 12 | lpad=" Leafpad" 13 | vim=" Vim" 14 | 15 | # Variable passed to rofi 16 | options="$terminal\n$files\n$editor\n$clifm\n$lpad\n$vim" 17 | 18 | chosen="$(echo -e "$options" | $rofi_command -p "Run as root(#)" -dmenu -selected-row 0)" 19 | case $chosen in 20 | $terminal) 21 | apps_as_root 'kitty --class termite-float' 22 | ;; 23 | $files) 24 | apps_as_root 'dbus-run-session thunar' 25 | ;; 26 | $editor) 27 | apps_as_root geany 28 | ;; 29 | $clifm) 30 | apps_as_root 'kitty --class termite-float -c /root/.config/bspwm/termite/config -e ranger' 31 | ;; 32 | $lpad) 33 | apps_as_root leafpad 34 | ;; 35 | $vim) 36 | apps_as_root 'termite --class termite-float -c /root/.config/bspwm/termite/config -e vim' 37 | ;; 38 | esac 39 | 40 | 41 | -------------------------------------------------------------------------------- /.config/bspwm/rofi/bin/confirm: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | rofi -dmenu\ 3 | -i\ 4 | -no-fixed-num-lines\ 5 | -p "Are You Sure? : "\ 6 | -theme ~/.config/bspwm/rofi/themes/confirm.rasi 7 | -------------------------------------------------------------------------------- /.config/bspwm/rofi/bin/launcher: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DIR="$HOME/.config/bspwm" 4 | 5 | rofi -no-lazy-grab -show drun -theme $DIR/rofi/themes/launcher.rasi 6 | -------------------------------------------------------------------------------- /.config/bspwm/rofi/bin/network: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$HOME/.config/bspwm" 4 | 5 | rofi_command="rofi -theme $DIR/rofi/themes/network.rasi" 6 | 7 | ## Get info 8 | IFACE="$(nmcli | grep -i interface | awk '/interface/ {print $2}')" 9 | #SSID="$(iwgetid -r)" 10 | #LIP="$(nmcli | grep -i server | awk '/server/ {print $2}')" 11 | #PIP="$(dig +short myip.opendns.com @resolver1.opendns.com )" 12 | STATUS="$(nmcli radio wifi)" 13 | 14 | active="" 15 | urgent="" 16 | 17 | if (ping -c 1 archlinux.org || ping -c 1 google.com || ping -c 1 bitbucket.org || ping -c 1 github.com || ping -c 1 sourceforge.net) &>/dev/null; then 18 | if [[ $STATUS == *"enable"* ]]; then 19 | if [[ $IFACE == e* ]]; then 20 | connected="" 21 | else 22 | connected="" 23 | fi 24 | active="-a 0" 25 | SSID="$(iwgetid -r)" 26 | PIP="$(wget --timeout=30 http://ipinfo.io/ip -qO -)" 27 | fi 28 | else 29 | urgent="-u 0" 30 | SSID="Disconnected" 31 | PIP="NA" 32 | connected="" 33 | fi 34 | 35 | ## Icons 36 | bmon="" 37 | launch_cli="" 38 | launch="" 39 | 40 | options="$connected\n$bmon\n$launch_cli\n$launch" 41 | 42 | ## Main 43 | chosen="$(echo -e "$options" | $rofi_command -p "$SSID : $PIP" -dmenu $active $urgent -selected-row 1)" 44 | case $chosen in 45 | $connected) 46 | if [[ $STATUS == *"enable"* ]]; then 47 | nmcli radio wifi off 48 | else 49 | nmcli radio wifi on 50 | fi 51 | ;; 52 | $bmon) 53 | termite -e bmon 54 | ;; 55 | $launch_cli) 56 | termite -e nmtui 57 | ;; 58 | $launch) 59 | nm-connection-editor 60 | ;; 61 | esac 62 | 63 | -------------------------------------------------------------------------------- /.config/bspwm/rofi/bin/screenshot: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$HOME/.config/bspwm" 4 | 5 | rofi_command="rofi -theme $DIR/rofi/themes/screenshot.rasi" 6 | 7 | # Options 8 | screen="" 9 | area="" 10 | window="" 11 | 12 | # Variable passed to rofi 13 | options="$screen\n$area\n$window" 14 | 15 | chosen="$(echo -e "$options" | $rofi_command -p 'Screenshot' -dmenu -selected-row 1)" 16 | case $chosen in 17 | $screen) 18 | sleep 1; scrot 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f' 19 | ;; 20 | $area) 21 | scrot -s 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f' 22 | ;; 23 | $window) 24 | sleep 1; scrot -u 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f' 25 | ;; 26 | esac 27 | 28 | -------------------------------------------------------------------------------- /.config/bspwm/rofi/bin/themes: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$HOME/.config/bspwm" 4 | XDIR="$HOME/.Xresources.d" 5 | 6 | rofi_command="rofi -theme $DIR/rofi/themes/themes.rasi" 7 | 8 | style (){ 9 | cat "$DIR"/themes/$1 > "$XDIR"/colors 10 | feh --bg-scale "$DIR"/wallpapers/$1.jpg 11 | bspc wm -r 12 | } 13 | 14 | # Apps 15 | theme_1=" Nord" 16 | theme_2=" Gruvbox" 17 | theme_3=" Dark" 18 | theme_4=" Cyberpunk" 19 | theme_5=" Groot" 20 | theme_6=" Rick" 21 | 22 | # Variable passed to rofi 23 | options="$theme_1\n$theme_2\n$theme_3\n$theme_4\n$theme_5\n$theme_6" 24 | 25 | chosen="$(echo -e "$options" | $rofi_command -p "Available themes" -dmenu -selected-row 0)" 26 | case $chosen in 27 | $theme_1) 28 | style nord 29 | ;; 30 | $theme_2) 31 | style gruvbox 32 | ;; 33 | $theme_3) 34 | style dark 35 | ;; 36 | $theme_4) 37 | style cyberpunk 38 | ;; 39 | $theme_5) 40 | style groot 41 | ;; 42 | $theme_6) 43 | style rick 44 | ;; 45 | esac 46 | 47 | 48 | -------------------------------------------------------------------------------- /.config/bspwm/rofi/bin/windows: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DIR="$HOME/.config/bspwm" 4 | 5 | rofi -no-lazy-grab -show window -theme $DIR/rofi/themes/window.rasi 6 | -------------------------------------------------------------------------------- /.config/bspwm/rofi/themes/askpass.rasi: -------------------------------------------------------------------------------- 1 | @import "colors.rasi" 2 | 3 | * { 4 | transparency: "real"; 5 | background-color: @background; 6 | text-color: @foreground; 7 | font: "Iosevka 10"; 8 | } 9 | 10 | #window { 11 | border: 1px; 12 | border-radius: 0px; 13 | border-color: @selected; 14 | width: 300px; 15 | y-offset: -8%; 16 | padding: 20px; 17 | } 18 | 19 | #entry { 20 | expand: true; 21 | width: 150px; 22 | text-color: @urgent; 23 | } 24 | -------------------------------------------------------------------------------- /.config/bspwm/rofi/themes/colors-light.rasi: -------------------------------------------------------------------------------- 1 | * { 2 | background: #D8DEE9; 3 | foreground: #2E3440; 4 | selected: #81A1C1; 5 | urgent: #BF616A; 6 | on: #A3BE8C; 7 | off: #BF616A; 8 | } 9 | -------------------------------------------------------------------------------- /.config/bspwm/rofi/themes/colors-nord.rasi: -------------------------------------------------------------------------------- 1 | * { 2 | background: #2E3440; 3 | foreground: #D8DEE9; 4 | selected: #81A1C1; 5 | urgent: #BF616A; 6 | on: #A3BE8C; 7 | off: #BF616A; 8 | } 9 | -------------------------------------------------------------------------------- /.config/bspwm/rofi/themes/colors.rasi: -------------------------------------------------------------------------------- 1 | * { 2 | background: #2E3440; 3 | foreground: #D8DEE9; 4 | selected: #81A1C1; 5 | urgent: #BF616A; 6 | on: #A3BE8C; 7 | off: #BF616A; 8 | } 9 | -------------------------------------------------------------------------------- /.config/bspwm/rofi/themes/confirm.rasi: -------------------------------------------------------------------------------- 1 | @import "colors.rasi" 2 | 3 | * { 4 | transparency: "real"; 5 | background-color: @background; 6 | text-color: @foreground; 7 | font: "Iosevka 10"; 8 | } 9 | 10 | #window { 11 | border: 1px; 12 | border-radius: 0px; 13 | border-color: @selected; 14 | width: 200px; 15 | y-offset: -8%; 16 | padding: 20px; 17 | } 18 | 19 | #entry { 20 | expand: true; 21 | width: 150px; 22 | text-color: @urgent; 23 | } 24 | -------------------------------------------------------------------------------- /.config/bspwm/scripts/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for line in `cat ~/.config/bspwm/flag` 4 | do 5 | if [ $line == '0' ] 6 | then 7 | sxhkd & 8 | picom -b 9 | sh ~/.config/bspwm/bin/bspbar 10 | sh ~/.fehbg 11 | fcitx5 & 12 | xdman & 13 | dunst & 14 | xsetroot -cursor_name left_ptr 15 | wmname LG3D 16 | python3 /usr/bin/redshift-gtk & 17 | copyq & 18 | xfce4-power-manager & 19 | qv2ray & 20 | nutstore & 21 | 22 | echo "1" > $HOME/.config/bspwm/flag 23 | fi 24 | done 25 | -------------------------------------------------------------------------------- /.config/bspwm/scripts/start_ides.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" == "code" ] 4 | then 5 | code 6 | exit 0 7 | elif [ "$1" == "idea" ] 8 | then 9 | sh ~/.local/bin/idea 10 | exit 0 11 | elif [ "$1" == "clion" ] 12 | then 13 | sh ~/.local/bin/clion 14 | exit 0 15 | elif [ "$1" == "pycharm" ] 16 | then 17 | 18 | exit 0 19 | elif [ "$1" == "webstorm" ] 20 | then 21 | 22 | exit 0 23 | elif [ "$1" == "datagrip" ] 24 | then 25 | 26 | exit 0 27 | elif [ "$1" == "phpstorm" ] 28 | then 29 | 30 | exit 0 31 | elif [ "$1" == "android" ] 32 | then 33 | sh ~/.local/bin/android-studio 34 | exit 0 35 | elif [ "$1" == "rider" ] 36 | then 37 | sh ~/jetbrains/Rider-2020.2.2/bin/rider.sh 38 | exit 0 39 | elif [ "$1" == "goland" ] 40 | then 41 | sh ~/.local/bin/goland 42 | exit 0 43 | fi 44 | fi 45 | -------------------------------------------------------------------------------- /.config/dunst/dunstrc: -------------------------------------------------------------------------------- 1 | [global] 2 | monitor = 0 3 | follow = mouse 4 | geometry = "280x50-10+44" 5 | indicate_hidden = yes 6 | shrink = no 7 | separator_height = 4 8 | separator_color = auto 9 | padding = 20 10 | horizontal_padding = 20 11 | frame_width = 0 12 | sort = no 13 | idle_threshold = 120 14 | font = Microsoft YaHei UI 9 15 | line_height = 4 16 | markup = full 17 | format = %s\n%b 18 | alignment = left 19 | show_age_threshold = 60 20 | word_wrap = yes 21 | ignore_newline = no 22 | stack_duplicates = false 23 | hide_duplicate_count = yes 24 | show_indicators = no 25 | icon_position = left 26 | #icon_path = /usr/share/icons/Papirus/48x48/status/:/usr/share/icons/Papirus/48x48/devices/:/usr/share/icons/Numix-Circle/48x48/apps/ 27 | max_icon_size = 48 28 | sticky_history = yes 29 | history_length = 20 30 | browser = x-www-browser -new-tab 31 | always_run_script = true 32 | title = Dunst 33 | class = Dunst 34 | 35 | [shortcuts] 36 | close = ctrl+shift+space 37 | close_all = ctrl+shift+space 38 | history = ctrl+grave 39 | context = ctrl+shift+period 40 | 41 | [urgency_low] 42 | timeout = 2 43 | background = "#d8dee9" 44 | foreground = "#2e3440" 45 | frame_color = "#4c566a" 46 | 47 | [urgency_normal] 48 | timeout = 5 49 | background = "#e5e9f0" 50 | foreground = "#3b4252" 51 | frame_color = "#8fbcbb" 52 | 53 | [urgency_critical] 54 | timeout = 0 55 | background = "#eceff4" 56 | foreground = "#bf616a" 57 | frame_color = "#d08770" 58 | 59 | #frame_color = "#586e75" 60 | #separator_color = "#586e75" 61 | # 62 | #[base16_low] 63 | # msg_urgency = low 64 | # background = "#fdf6e3" 65 | # foreground = "#52676f" 66 | # 67 | #[base16_normal] 68 | # msg_urgency = normal 69 | # background = "#ffffd7" 70 | # foreground = "#585858" 71 | # 72 | #[base16_critical] 73 | # msg_urgency = critical 74 | # background = "#d70000" 75 | # foreground = "#262626" 76 | -------------------------------------------------------------------------------- /.config/dunst/dunstrc-gruvbox: -------------------------------------------------------------------------------- 1 | [global] 2 | monitor = 0 3 | follow = mouse 4 | geometry = "280x50-10+44" 5 | indicate_hidden = yes 6 | shrink = no 7 | separator_height = 4 8 | separator_color = auto 9 | padding = 20 10 | horizontal_padding = 20 11 | frame_width = 0 12 | sort = no 13 | idle_threshold = 120 14 | font = Microsoft YaHei UI 9 15 | line_height = 4 16 | markup = full 17 | format = %s\n%b 18 | alignment = left 19 | show_age_threshold = 60 20 | word_wrap = yes 21 | ignore_newline = no 22 | stack_duplicates = false 23 | hide_duplicate_count = yes 24 | show_indicators = no 25 | icon_position = left 26 | #icon_path = /usr/share/icons/Papirus/48x48/status/:/usr/share/icons/Papirus/48x48/devices/:/usr/share/icons/Numix-Circle/48x48/apps/ 27 | max_icon_size = 48 28 | sticky_history = yes 29 | history_length = 20 30 | browser = x-www-browser -new-tab 31 | always_run_script = true 32 | title = Dunst 33 | class = Dunst 34 | 35 | [shortcuts] 36 | close = ctrl+shift+space 37 | close_all = ctrl+shift+space 38 | history = ctrl+grave 39 | context = ctrl+shift+period 40 | 41 | [urgency_low] 42 | timeout = 2 43 | background = "#282828" 44 | foreground = "#ebdbb2" 45 | frame_color = "#ebdbb2" 46 | 47 | [urgency_normal] 48 | timeout = 5 49 | background = "#282828" 50 | foreground = "#fbf1c7" 51 | frame_color = "#fbf1c7" 52 | 53 | [urgency_critical] 54 | timeout = 0 55 | background = "#212B30" 56 | foreground = "#fb4934" 57 | frame_color = "#fb4934" 58 | -------------------------------------------------------------------------------- /.config/dunst/dunstrc-light: -------------------------------------------------------------------------------- 1 | [global] 2 | monitor = 0 3 | follow = mouse 4 | geometry = "280x50-10+44" 5 | indicate_hidden = yes 6 | shrink = no 7 | separator_height = 4 8 | separator_color = auto 9 | padding = 20 10 | horizontal_padding = 20 11 | frame_width = 0 12 | sort = no 13 | idle_threshold = 120 14 | font = Microsoft YaHei UI 9 15 | line_height = 4 16 | markup = full 17 | format = %s\n%b 18 | alignment = left 19 | show_age_threshold = 60 20 | word_wrap = yes 21 | ignore_newline = no 22 | stack_duplicates = false 23 | hide_duplicate_count = yes 24 | show_indicators = no 25 | icon_position = left 26 | #icon_path = /usr/share/icons/Papirus/48x48/status/:/usr/share/icons/Papirus/48x48/devices/:/usr/share/icons/Numix-Circle/48x48/apps/ 27 | max_icon_size = 48 28 | sticky_history = yes 29 | history_length = 20 30 | browser = x-www-browser -new-tab 31 | always_run_script = true 32 | title = Dunst 33 | class = Dunst 34 | 35 | [shortcuts] 36 | close = ctrl+shift+space 37 | close_all = ctrl+shift+space 38 | history = ctrl+grave 39 | context = ctrl+shift+period 40 | 41 | [urgency_low] 42 | timeout = 2 43 | background = "#d8dee9" 44 | foreground = "#2e3440" 45 | frame_color = "#4c566a" 46 | 47 | [urgency_normal] 48 | timeout = 5 49 | background = "#e5e9f0" 50 | foreground = "#3b4252" 51 | frame_color = "#8fbcbb" 52 | 53 | [urgency_critical] 54 | timeout = 0 55 | background = "#eceff4" 56 | foreground = "#bf616a" 57 | frame_color = "#d08770" 58 | 59 | #frame_color = "#586e75" 60 | #separator_color = "#586e75" 61 | # 62 | #[base16_low] 63 | # msg_urgency = low 64 | # background = "#fdf6e3" 65 | # foreground = "#52676f" 66 | # 67 | #[base16_normal] 68 | # msg_urgency = normal 69 | # background = "#ffffd7" 70 | # foreground = "#585858" 71 | # 72 | #[base16_critical] 73 | # msg_urgency = critical 74 | # background = "#d70000" 75 | # foreground = "#262626" 76 | -------------------------------------------------------------------------------- /.config/dunst/dunstrc-nord: -------------------------------------------------------------------------------- 1 | [global] 2 | monitor = 0 3 | follow = mouse 4 | geometry = "280x50-10+44" 5 | indicate_hidden = yes 6 | shrink = no 7 | separator_height = 4 8 | separator_color = auto 9 | padding = 20 10 | horizontal_padding = 20 11 | frame_width = 0 12 | sort = no 13 | idle_threshold = 120 14 | font = Microsoft YaHei UI 9 15 | line_height = 4 16 | markup = full 17 | format = %s\n%b 18 | alignment = left 19 | show_age_threshold = 60 20 | word_wrap = yes 21 | ignore_newline = no 22 | stack_duplicates = false 23 | hide_duplicate_count = yes 24 | show_indicators = no 25 | icon_position = left 26 | #icon_path = /usr/share/icons/Papirus/48x48/status/:/usr/share/icons/Papirus/48x48/devices/:/usr/share/icons/Numix-Circle/48x48/apps/ 27 | max_icon_size = 48 28 | sticky_history = yes 29 | history_length = 20 30 | browser = x-www-browser -new-tab 31 | always_run_script = true 32 | title = Dunst 33 | class = Dunst 34 | 35 | [shortcuts] 36 | close = ctrl+shift+space 37 | close_all = ctrl+shift+space 38 | history = ctrl+grave 39 | context = ctrl+shift+period 40 | 41 | [urgency_low] 42 | timeout = 2 43 | background = "#212B30" 44 | foreground = "#C4C7C5" 45 | frame_color = "#4DD0E1" 46 | 47 | [urgency_normal] 48 | timeout = 5 49 | background = "#212B30" 50 | foreground = "#C4C7C5" 51 | frame_color = "#4DD0E1" 52 | 53 | [urgency_critical] 54 | timeout = 0 55 | background = "#212B30" 56 | foreground = "#EC407A" 57 | frame_color = "#EC407A" 58 | 59 | #frame_color = "#586e75" 60 | #separator_color = "#586e75" 61 | # 62 | #[base16_low] 63 | # msg_urgency = low 64 | # background = "#fdf6e3" 65 | # foreground = "#52676f" 66 | # 67 | #[base16_normal] 68 | # msg_urgency = normal 69 | # background = "#ffffd7" 70 | # foreground = "#585858" 71 | # 72 | #[base16_critical] 73 | # msg_urgency = critical 74 | # background = "#d70000" 75 | # foreground = "#262626" 76 | -------------------------------------------------------------------------------- /.config/dunst/dunstrc-solar: -------------------------------------------------------------------------------- 1 | [global] 2 | monitor = 0 3 | follow = mouse 4 | geometry = "280x50-10+44" 5 | indicate_hidden = yes 6 | shrink = no 7 | separator_height = 4 8 | separator_color = auto 9 | padding = 20 10 | horizontal_padding = 20 11 | frame_width = 0 12 | sort = no 13 | idle_threshold = 120 14 | font = Microsoft YaHei UI 9 15 | line_height = 4 16 | markup = full 17 | format = %s\n%b 18 | alignment = left 19 | show_age_threshold = 60 20 | word_wrap = yes 21 | ignore_newline = no 22 | stack_duplicates = false 23 | hide_duplicate_count = yes 24 | show_indicators = no 25 | icon_position = left 26 | #icon_path = /usr/share/icons/Papirus/48x48/status/:/usr/share/icons/Papirus/48x48/devices/:/usr/share/icons/Numix-Circle/48x48/apps/ 27 | max_icon_size = 48 28 | sticky_history = yes 29 | history_length = 20 30 | browser = x-www-browser -new-tab 31 | always_run_script = true 32 | title = Dunst 33 | class = Dunst 34 | 35 | [shortcuts] 36 | close = ctrl+shift+space 37 | close_all = ctrl+shift+space 38 | history = ctrl+grave 39 | context = ctrl+shift+period 40 | 41 | #[urgency_low] 42 | #timeout = 2 43 | #background = "#212B30" 44 | #foreground = "#C4C7C5" 45 | #frame_color = "#4DD0E1" 46 | # 47 | #[urgency_normal] 48 | #timeout = 5 49 | #background = "#212B30" 50 | #foreground = "#C4C7C5" 51 | #frame_color = "#4DD0E1" 52 | # 53 | #[urgency_critical] 54 | #timeout = 0 55 | #background = "#212B30" 56 | #foreground = "#EC407A" 57 | #frame_color = "#EC407A" 58 | 59 | frame_color = "#586e75" 60 | separator_color = "#586e75" 61 | 62 | [base16_low] 63 | msg_urgency = low 64 | background = "#fdf6e3" 65 | foreground = "#52676f" 66 | 67 | [base16_normal] 68 | msg_urgency = normal 69 | background = "#ffffd7" 70 | foreground = "#585858" 71 | 72 | [base16_critical] 73 | msg_urgency = critical 74 | background = "#d70000" 75 | foreground = "#262626" 76 | -------------------------------------------------------------------------------- /.config/dunst/sid: -------------------------------------------------------------------------------- 1 | Dark 2 | -------------------------------------------------------------------------------- /.config/fcitx5/conf/classicui.conf: -------------------------------------------------------------------------------- 1 | # Vertical Candidate List 2 | Vertical Candidate List=False 3 | # Use Per Screen DPI 4 | PerScreenDPI=True 5 | # Use mouse wheel to go to prev or next page 6 | WheelForPaging=True 7 | # Font 8 | Font="更纱黑体 SC 11" 9 | # Menu Font 10 | MenuFont="Sans 10" 11 | # Use input method langauge to display text 12 | UseInputMethodLangaugeToDisplayText=True 13 | # Theme 14 | Theme=nord-dark 15 | 16 | -------------------------------------------------------------------------------- /.config/fish/completions/fisher.fish: -------------------------------------------------------------------------------- 1 | complete -c fisher -x -l help -d "print usage help" 2 | complete -c fisher -x -l version -d "print fisher version" 3 | complete -c fisher -x -n "__fish_use_subcommand" -a install -d "install plugins" 4 | complete -c fisher -x -n "__fish_use_subcommand" -a update -d "update installed plugins" 5 | complete -c fisher -x -n "__fish_use_subcommand" -a remove -d "remove installed plugins" 6 | complete -c fisher -x -n "__fish_use_subcommand" -a list -d "list installed plugins matching " 7 | complete -c fisher -x -n "__fish_seen_subcommand_from update remove" -a "(fisher list)" -------------------------------------------------------------------------------- /.config/fish/conf.d/omf.fish: -------------------------------------------------------------------------------- 1 | # Path to Oh My Fish install. 2 | set -q XDG_DATA_HOME 3 | and set -gx OMF_PATH "$XDG_DATA_HOME/omf" 4 | or set -gx OMF_PATH "$HOME/.local/share/omf" 5 | 6 | # Load Oh My Fish configuration. 7 | source $OMF_PATH/init.fish 8 | -------------------------------------------------------------------------------- /.config/fish/fish_plugins: -------------------------------------------------------------------------------- 1 | jorgebucaran/fisher 2 | -------------------------------------------------------------------------------- /.config/fish/fish_variables: -------------------------------------------------------------------------------- 1 | # This file contains fish universal variable definitions. 2 | # VERSION: 3.0 3 | SETUVAR FZF_DEFAULT_OPTS:\x2d\x2dheight\x2040\x25 4 | SETUVAR FZF_DISABLE_KEYBINDINGS:0 5 | SETUVAR FZF_LEGACY_KEYBINDINGS:0 6 | SETUVAR FZF_PREVIEW_DIR_CMD:ls 7 | SETUVAR FZF_PREVIEW_FILE_CMD:head\x20\x2dn\x2010 8 | SETUVAR FZF_TMUX_HEIGHT:40\x25 9 | SETUVAR __fish_initialized:3100 10 | SETUVAR _fisher_jorgebucaran_2F_fisher_files:/home/mir/\x2econfig/fish/functions/fisher\x2efish\x1e/home/mir/\x2econfig/fish/completions/fisher\x2efish 11 | SETUVAR _fisher_plugins:jorgebucaran/fisher 12 | SETUVAR fish_color_autosuggestion:7596E4 13 | SETUVAR fish_color_cancel:\x2dr 14 | SETUVAR fish_color_command:164CC9 15 | SETUVAR fish_color_comment:007B7B 16 | SETUVAR fish_color_cwd:green 17 | SETUVAR fish_color_cwd_root:red 18 | SETUVAR fish_color_end:02BDBD 19 | SETUVAR fish_color_error:9177E5 20 | SETUVAR fish_color_escape:00a6b2 21 | SETUVAR fish_color_history_current:\x2d\x2dbold 22 | SETUVAR fish_color_host:normal 23 | SETUVAR fish_color_host_remote:yellow 24 | SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue 25 | SETUVAR fish_color_normal:normal 26 | SETUVAR fish_color_operator:00a6b2 27 | SETUVAR fish_color_param:4319CC 28 | SETUVAR fish_color_quote:4C3499 29 | SETUVAR fish_color_redirection:248E8E 30 | SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack 31 | SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack 32 | SETUVAR fish_color_status:red 33 | SETUVAR fish_color_user:brgreen 34 | SETUVAR fish_color_valid_path:\x2d\x2dunderline 35 | SETUVAR fish_greeting:\x1d 36 | SETUVAR fish_key_bindings:fish_default_key_bindings 37 | SETUVAR fish_pager_color_completion:normal 38 | SETUVAR fish_pager_color_description:B3A06D\x1eyellow 39 | SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline 40 | SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan 41 | -------------------------------------------------------------------------------- /.config/fish/functions/add_manga.fish: -------------------------------------------------------------------------------- 1 | # Add manga to library 2 | 3 | function add_manga --description "Add manga to my library" 4 | set -l old (ls -t ~/.mangas | head -1) 5 | set -l url "$argv[1]" 6 | set -l number "$argv[2]" 7 | printf "$url\n$number" | ./mangadex-dl.py 8 | set -l new (ls -t ~/.mangas | head -1) 9 | 10 | if test "$old" != "$new" 11 | touch ~/.mangas/$new/.url 12 | mkdir ~/.mangas/$new/.chapter 13 | set url (curl "$url/covers/" | grep -o 'https://mangadex.org/images/covers.*?' | sed 's/["].*//'| sort -r |head -1) 14 | curl -o "/home/$USER/.mangas/.covers/$new.jpg" $url 15 | echo "$url" > ~/.mangas/$new/.url 16 | end 17 | set chap (ls -t ~/.mangas/$NEW/ | head -1 ) 18 | set dir "'/home/$USER/.mangas/$NEW/$chap'" 19 | touch ~/.mangas/$new/.chapter/$new$number.desktop 20 | echo "[Desktop Entry] 21 | Type=Application 22 | Name=$new Ch.$number 23 | Icon=/home/$USER/.mangas/.covers/$new.jpg 24 | Exec=cd $dir ; ls ./ | imv 25 | Categories=Manga" > ~/.mangas/$new/.chapter/$new$number.desktop 26 | end 27 | -------------------------------------------------------------------------------- /.config/fish/functions/addmanga.fish: -------------------------------------------------------------------------------- 1 | # Add manga to library 2 | 3 | function addmanga --description "Add manga to my library" 4 | set -l old (ls -t ~/.mangas | wc -l) 5 | set -l url "$argv[1]" 6 | set -l number (math $argv[2]+1) 7 | set -l latest (ls -t ~/.mangas/(ls -t ~/.mangas | head -1) | head -1) 8 | if echo $url | grep -o 'mangadex' 9 | printf "$url\n$number" | ./mangadex-dl.py 10 | else 11 | ~/.mangadl-bash/mangadl $url -d ~/.mangas/ -r $number 12 | end 13 | set -l new (ls -t ~/.mangas | wc -l) 14 | set title (ls -t ~/.mangas | head -1) 15 | if test $new -gt $old 16 | mkdir ~/.mangas/$title/.chapter/ 17 | if echo $url | grep -o 'mangadex' 18 | echo "$url" > ~/.mangas/$title/.url 19 | set url (curl -s "$url/covers/" | grep -o 'https://mangadex.org/images/covers.*?' | sed 's/["].*//'| sort -r |head -1) 20 | curl -o "$HOME/.mangas/.covers/$title.jpg" $url 21 | end 22 | end 23 | set -l nlatest (ls -t ~/.mangas/(ls -t ~/.mangas | head -1) | head -1) 24 | if test "$nlatest" != "$latest" 25 | set chap (ls -t ~/.mangas/$title/ | head -1 ) 26 | set dir (echo "$HOME/.mangas/$title/$chap" | sed 's| |\\\ |g') 27 | set number (math $number-1) 28 | touch ~/.mangas/$title/.chapter/$title$number.desktop 29 | echo "[Desktop Entry] 30 | Type=Application 31 | Name=$title Ch.$number 32 | Icon=$HOME/.mangas/.covers/$title.jpg 33 | Exec=fish -c '"openmanga $dir"' 34 | Categories=Manga" > ~/.mangas/$title/.chapter/$title$number.desktop 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /.config/fish/functions/custom_fetch.fish: -------------------------------------------------------------------------------- 1 | function custom_fetch --description 'Custom fetch' 2 | neofetch --ascii .statue.txt 3 | end 4 | -------------------------------------------------------------------------------- /.config/fish/functions/dwm_recompile.fish: -------------------------------------------------------------------------------- 1 | cd ~/.dwm/ && sh ./recompile 2 | -------------------------------------------------------------------------------- /.config/fish/functions/fetch.fish: -------------------------------------------------------------------------------- 1 | function fetch --description 'custom fetch' 2 | set -l host (cat /etc/hostname) 3 | set -l os 'Arch Linux' 4 | set -l kernel (uname -sr) 5 | set -l compositor (echo $XDG_CURRENT_DESKTOP) 6 | set -l uptime (uptime -p | sed 's/up //') 7 | set -l packages (pacman -Q | wc -l) 8 | set -l shell (basename "$SHELL") 9 | 10 | set_color -l blue; echo $host '(UwU)' 11 | echo ' '  ' ' $os 12 | echo ' '  ' ' $compositor 13 | echo ' '  ' ' $shell 14 | echo ' '  ' ' $kernel 15 | echo ' '  ' ' $packages 16 | echo ' '  ' ' $uptime 17 | end 18 | -------------------------------------------------------------------------------- /.config/fish/functions/gofile.fish: -------------------------------------------------------------------------------- 1 | # gofile api for fish 2 | 3 | function gofile --description 'Upload files' 4 | set file "$argv[1]" 5 | set email 'ndjeutcha@gmail.com' 6 | set server 'srv-store1' 7 | # Uncomment if you don't already know your server. I recommend running this command once to make things faster once and for all. 8 | # set server (curl https://apiv2.gofile.io/getServer | jq .data.server | sed 's/["]//g') 9 | set message (curl -sF email="$email" -F file=@"$file" https://"$server".gofile.io/uploadFile) 10 | set code (echo $message | jq .data.code | sed 's/["]//g') 11 | echo $message >> "$HOME/.config/gofile/log" 12 | set -l url "https://gofile.io/d/$code" 13 | wl-copy "$url" 14 | notify-send "$file - $email" "$url" -i (pwd)/$file 15 | end 16 | 17 | -------------------------------------------------------------------------------- /.config/fish/functions/light.fish: -------------------------------------------------------------------------------- 1 | set -U fish_color_normal normal 2 | set -U fish_color_command 164CC9 3 | set -U fish_color_quote 4C3499 4 | set -U fish_color_redirection 248E8E 5 | set -U fish_color_end 02BDBD 6 | set -U fish_color_error 9177E5 7 | set -U fish_color_param 4319CC 8 | set -U fish_color_selection white --bold --background=brblack 9 | set -U fish_color_search_match bryellow --background=brblack 10 | set -U fish_color_history_current --bold 11 | set -U fish_color_operator 00a6b2 12 | set -U fish_color_escape 00a6b2 13 | set -U fish_color_cwd green 14 | set -U fish_color_cwd_root red 15 | set -U fish_color_valid_path --underline 16 | set -U fish_color_autosuggestion 7596E4 17 | set -U fish_color_user brgreen 18 | set -U fish_color_host normal 19 | set -U fish_color_cancel -r 20 | set -U fish_pager_color_completion normal 21 | set -U fish_pager_color_description B3A06D yellow 22 | set -U fish_pager_color_prefix white --bold --underline 23 | set -U fish_pager_color_progress brwhite --background=cyan 24 | set -U fish_color_match --background=brblue 25 | set -U fish_color_comment 007B7B 26 | -------------------------------------------------------------------------------- /.config/fish/functions/manga_menu.fish: -------------------------------------------------------------------------------- 1 | function manga_menu --description 'nwggrid menu for mangas in library' 2 | set opacity "$argv[1]" 3 | set -l args "" 4 | ls $HOME/.mangas/ | while read manga 5 | set args "$HOME/.mangas/$manga/.chapter:$args" 6 | end 7 | nwggrid -d $args -s 230 -o $opacity -b 353b49 -n 6 -c manga.css 8 | end 9 | -------------------------------------------------------------------------------- /.config/fish/functions/manga_update.fish: -------------------------------------------------------------------------------- 1 | # Update manga library 2 | 3 | function update_mangas --description 'Udate my manag library' 4 | ls ~/.mangas/ | while read manga 5 | echo "$manga" 6 | set url ( cat ~/.mangas/$manga/.url ) 7 | set chap (ls ~/.mangas/$manga | sort -r | sed -n "1p" | grep -o "^[a-z0-9]*" | sed "s/[a-z]//g" | sed "s/0*//") 8 | chap="$(($CHAP+1))" 9 | add_manga $url $chap 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /.config/fish/functions/nord.fish: -------------------------------------------------------------------------------- 1 | set -U fish_color_normal normal 2 | set -U fish_color_command 81a1c1 3 | set -U fish_color_quote a3be8c 4 | set -U fish_color_redirection b48ead 5 | set -U fish_color_end 88c0d0 6 | set -U fish_color_error ebcb8b 7 | set -U fish_color_param eceff4 8 | set -U fish_color_selection white --bold --background=brblack 9 | set -U fish_color_search_match bryellow --background=brblack 10 | set -U fish_color_history_current --bold 11 | set -U fish_color_operator 00a6b2 12 | set -U fish_color_escape 00a6b2 13 | set -U fish_color_cwd green 14 | set -U fish_color_cwd_root red 15 | set -U fish_color_valid_path --underline 16 | set -U fish_color_autosuggestion 4c566a 17 | set -U fish_color_user brgreen 18 | set -U fish_color_host normal 19 | set -U fish_color_cancel -r 20 | set -U fish_pager_color_completion normal 21 | set -U fish_pager_color_description B3A06D yellow 22 | set -U fish_pager_color_prefix white --bold --underline 23 | set -U fish_pager_color_progress brwhite --background=cyan 24 | set -U fish_color_match --background=brblue 25 | set -U fish_color_comment 434c5e 26 | -------------------------------------------------------------------------------- /.config/fish/functions/openmanga.fish: -------------------------------------------------------------------------------- 1 | function openmanga 2 | cd $argv ; ls ./ | sort -n | imv_config=~/.config/imv/manga imv 3 | end 4 | -------------------------------------------------------------------------------- /.config/fish/functions/playerstatus.fish: -------------------------------------------------------------------------------- 1 | function playerstatus --description "player status" 2 | set mpris_status (playerctl status) 3 | if pgrep cmus 4 | set text (cmus-remote -C "format_print '%a - %t'") 5 | set tooltip "cmus - playing" 6 | set mpris_status "Music" 7 | else 8 | set text (playerctl metadata title) 9 | set tooltip (playerctl metadata --format "{{ playerName }} : {{ title }}") 10 | end 11 | echo '{"text": "'"$text"'", "alt": "'"$mpris_status"'", "tooltip": "'"$tooltip"'", "class": "'"$mpris_status"'" }' 12 | end 13 | -------------------------------------------------------------------------------- /.config/fish/functions/record.fish: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.config/fish/functions/record.fish -------------------------------------------------------------------------------- /.config/fish/functions/recording.fish: -------------------------------------------------------------------------------- 1 | function recording --description 'stop button for wf-recorder' 2 | if pgrep wf-recorder 3 | set -l text (swaymsg -t get_tree | jq -r '.nodes[].nodes[] | if .nodes then [recurse(.nodes[])] else [] end + .floating_nodes | .[] | select(.nodes==[]) | ((.id | tostring) + " " + .name)' | awk '{print $2}' | grep recorder) 4 | set -l tooltip "$text - recording" 5 | echo '{"text": "壘", "tooltip": "'"$tooltip"'" }' 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /.config/fish/functions/update_mangas.fish: -------------------------------------------------------------------------------- 1 | # Update manga library 2 | 3 | function update_mangas --description 'Update my manga library' 4 | set mangas $argv 5 | if test "$mangas" = "" 6 | for manga in (ls ~/.mangas/) 7 | set chap (ls ~/.mangas/(echo $manga | sed 's/_/ /g') | sort -nr | sed -n "1p" | grep -o "^[a-z0-9]*" | sed "s/[a-z]//g" | sed "s/0*//") 8 | set -l chap (math $chap+1) 9 | addmanga (echo $manga | sed 's/ /_/g') $chap 10 | end 11 | else 12 | for manga in $mangas 13 | if test -d ~/.mangas/(echo $manga | sed 's/_/ /g') 14 | set chap (ls ~/.mangas/(echo $manga | sed 's/_/ /g') | sort -nr | sed -n "1p" | grep -o "^[a-z0-9]*" | sed "s/[a-z]//g" | sed "s/0*//") 15 | else 16 | set chap (cd ~/.mangas; ls (fd $manga | head -1) | sort -nr | sed -n "1p" | grep -o "^[a-z0-9]*" | sed "s/[a-z]//g" | sed "s/0*//") 17 | cd $HOME 18 | end 19 | set -l chap (math $chap+1) 20 | addmanga "$manga" "$chap" 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /.config/fish/functions/vim.fish: -------------------------------------------------------------------------------- 1 | function vim --description 'Neovim, text editor' 2 | nvim $argv 3 | end 4 | -------------------------------------------------------------------------------- /.config/fish/functions/wofer.fish: -------------------------------------------------------------------------------- 1 | function wofer --description "Simple file manager for Wofi" 2 | cd $argv[1] 3 | ~/wofer/wofer.sh 4 | end 5 | -------------------------------------------------------------------------------- /.config/i3/Blocks/battery: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | BATTERY=0 4 | BATTERY_INFO=$(acpi -b | grep "Battery ${BATTERY}") 5 | BATTERY_STATE=$(echo "${BATTERY_INFO}" | grep -wo "Full\|Charging\|Not") 6 | BATTERY_POWER=$(echo "${BATTERY_INFO}" | grep -o '[0-9]\+%' | tr -d '%') 7 | 8 | URGENT_VALUE=10 9 | 10 | if [[ "${BATTERY_STATE}" = "Charging" ]]; then 11 | echo "${BATTERY_POWER}%+" 12 | echo "${BATTERY_POWER}%+" 13 | echo "" 14 | elif [[ "${BATTERY_STATE}" = "Not" ]]; then 15 | echo "${BATTERY_POWER}%-" 16 | echo "${BATTERY_POWER}%-" 17 | echo "" 18 | else 19 | echo "${BATTERY_POWER}%" 20 | echo "${BATTERY_POWER}%" 21 | echo "" 22 | fi 23 | 24 | if [[ "${BATTERY_POWER}" -le "${URGENT_VALUE}" ]]; then 25 | exit 0 26 | fi -------------------------------------------------------------------------------- /.config/i3/Blocks/brightness: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # One of the following: xrandr, xbacklight, kernel 4 | METHOD="xbacklight" 5 | 6 | # Left click 7 | if [[ "${BLOCK_BUTTON}" -eq 1 ]]; then 8 | ~/.Scripts/ChangeWallpapers.sh 9 | #elif [[ "${BLOCK_BUTTON}" -eq 2 ]]; then 10 | # ~/.Scripts/ChangeWallpapers.sh 11 | #elif [[ "${BLOCK_BUTTON}" -eq 3 ]]; then 12 | # xbacklight -dec 10 13 | elif [[ "${BLOCK_BUTTON}" -eq 4 ]]; then 14 | xbacklight -inc 5 15 | elif [[ "${BLOCK_BUTTON}" -eq 5 ]]; then 16 | xbacklight -dec 5 17 | fi 18 | 19 | URGENT_VALUE=10 20 | 21 | if [[ "${METHOD}" = "xrandr" ]]; then 22 | device="${BLOCK_INSTANCE:-primary}" 23 | xrandrOutput=$(xrandr --verbose) 24 | 25 | if [[ "${device}" = "primary" ]]; then 26 | device=$(echo "${xrandrOutput}" | grep 'primary' | head -n 1 | awk -F ' ' '{print $1}') 27 | fi 28 | 29 | curBrightness=$(echo "${xrandrOutput}" | grep "${device}" -A 5 | grep -i "Brightness" | awk -F ':' '{print $2}') 30 | elif [[ "${METHOD}" = "kernel" ]]; then 31 | device="${BLOCK_INSTANCE:-intel_backlight}" 32 | maxBrightness=$(cat /sys/class/backlight/${device}/max_brightness) 33 | curBrightness=$(cat /sys/class/backlight/${device}/brightness) 34 | elif [[ "${METHOD}" = "xbacklight" ]]; then 35 | curBrightness=$(xbacklight -get) 36 | fi 37 | 38 | if [[ "${curBrightness}" -le 0 ]]; then 39 | echo "X" 40 | echo "" 41 | fi 42 | 43 | if [[ "${METHOD}" = "xrandr" ]]; then 44 | percent=$(echo "scale=0;${curBrightness} * 100" | bc -l) 45 | elif [[ "${METHOD}" = "kernel" ]]; then 46 | percent=$(echo "scale=0;${curBrightness} / ${maxBrightness} * 100" | bc -l) 47 | elif [[ "${METHOD}" = "xbacklight" ]]; then 48 | percent=$(echo "scale=0;${curBrightness}" | bc -l) 49 | fi 50 | 51 | percent=${percent%.*} 52 | 53 | if [[ "${percent}" -le 0 ]]; then 54 | echo "X" 55 | echo "" 56 | fi 57 | 58 | echo "${percent}%" 59 | echo "${percent}%" 60 | echo "" 61 | 62 | if [[ "${percent}" -le "${URGENT_VALUE}" ]]; then 63 | exit 33 64 | fi -------------------------------------------------------------------------------- /.config/i3/Blocks/cpu: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Source: http://askubuntu.com/a/450136 3 | 4 | URGENT_VALUE=90 5 | 6 | PREV_TOTAL=0 7 | PREV_IDLE=0 8 | 9 | cpuFile="/tmp/.cpu" 10 | 11 | if [[ -f "${cpuFile}" ]]; then 12 | fileCont=$(cat "${cpuFile}") 13 | PREV_TOTAL=$(echo "${fileCont}" | head -n 1) 14 | PREV_IDLE=$(echo "${fileCont}" | tail -n 1) 15 | fi 16 | 17 | CPU=(`cat /proc/stat | grep '^cpu '`) # Get the total CPU statistics. 18 | unset CPU[0] # Discard the "cpu" prefix. 19 | IDLE=${CPU[4]} # Get the idle CPU time. 20 | 21 | # Calculate the total CPU time. 22 | TOTAL=0 23 | 24 | for VALUE in "${CPU[@]:0:4}"; do 25 | let "TOTAL=$TOTAL+$VALUE" 26 | done 27 | 28 | if [[ "${PREV_TOTAL}" != "" ]] && [[ "${PREV_IDLE}" != "" ]]; then 29 | # Calculate the CPU usage since we last checked. 30 | let "DIFF_IDLE=$IDLE-$PREV_IDLE" 31 | let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL" 32 | let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10" 33 | echo "${DIFF_USAGE}%" 34 | echo "${DIFF_USAGE}%" 35 | echo "" 36 | else 37 | echo "?" 38 | echo "?" 39 | echo "" 40 | fi 41 | 42 | # Remember the total and idle CPU times for the next check. 43 | echo "${TOTAL}" > "${cpuFile}" 44 | echo "${IDLE}" >> "${cpuFile}" 45 | 46 | if [[ "${DIFF_USAGE}" -gt 0 ]] && [[ "${DIFF_USAGE}" -gt "${URGENT_VALUE}" ]]; then 47 | exit 33 48 | fi -------------------------------------------------------------------------------- /.config/i3/Blocks/fcitx: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SSPID=$(pgrep -l fcitx |awk -F ' ' '{print $1}') 4 | 5 | if [[ "${SSPID}" != "" ]]; then 6 | echo "" 7 | echo "" 8 | else 9 | echo "" 10 | echo "" 11 | fi -------------------------------------------------------------------------------- /.config/i3/Blocks/firewall: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Left click 4 | if [[ "${BLOCK_BUTTON}" -eq 1 ]]; then 5 | sudo ufw enable 6 | # Middle click 7 | elif [[ "${BLOCK_BUTTON}" -eq 2 ]]; then 8 | sudo ufw reload 9 | # Right click 10 | elif [[ "${BLOCK_BUTTON}" -eq 3 ]]; then 11 | sudo ufw disable 12 | fi 13 | 14 | status=$(sudo ufw status 2>/dev/null) 15 | 16 | if [[ $? -gt 0 ]]; then 17 | exit 18 | fi 19 | 20 | if [[ "${status}" != *inactive* ]]; then 21 | echo "on" 22 | echo "on" 23 | echo "" 24 | else 25 | echo "off" 26 | echo "off" 27 | echo "" 28 | fi -------------------------------------------------------------------------------- /.config/i3/Blocks/headphone: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #if [[ "${BLOCK_BUTTON}" -eq 1 ]]; then 4 | # termite -e alsamixer 5 | #elif [[ "${BLOCK_BUTTON}" -eq 4 ]]; then 6 | # amixer -q sset Master 2%+ 7 | #elif [[ "${BLOCK_BUTTON}" -eq 5 ]]; then 8 | # amixer -q sset Master 2%- 9 | #fi 10 | VALUE=$(amixer -c 0 contents | \ 11 | awk -F"," ' 12 | $1 == "numid=14" { 13 | c=1 14 | } c && /: values/ { 15 | split($0, a, "=") 16 | print a[2]; 17 | exit 18 | }') 19 | 20 | if [[ "${VALUE}" == "on" ]]; then 21 | echo "" 22 | #else 23 | # echo "" 24 | # echo "" 25 | fi 26 | 27 | 28 | #from https://unix.stackexchange.com/questions/76375/how-do-i-detect-wheter-the-audio-cable-is-connected 29 | #One way could perhaps be to use amixer. 30 | 31 | #Jack plugged in: 32 | 33 | #$ amixer -c 0 contents 34 | #numid=29,iface=CARD,name='Front Headphone Jack' 35 | # ; type=BOOLEAN,access=r-------,values=1 36 | # : values=on 37 | #... 38 | #Jack not plugged in: 39 | 40 | #$ amixer -c 0 contents 41 | #numid=29,iface=CARD,name='Front Headphone Jack' 42 | # ; type=BOOLEAN,access=r-------,values=1 43 | # : values=off 44 | #... 45 | #So for that specific one I could do: 46 | 47 | #amixer -c 0 contents | \ 48 | #awk -F"," ' 49 | #$1 == "numid=own" { 此處的own的序號必須自己尋找 50 | # c=1 51 | #} c && /: values/ { 52 | # split($0, a, "=") 53 | # print a[2]; 54 | # exit 55 | #}' 56 | #giving output of on or off. 57 | # 58 | -------------------------------------------------------------------------------- /.config/i3/Blocks/keystate: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TYPE="${BLOCK_INSTANCE:-caps}" 4 | 5 | lockLine=$(xset -q | grep "Num Lock") 6 | 7 | capsLock=$(echo "${lockLine}" | awk -F ' ' '{print $4}') 8 | numLock=$(echo "${lockLine}" | awk -F ' ' '{print $8}') 9 | 10 | if [[ "${capsLock}" == "on" && "${numLock}" == "on" ]]; then 11 | echo " " 12 | echo "" 13 | elif [[ "${capsLock}" == "on" ]]; then 14 | echo "" 15 | echo "" 16 | elif [[ "${numLock}" == "on" ]]; then 17 | echo "" 18 | echo "" 19 | else 20 | exit 21 | fi -------------------------------------------------------------------------------- /.config/i3/Blocks/memory: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (C) 2014 Julien Bonjean 3 | 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program. If not, see . 16 | 17 | TYPE="${BLOCK_INSTANCE:-mem}" 18 | 19 | awk -v type=$TYPE ' 20 | /^MemTotal:/ { 21 | mem_total=$2 22 | } 23 | /^MemFree:/ { 24 | mem_free=$2 25 | } 26 | /^Buffers:/ { 27 | mem_free+=$2 28 | } 29 | /^Cached:/ { 30 | mem_free+=$2 31 | } 32 | /^SwapTotal:/ { 33 | swap_total=$2 34 | } 35 | /^SwapFree:/ { 36 | swap_free=$2 37 | } 38 | END { 39 | if (type == "swap") { 40 | free=swap_free/1024/1024 41 | used=(swap_total-swap_free)/1024/1024 42 | total=swap_total/1024/1024 43 | } else { 44 | free=mem_free/1024/1024 45 | used=(mem_total-mem_free)/1024/1024 46 | total=mem_total/1024/1024 47 | } 48 | 49 | pct=0 50 | if (total > 0) { 51 | pct=used/total*100 52 | } 53 | 54 | # full text 55 | printf("%.f%%\n",pct) 56 | 57 | # short text 58 | printf("%.f%%\n", pct) 59 | 60 | # color 61 | if (pct > 90) { 62 | print("#FF0000\n") 63 | } else if (pct > 80) { 64 | print("#FFAE00\n") 65 | } else if (pct > 70) { 66 | print("#FFF600\n") 67 | } 68 | } 69 | ' /proc/meminfo 70 | -------------------------------------------------------------------------------- /.config/i3/Blocks/microphone: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Left click 4 | if [[ "${BLOCK_BUTTON}" -eq 1 ]]; then 5 | amixer -q sset Capture 5%+ 6 | # Middle click 7 | elif [[ "${BLOCK_BUTTON}" -eq 2 ]]; then 8 | amixer -q sset Capture toggle 9 | # Right click 10 | elif [[ "${BLOCK_BUTTON}" -eq 3 ]]; then 11 | amixer -q sset Capture 5%- 12 | fi 13 | 14 | statusLine=$(amixer get Capture | tail -n 1) 15 | status=$(echo "${statusLine}" | grep -wo "on") 16 | volume=$(echo "${statusLine}" | awk -F ' ' '{print $5}' | tr -d '[]%') 17 | 18 | if [[ "${status}" == "on" ]]; then 19 | echo "${volume}%" 20 | echo "${volume}%" 21 | echo "" 22 | else 23 | echo "off" 24 | echo "off" 25 | echo "" 26 | fi -------------------------------------------------------------------------------- /.config/i3/Blocks/playerctl2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Based on https://aur.archlinux.org/packages/playerctl/ 3 | 4 | INSTANCE="${BLOCK_INSTANCE}" 5 | if [[ "${INSTANCE}" != "" ]]; then 6 | ARGUMENTS="--player ${INSTANCE}" 7 | fi 8 | 9 | ICON_PLAY="➤" 10 | ICON_PAUSE="Ⅱ" 11 | ICON_STOP="≠" 12 | CUR_ICON="" 13 | 14 | if [[ "${BLOCK_BUTTON}" -eq 1 ]]; then 15 | $(playerctl ${ARGUMENTS} previous) 16 | elif [[ "${BLOCK_BUTTON}" -eq 2 ]]; then 17 | $(playerctl ${ARGUMENTS} play-pause) 18 | elif [[ "${BLOCK_BUTTON}" -eq 3 ]]; then 19 | $(playerctl ${ARGUMENTS} next) 20 | elif [[ "${BLOCK_BUTTON}" -eq 4 ]]; then 21 | $(playerctl ${ARGUMENTS} volume 0.2+) 22 | elif [[ "${BLOCK_BUTTON}" -eq 5 ]]; then 23 | $(playerctl ${ARGUMENTS} volume 0.2-) 24 | fi 25 | 26 | PLAYER_STATUS=$(playerctl ${ARGUMENTS} status) 27 | INFO_TITLE=$(playerctl ${ARGUMENTS} metadata title) 28 | INFO_ALBUM=$(playerctl ${ARGUMENTS} metadata album) 29 | INFO_ARTIST=$(playerctl ${ARGUMENTS} metadata artist) 30 | 31 | if [[ "${PLAYER_STATUS}" = "Paused" ]]; then 32 | CUR_ICON="${ICON_PAUSE}" 33 | elif [[ "${PLAYER_STATUS}" = "Playing" ]]; then 34 | CUR_ICON="${ICON_PLAY}" 35 | else 36 | CUR_ICON="${ICON_STOP}" 37 | fi 38 | 39 | if [[ "${INFO_TITLE}" != "" ]] && [[ "${INFO_ARTIST}" != "" ]]; then 40 | echo "${INFO_ARTIST} - ${INFO_TITLE} ${CUR_ICON}" 41 | echo "${INFO_ARTIST} - ${INFO_TITLE} ${CUR_ICON}" 42 | fi -------------------------------------------------------------------------------- /.config/i3/Blocks/ssid: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ "${BLOCK_BUTTON}" -eq 1 ]]; then 4 | termite -e nmtui 5 | fi 6 | 7 | SSID_NAME=$(iwgetid -r) 8 | 9 | # You can put any urgent name so the block will give warning 10 | # if a network with this name is used, like public wifi or alike. 11 | # You can separate multiple values with \| 12 | URGENT_VALUE="" 13 | 14 | if [[ "${SSID_NAME}" != "" ]]; then 15 | echo "${SSID_NAME}" 16 | echo "${SSID_NAME}" 17 | echo "" 18 | 19 | if [[ "${URGENT_VALUE}" != "" ]] && [[ $(echo "${SSID_NAME}" | grep -we "${URGENT_VALUE}") != "" ]]; then 20 | exit 33 21 | fi 22 | else 23 | echo "x" 24 | echo "x" 25 | echo "" 26 | fi -------------------------------------------------------------------------------- /.config/i3/Blocks/sslocal: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SSPID=$(pgrep -l sslocal |awk -F ' ' '{print $1}') 4 | 5 | if [[ "${SSPID}" != "" ]]; then 6 | echo "" 7 | echo "" 8 | else 9 | echo "" 10 | echo "" 11 | echo "" 12 | fi -------------------------------------------------------------------------------- /.config/i3/Blocks/time: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TIME=$(date '+%a %b %d %H:%M') 4 | 5 | echo "${TIME}" 6 | echo "${TIME}" 7 | echo "" -------------------------------------------------------------------------------- /.config/i3/Blocks/usb: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DEVICE_NAME="${BLOCK_INSTANCE:-Keyboard}" 4 | 5 | DEVICE_INFO=$(lsusb | grep -i kingston) 6 | 7 | if [[ "${DEVICE_INFO}" != "" ]]; then 8 | echo "" 9 | echo "" 10 | echo "" 11 | else 12 | echo "" 13 | fi -------------------------------------------------------------------------------- /.config/i3/Blocks/volume: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Left click 4 | if [[ "${BLOCK_BUTTON}" -eq 1 ]]; then 5 | termite -e alsamixer 6 | # amixer -q sset Master 10%+ 7 | # Middle click 8 | elif [[ "${BLOCK_BUTTON}" -eq 2 ]]; then 9 | amixer -q sset Master toggle 10 | # Right click 11 | #elif [[ "${BLOCK_BUTTON}" -eq 2 ]]; then 12 | # amixer -q sset Master 10%- 13 | elif [[ "${BLOCK_BUTTON}" -eq 4 ]]; then 14 | amixer -q sset Master 2%+ 15 | elif [[ "${BLOCK_BUTTON}" -eq 5 ]]; then 16 | amixer -q sset Master 2%- 17 | fi 18 | 19 | statusLine=$(amixer get Master | tail -n 1) 20 | status=$(echo "${statusLine}" | grep -wo "on") 21 | 22 | volume=$(echo "${statusLine}" | awk -F ' ' '{print $4}' | tr -d '[]%') 23 | 24 | VALUE=$(amixer -c 0 contents | \ 25 | awk -F"," ' 26 | $1 == "numid=14" { 27 | c=1s 28 | } c && /: values/ { 29 | split($0, a, "=") 30 | print a[2]; 31 | exit 32 | }') 33 | 34 | 35 | if [[ "${status}" = "on" && "${VALUE}" = "on" ]]; then 36 | # if [[ "${VALUE}" = "on" ]]; then 37 | echo " ${volume}%" 38 | echo " ${volume}%" 39 | echo "" 40 | # elif 41 | # echo " ${volume}%" 42 | # echo " ${volume}%" 43 | # echo "" 44 | # fi 45 | elif [[ "${status}" = "on" && "${VALUE}" = "off" ]]; then 46 | echo " ${volume}%" 47 | echo "" 48 | else 49 | echo " 00%" 50 | echo " 00%" 51 | echo "" 52 | fi -------------------------------------------------------------------------------- /.config/i3/Blocks/webcam: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ -c /dev/video0 ]]; then 4 | if [[ "$(fuser /dev/video0)" != "" ]]; then 5 | echo "rec" 6 | echo "rec" 7 | echo "" 8 | else 9 | echo "on" 10 | echo "on" 11 | echo "" 12 | else 13 | echo "off" 14 | echo "off" 15 | echo "" 16 | fi 17 | fi -------------------------------------------------------------------------------- /.config/i3/Blocks/window: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ACTIVE_WINDOW=$(xprop -id $(xprop -root _NET_ACTIVE_WINDOW | cut -d ' ' -f 5) WM_NAME | cut -d '"' -f 2) 4 | 5 | if [[ "${ACTIVE_WINDOW}" != "" ]]; then 6 | echo "${ACTIVE_WINDOW}" 7 | echo "${ACTIVE_WINDOW}" 8 | echo "" 9 | fi -------------------------------------------------------------------------------- /.config/i3/Pictures/b-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.config/i3/Pictures/b-1.png -------------------------------------------------------------------------------- /.config/i3/bin/i3bar: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Terminate already running bar instances 4 | killall -q polybar 5 | 6 | # Wait until the processes have been shut down 7 | while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done 8 | 9 | # Launch polybar 10 | polybar main -c ~/.config/i3/polybar/config & 11 | -------------------------------------------------------------------------------- /.config/i3/i3blocks.conf: -------------------------------------------------------------------------------- 1 | # i3blocks config file 2 | # 3 | # Please see man i3blocks for a complete reference! 4 | # The man page is also hosted at http://vivien.github.io/i3blocks 5 | # 6 | # List of valid properties: 7 | # 8 | align=center 9 | # color 10 | command=$HOME/.config/i3/Blocks/$BLOCK_NAME 11 | # full_text 12 | # instance 13 | # interval 14 | # label 15 | markup=none 16 | # min_widt 17 | # name 18 | separator=false 19 | separator_block_width=18 20 | # short_text 21 | # signal 22 | # urgent 23 | 24 | 25 | #plugins 26 | 27 | #[firewall] 28 | #interval=10 29 | #label=F 30 | 31 | #[window] 32 | #interval=1 33 | 34 | #[notifier] 35 | #label= 36 | #interval=1 37 | 38 | #[microphone] 39 | #label=m 40 | #interval=100 41 | 42 | [playerctl2] 43 | label= 44 | interval=5 45 | 46 | [mediaplayer] 47 | label= 48 | interval=1 49 | 50 | #[weather] 51 | #instance=1808773 52 | #label=寨 53 | #interval=2 54 | 55 | #[weather] 56 | #instance=1792947 57 | #label=津 58 | #interval=300 59 | 60 | [bandwidth] 61 | instance=wlp2s0;in 62 | label= 63 | interval=1 64 | 65 | [bandwidth] 66 | instance=wlp2s0;out 67 | label= 68 | interval=1 69 | 70 | [ssid] 71 | label= 72 | interval=60 73 | 74 | [volume] 75 | interval=1 76 | 77 | [brightness] 78 | label= 79 | interval=1 80 | 81 | [battery] 82 | label= 83 | instance=0 84 | interval=5 85 | 86 | 87 | [temperature] 88 | instance=Core 89 | label= 90 | interval=5 91 | 92 | [memory] 93 | label= 94 | interval=30 95 | 96 | [cpu] 97 | label= 98 | interval=2 99 | 100 | [time] 101 | interval=1 102 | label= 103 | 104 | [usb] 105 | instance=kingston 106 | interval=10 107 | separator_block_width=10 108 | 109 | [fcitx] 110 | interval=10 111 | separator_block_width=10 112 | 113 | [sslocal] 114 | interval=300 115 | separator_block_width=10 116 | 117 | [keystate] 118 | interval=3 119 | 120 | 121 | -------------------------------------------------------------------------------- /.config/i3/polybar/colors: -------------------------------------------------------------------------------- 1 | ; vim:ft=dosini 2 | 3 | [color] 4 | 5 | FOREGROUND = #D8DEE9 6 | BACKGROUND = #2E3440 7 | BLACK = #3B4252 8 | RED = #BF616A 9 | GREEN = #A3BE8C 10 | YELLOW = #EBCB8B 11 | BLUE = #81A1C1 12 | MAGENTA = #B48EAD 13 | CYAN = #88C0D0 14 | WHITE = #E5E9F0 15 | ALTBLACK = #4C566A 16 | ALTRED = #BF616A 17 | ALTGREEN = #A3BE8C 18 | ALTYELLOW = #EBCB8B 19 | ALTBLUE = #81A1C1 20 | ALTMAGENTA = #B48EAD 21 | ALTCYAN = #8FBCBB 22 | ALTWHITE = #ECEFF4 23 | nord7 = #8FBCBB 24 | nord8 = #88C0D0 25 | -------------------------------------------------------------------------------- /.config/i3/polybar/colors-gruvbox: -------------------------------------------------------------------------------- 1 | ; vim:ft=dosini 2 | 3 | [color] 4 | 5 | ;BACKGROUND = #fdf6e3 6 | ;FOREGROUND = #2E3440 7 | 8 | BACKGROUND = #282828 9 | FOREGROUND = #EBDBB2 10 | 11 | BLACK = #282828 12 | RED = #FB4934 13 | GREEN = #B8BB26 14 | YELLOW = #FABD2F 15 | BLUE = #83A598 16 | MAGENTA = #D3869B 17 | CYAN = #8EC07C 18 | WHITE = #EBDBB2 19 | ALTBLACK = #32302F 20 | ALTRED = #CC241D 21 | ALTGREEN = #98971A 22 | ALTYELLOW = #D79921 23 | ALTBLUE = #458588 24 | ALTMAGENTA = #B16286 25 | ALTCYAN = #688D6A 26 | ALTWHITE = #FBF1C7 27 | -------------------------------------------------------------------------------- /.config/i3/polybar/colors-light: -------------------------------------------------------------------------------- 1 | ; vim:ft=dosini 2 | 3 | [color] 4 | 5 | ;BACKGROUND = #fdf6e3 6 | ;FOREGROUND = #2E3440 7 | 8 | BACKGROUND = #E5E9F0 9 | FOREGROUND = #3B4252 10 | 11 | BLACK = #2E3440 12 | RED = #FF6655 13 | GREEN = #A3BE8C 14 | YELLOW = #ECBE7B 15 | BLUE = #81A1C1 16 | MAGENTA = #C678DD 17 | CYAN = #46D9FF 18 | WHITE = #F0F4FC 19 | ALTBLACK = #2D2D2D 20 | ALTRED = #99324B 21 | ALTGREEN = #4F894C 22 | ALTYELLOW = #9A7500 23 | ALTBLUE = #3B61A8 24 | ALTMAGENTA = #97365B 25 | ALTCYAN = #398EAC 26 | ALTWHITE = #ECEFF4 27 | -------------------------------------------------------------------------------- /.config/i3/polybar/colors-nord: -------------------------------------------------------------------------------- 1 | ; vim:ft=dosini 2 | 3 | [color] 4 | 5 | FOREGROUND = #D8DEE9 6 | BACKGROUND = #2E3440 7 | BLACK = #3B4252 8 | RED = #BF616A 9 | GREEN = #A3BE8C 10 | YELLOW = #EBCB8B 11 | BLUE = #81A1C1 12 | MAGENTA = #B48EAD 13 | CYAN = #88C0D0 14 | WHITE = #E5E9F0 15 | ALTBLACK = #4C566A 16 | ALTRED = #BF616A 17 | ALTGREEN = #A3BE8C 18 | ALTYELLOW = #EBCB8B 19 | ALTBLUE = #81A1C1 20 | ALTMAGENTA = #B48EAD 21 | ALTCYAN = #8FBCBB 22 | ALTWHITE = #ECEFF4 23 | nord7 = #8FBCBB 24 | nord8 = #88C0D0 25 | -------------------------------------------------------------------------------- /.config/i3/polybar/colors-solar: -------------------------------------------------------------------------------- 1 | ; vim:ft=dosini 2 | 3 | [color] 4 | 5 | BACKGROUND = #fdf6e3 6 | FOREGROUND = #2E3440 7 | 8 | ;BACKGROUND = #2E3440 9 | ;FOREGROUND = #D8DEE9 10 | 11 | BLACK = #3B4252 12 | RED = #BF616A 13 | GREEN = #A3BE8C 14 | YELLOW = #EBCB8B 15 | BLUE = #81A1C1 16 | MAGENTA = #B48EAD 17 | CYAN = #88C0D0 18 | WHITE = #E5E9F0 19 | ALTBLACK = #4C566A 20 | ALTRED = #BF616A 21 | ALTGREEN = #A3BE8C 22 | ALTYELLOW = #EBCB8B 23 | ALTBLUE = #81A1C1 24 | ALTMAGENTA = #B48EAD 25 | ALTCYAN = #8FBCBB 26 | ALTWHITE = #ECEFF4 27 | -------------------------------------------------------------------------------- /.config/i3/polybar/script/weather-bar.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #curl -sS "wttr.in/?format=%t" 3 | #curl -sS "wttr.in/38.906551,111.2222683?format="%c+%t+%h"" 4 | curl -sS "wttr.in/beijing?format="%c+%t+%h"" 5 | -------------------------------------------------------------------------------- /.config/kitty/nord.conf: -------------------------------------------------------------------------------- 1 | # Nord Colorscheme for Kitty 2 | # Based on: 3 | # - https://gist.github.com/marcusramberg/64010234c95a93d953e8c79fdaf94192 4 | # - https://github.com/arcticicestudio/nord-hyper 5 | 6 | foreground #D8DEE9 7 | background #2E3440 8 | selection_foreground #000000 9 | selection_background #FFFACD 10 | url_color #0087BD 11 | cursor #81A1C1 12 | 13 | # black 14 | color0 #3B4252 15 | color8 #4C566A 16 | 17 | # red 18 | color1 #BF616A 19 | color9 #BF616A 20 | 21 | # green 22 | color2 #A3BE8C 23 | color10 #A3BE8C 24 | 25 | # yellow 26 | color3 #EBCB8B 27 | color11 #EBCB8B 28 | 29 | # blue 30 | color4 #81A1C1 31 | color12 #81A1C1 32 | 33 | # magenta 34 | color5 #B48EAD 35 | color13 #B48EAD 36 | 37 | # cyan 38 | color6 #88C0D0 39 | color14 #8FBCBB 40 | 41 | # white 42 | color7 #E5E9F0 43 | color15 #ECEFF4 44 | -------------------------------------------------------------------------------- /.config/kitty/polar.conf: -------------------------------------------------------------------------------- 1 | # Nord Colorscheme for Kitty 2 | # Based on: 3 | # - https://gist.github.com/marcusramberg/64010234c95a93d953e8c79fdaf94192 4 | # - https://github.com/arcticicestudio/nord-hyper 5 | 6 | foreground #2E3440 7 | background #D8DEE9 8 | selection_foreground #FFFACD 9 | selection_background #000000 10 | url_color #81A1C1 11 | cursor #0087BD 12 | 13 | # black 14 | color0 #3B4252 15 | color8 #4C566A 16 | 17 | # red 18 | color1 #BF616A 19 | color9 #BF616A 20 | 21 | # green 22 | color2 #A3BE8C 23 | color10 #A3BE8C 24 | 25 | # yellow 26 | color3 #EBCB8B 27 | color11 #EBCB8B 28 | 29 | # blue 30 | color4 #81A1C1 31 | color12 #81A1C1 32 | 33 | # magenta 34 | color5 #B48EAD 35 | color13 #B48EAD 36 | 37 | # cyan 38 | color6 #88C0D0 39 | color14 #8FBCBB 40 | 41 | # white 42 | color7 #E5E9F0 43 | color15 #ECEFF4 44 | -------------------------------------------------------------------------------- /.config/mako/config: -------------------------------------------------------------------------------- 1 | max-visible=10 2 | layer=top 3 | font=Sarasa UI SC 10 4 | background-color=#e5e9f0dd 5 | text-color=#2e3440 6 | border-color=#eceff4 7 | border-radius=7 8 | max-icon-size=48 9 | default-timeout=10000 10 | anchor=top-right 11 | margin=20 12 | -------------------------------------------------------------------------------- /.config/nvim/plugin/a_map.vim: -------------------------------------------------------------------------------- 1 | " Init.vim Setting 2 | nnoremap s :source $MYVIMRC 3 | 4 | " Plug Setting 5 | nnoremap i :PlugInstall 6 | nnoremap u :PlugUpdate 7 | nnoremap c :PlugClean 8 | 9 | " Clipboard 10 | set go=a 11 | set clipboard+=unnamedplus 12 | 13 | " Clipboard Remap 14 | vnoremap y "+y 15 | nnoremap Y "+yg_ 16 | nnoremap y "+y 17 | nnoremap yy "+yy 18 | nnoremap p "+p 19 | nnoremap P "+P 20 | vnoremap p "+p 21 | vnoremap P "+P 22 | 23 | " TagBar 24 | nmap t :TagbarToggle 25 | 26 | " Spell-check set to o, 'o' for 'orthography': 27 | map o :setlocal spell! spelllang=en_us 28 | 29 | " Split Navigation shortcuts 30 | map wv :vsplit 31 | map ws :split 32 | map wh h 33 | map wj j 34 | map wk k 35 | map wl l 36 | 37 | "Buffer Navigation 38 | noremap l :bn 39 | noremap h :bp 40 | noremap :tabnew split 41 | 42 | " Keep selection after shift 43 | vnoremap < >gv 45 | 46 | " Replace all is aliased to S. 47 | nnoremap S :%s//g 48 | -------------------------------------------------------------------------------- /.config/nvim/plugin/a_sets.vim: -------------------------------------------------------------------------------- 1 | " Behavior 2 | syntax on 3 | syntax enable 4 | 5 | filetype on 6 | filetype plugin on 7 | filetype indent on 8 | 9 | set ttimeoutlen=0 10 | set splitbelow splitright 11 | set conceallevel=2 12 | 13 | set autoindent 14 | set smartindent 15 | set cindent 16 | set cinoptions=g0,:0,N-s,(0 17 | 18 | set expandtab 19 | set foldmethod=indent 20 | set tabstop=4 21 | set shiftwidth=4 22 | set softtabstop=4 23 | set smarttab 24 | 25 | set wrap linebreak nolist 26 | set shortmess+=c 27 | set whichwrap+=<,>,h,l 28 | set virtualedit=block,onemore 29 | set backspace=2 30 | set sidescroll=10 31 | 32 | set hlsearch 33 | set incsearch 34 | set ignorecase 35 | set smartcase 36 | 37 | set autoread 38 | set autowrite 39 | set noswapfile 40 | set nobackup 41 | set nowritebackup 42 | set undodir=~/.nvim/undodir 43 | set undofile 44 | nnoremap c "_c 45 | 46 | set langmenu=zh_CN.UTF-8 47 | set helplang=cn 48 | set termencoding=utf-8 49 | set encoding=utf8 50 | set fileencodings=utf8,ucs-bom,gbk,cp936,gb2312,gb18030 51 | 52 | " vim-interface 53 | set t_Co=256 54 | if has('termguicolors') 55 | set termguicolors 56 | endif 57 | set noeb 58 | set mouse=a 59 | set hidden 60 | set showcmd 61 | set ruler 62 | set cursorline 63 | set cursorcolumn 64 | set number relativenumber 65 | set cmdheight=1 66 | set laststatus=2 67 | set noshowmode 68 | set nohlsearch 69 | set bg=dark 70 | 71 | 72 | " Command Completion 73 | set wildmenu 74 | set wildmode=longest:full,full 75 | set completeopt-=preview 76 | -------------------------------------------------------------------------------- /.config/nvim/plugin/b_gitgutter.vim: -------------------------------------------------------------------------------- 1 | " GitGutter 2 | nmap ) (GitGutterNextHunk) 3 | nmap ( (GitGutterPrevHunk) 4 | let g:gitgutter_enabled = 1 5 | let g:gitgutter_map_keys = 0 6 | let g:gitgutter_highlight_linenrs = 1 7 | -------------------------------------------------------------------------------- /.config/nvim/plugin/b_markdown.vim: -------------------------------------------------------------------------------- 1 | " Markdown 2 | let system = system('uname -s') 3 | let g:mkdp_path_to_chrome = '/usr/bin/google-chrome-stable %U' 4 | nmap MarkdownPreview 5 | imap MarkdownPreview 6 | nmap StopMarkdownPreview 7 | imap StopMarkdownPreview 8 | -------------------------------------------------------------------------------- /.config/nvim/plugin/b_nerdtree.vim: -------------------------------------------------------------------------------- 1 | " Nerdtree 2 | nnoremap n :NERDTreeToggle 3 | let g:NERDTreeFileExtensionHighlightFullName = 1 4 | let g:NERDTreeExactMatchHighlightFullName = 1 5 | let g:NERDTreePatternMatchHighlightFullName = 1 6 | let g:NERDTreeHighlightFolders = 1 7 | let g:NERDTreeHighlightFoldersFullName = 1 8 | let g:NERDTreeDirArrowExpandable='▷' 9 | let g:NERDTreeDirArrowCollapsible='▼' 10 | 11 | " Nerdtree-git-plugin 12 | let g:NERDTreeGitStatusIndicatorMapCustom = { 13 | \ "Modified" : "✹", 14 | \ "Staged" : "✚", 15 | \ "Untracked" : "✭", 16 | \ "Renamed" : "➜", 17 | \ "Unmerged" : "═", 18 | \ "Deleted" : "✖", 19 | \ "Dirty" : "✗", 20 | \ "Clean" : "✔︎", 21 | \ 'Ignored' : '☒', 22 | \ "Unknown" : "?" 23 | \ } 24 | -------------------------------------------------------------------------------- /.config/nvim/plugin/b_ycm.vim: -------------------------------------------------------------------------------- 1 | " YCM 2 | " 如果不指定python解释器路径,ycm会自己搜索一个合适的(与编译ycm时使用的python版本匹配) 3 | " let g:ycm_server_python_interpreter = '/usr/bin/python2.7' 4 | let g:ycm_confirm_extra_conf = 0 5 | let g:ycm_error_symbol = '✗' 6 | let g:ycm_warning_symbol = '✹' 7 | let g:ycm_seed_identifiers_with_syntax = 1 8 | let g:ycm_complete_in_comments = 1 9 | let g:ycm_complete_in_strings = 1 10 | let g:ycm_collect_identifiers_from_tags_files = 1 11 | let g:ycm_semantic_triggers = { 12 | \ 'c' : ['->', '.','re![_a-zA-z0-9]'], 13 | \ 'objc' : ['->', '.', 're!\[[_a-zA-Z]+\w*\s', 're!^\s*[^\W\d]\w*\s', 14 | \ 're!\[.*\]\s'], 15 | \ 'ocaml' : ['.', '#'], 16 | \ 'cpp,objcpp' : ['->', '.', '::','re![_a-zA-Z0-9]'], 17 | \ 'perl' : ['->'], 18 | \ 'php' : ['->', '::'], 19 | \ 'cs,java,javascript,typescript,d,python,perl6,scala,vb,elixir,go' : ['.'], 20 | \ 'ruby' : ['.', '::'], 21 | \ 'lua' : ['.', ':'], 22 | \ 'erlang' : [':'], 23 | \ } 24 | nnoremap u :YcmCompleter GoToDeclaration 25 | " 已经用cpp-mode插件提供的转到函数实现的功能 26 | " nnoremap i :YcmCompleter GoToDefinition 27 | nnoremap o :YcmCompleter GoToInclude 28 | nnoremap ff :YcmCompleter FixIt 29 | nmap :YcmDiags 30 | -------------------------------------------------------------------------------- /.config/nvim/plugin/c_colorscheme.vim: -------------------------------------------------------------------------------- 1 | " serenade Settings 2 | " let g:serenade_enable_italic = 1 3 | " let g:serenade_transparent_background = 1 4 | " let g:serenade_diagnostic_text_highlight = 1 5 | " let g:serenade_diagnostic_line_highlight = 0 6 | 7 | set background=light 8 | colorscheme nord 9 | let g:lightline.colorscheme = 'nord' 10 | let g:nord_enable_italic = 1 11 | let g:nord_transparent_background = 1 12 | let g:nord_diagnostic_text_highlight = 1 13 | let g:nord_diagnostic_line_highlight = 0 14 | -------------------------------------------------------------------------------- /.config/nvim/plugin/d_filetypes.vim: -------------------------------------------------------------------------------- 1 | " Markdown 2 | let g:vimwiki_list = [{'path': '~/vimwiki/', 3 | \ 'syntax': 'markdown', 'ext': '.md'}] 4 | -------------------------------------------------------------------------------- /.config/polybar/colors: -------------------------------------------------------------------------------- 1 | ; vim:ft=dosini 2 | 3 | [color] 4 | 5 | FOREGROUND = #D8DEE9 6 | BACKGROUND = #2E3440 7 | BLACK = #3B4252 8 | RED = #BF616A 9 | GREEN = #A3BE8C 10 | YELLOW = #EBCB8B 11 | BLUE = #5E81AC 12 | MAGENTA = #B48EAD 13 | CYAN = #88C0D0 14 | WHITE = #E5E9F0 15 | ALTBLACK = #4C566A 16 | ALTRED = #BF616A 17 | ALTGREEN = #A3BE8C 18 | ALTYELLOW = #EBCB8B 19 | ALTBLUE = #81A1C1 20 | ALTMAGENTA = #B48EAD 21 | ALTCYAN = #8FBCBB 22 | ALTWHITE = #ECEFF4 23 | nord7 = #8FBCBB 24 | nord8 = #88C0D0 25 | -------------------------------------------------------------------------------- /.config/polybar/colors-gruvbox: -------------------------------------------------------------------------------- 1 | ; vim:ft=dosini 2 | 3 | [color] 4 | 5 | ;BACKGROUND = #fdf6e3 6 | ;FOREGROUND = #2E3440 7 | 8 | BACKGROUND = #282828 9 | FOREGROUND = #EBDBB2 10 | 11 | BLACK = #282828 12 | RED = #FB4934 13 | GREEN = #B8BB26 14 | YELLOW = #FABD2F 15 | BLUE = #83A598 16 | MAGENTA = #D3869B 17 | CYAN = #8EC07C 18 | WHITE = #EBDBB2 19 | ALTBLACK = #32302F 20 | ALTRED = #CC241D 21 | ALTGREEN = #98971A 22 | ALTYELLOW = #D79921 23 | ALTBLUE = #458588 24 | ALTMAGENTA = #B16286 25 | ALTCYAN = #688D6A 26 | ALTWHITE = #FBF1C7 27 | -------------------------------------------------------------------------------- /.config/polybar/colors-light: -------------------------------------------------------------------------------- 1 | ; vim:ft=dosini 2 | 3 | [color] 4 | 5 | ;BACKGROUND = #fdf6e3 6 | ;FOREGROUND = #2E3440 7 | 8 | BACKGROUND = #E5E9F0 9 | FOREGROUND = #3B4252 10 | 11 | BLACK = #2E3440 12 | RED = #FF6655 13 | GREEN = #A3BE8C 14 | YELLOW = #ECBE7B 15 | BLUE = #81A1C1 16 | MAGENTA = #C678DD 17 | CYAN = #46D9FF 18 | WHITE = #F0F4FC 19 | ALTBLACK = #2D2D2D 20 | ALTRED = #99324B 21 | ALTGREEN = #4F894C 22 | ALTYELLOW = #9A7500 23 | ALTBLUE = #3B61A8 24 | ALTMAGENTA = #97365B 25 | ALTCYAN = #398EAC 26 | ALTWHITE = #ECEFF4 27 | -------------------------------------------------------------------------------- /.config/polybar/colors-nord: -------------------------------------------------------------------------------- 1 | ; vim:ft=dosini 2 | 3 | [color] 4 | 5 | FOREGROUND = #D8DEE9 6 | BACKGROUND = #2E3440 7 | BLACK = #3B4252 8 | RED = #BF616A 9 | GREEN = #A3BE8C 10 | YELLOW = #EBCB8B 11 | BLUE = #81A1C1 12 | MAGENTA = #B48EAD 13 | CYAN = #88C0D0 14 | WHITE = #E5E9F0 15 | ALTBLACK = #4C566A 16 | ALTRED = #BF616A 17 | ALTGREEN = #A3BE8C 18 | ALTYELLOW = #EBCB8B 19 | ALTBLUE = #81A1C1 20 | ALTMAGENTA = #B48EAD 21 | ALTCYAN = #8FBCBB 22 | ALTWHITE = #ECEFF4 23 | nord7 = #8FBCBB 24 | nord8 = #88C0D0 25 | -------------------------------------------------------------------------------- /.config/polybar/colors-solar: -------------------------------------------------------------------------------- 1 | ; vim:ft=dosini 2 | 3 | [color] 4 | 5 | BACKGROUND = #fdf6e3 6 | FOREGROUND = #2E3440 7 | 8 | ;BACKGROUND = #2E3440 9 | ;FOREGROUND = #D8DEE9 10 | 11 | BLACK = #3B4252 12 | RED = #BF616A 13 | GREEN = #A3BE8C 14 | YELLOW = #EBCB8B 15 | BLUE = #81A1C1 16 | MAGENTA = #B48EAD 17 | CYAN = #88C0D0 18 | WHITE = #E5E9F0 19 | ALTBLACK = #4C566A 20 | ALTRED = #BF616A 21 | ALTGREEN = #A3BE8C 22 | ALTYELLOW = #EBCB8B 23 | ALTBLUE = #81A1C1 24 | ALTMAGENTA = #B48EAD 25 | ALTCYAN = #8FBCBB 26 | ALTWHITE = #ECEFF4 27 | -------------------------------------------------------------------------------- /.config/polybar/script/weather-bar.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #curl -sS "wttr.in/?format=%t" 3 | #curl -sS "wttr.in/38.906551,111.2222683?format="%c+%t+%h"" 4 | curl -sS "wttr.in/beijing?format="%c+%t+%h"" 5 | -------------------------------------------------------------------------------- /.config/rofi/colors-light.rasi: -------------------------------------------------------------------------------- 1 | * { 2 | background: #D8DEE9; 3 | foreground: #2E3440; 4 | selected: #81A1C1; 5 | urgent: #BF616A; 6 | on: #A3BE8C; 7 | off: #BF616A; 8 | } 9 | -------------------------------------------------------------------------------- /.config/rofi/colors-nord.rasi: -------------------------------------------------------------------------------- 1 | * { 2 | background: #2E3440; 3 | foreground: #D8DEE9; 4 | selected: #81A1C1; 5 | urgent: #BF616A; 6 | on: #A3BE8C; 7 | off: #BF616A; 8 | } 9 | -------------------------------------------------------------------------------- /.config/rofi/colors.rasi: -------------------------------------------------------------------------------- 1 | * { 2 | background: #2E3440; 3 | foreground: #D8DEE9; 4 | selected: #81A1C1; 5 | urgent: #BF616A; 6 | on: #A3BE8C; 7 | off: #BF616A; 8 | } 9 | -------------------------------------------------------------------------------- /.config/rofi/config.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | modi: "window,combi,ssh,drun"; 3 | width: 800; 4 | lines: 10; 5 | columns: 2; 6 | font: "SFNS Display 14"; 7 | show-icons: true; 8 | icon-theme: "papirus"; 9 | theme: "~/.config/rofi/light.rasi"; 10 | display-drun: "App"; 11 | } 12 | -------------------------------------------------------------------------------- /.config/spectrwm/autorun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sh ~/.fehbg 4 | setxkbmap -option "ctrl:swapcaps" 5 | xautolock -time 10 -locker '/usr/bin/betterlockscreen -l' -corners ---- -cornersize 30 & 6 | -------------------------------------------------------------------------------- /.config/spectrwm/baraction.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # baraction.sh for spectrwm status bar 3 | 4 | ## DISK 5 | hdd() { 6 | hdd="$(df -h | awk 'NR==4{print $3, $5}')" 7 | echo -e "HDD: $hdd" 8 | } 9 | 10 | ## RAM 11 | mem() { 12 | mem=`free | awk '/Mem/ {printf "%dM / %dM\n", $3 / 1024.0, $2 / 1024.0 }'` 13 | echo -e "RAM: $mem" 14 | } 15 | ## CPU 16 | cpu() { 17 | read cpu a b c previdle rest < /proc/stat 18 | prevtotal=$((a+b+c+previdle)) 19 | sleep 0.5 20 | read cpu a b c idle rest < /proc/stat 21 | total=$((a+b+c+idle)) 22 | cpu=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) )) 23 | echo -e "CPU: $cpu%" 24 | } 25 | 26 | ## VOLUME 27 | vol() { 28 | vol=`amixer get Master | awk -F'[][]' 'END{ print $4":"$2 }' | sed 's/on://g'` 29 | echo -e "VOL: $vol" 30 | } 31 | 32 | brt() { 33 | bright=`brightnessctl | awk '/brightness.+/ {print $4}' | tr -d '()'` 34 | echo -e "BRT: $bright" 35 | } 36 | 37 | bat() { 38 | power=$(cat /sys/class/power_supply/BAT0/capacity) 39 | status=$(cat /sys/class/power_supply/BAT0/status) 40 | if [ "$status" == "Charging" ]; then 41 | echo -e "$power%" 42 | elif [ "$status" == "Discharging" ]; then 43 | echo -e "$power%" 44 | elif [ "$status" == "Full" ]; then 45 | echo -e "FULL" 46 | fi 47 | } 48 | 49 | SLEEP_SEC=0.2 50 | #loops forever outputting a line every SLEEP_SEC secs 51 | 52 | # It seems that we are limited to how many characters can be displayed via 53 | # the baraction script output. And the the markup tags count in that limit. 54 | # So I would love to add more functions to this script but it makes the 55 | # echo output too long to display correctly. 56 | while :; do 57 | echo "+@fg=3; +@fn=0;$(cpu) | +@fg=4; +@fn=0;$(mem) | +@fg=2; +@fn=0;$(hdd) | +@fg=8; +@fn=0;$(bat) | +@fg=5; +@fn=0;$(brt) | +@fg=7; +@fn=0;$(vol)" 58 | sleep $SLEEP_SEC 59 | done 60 | -------------------------------------------------------------------------------- /.config/spectrwm/shot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $1 == "full" ] 4 | then 5 | scrot 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f' 6 | elif [ $1 == "clipboard" ] 7 | then 8 | scrot '/tmp/%F_%T_$wx$h.png' -e 'xclip -selection clipboard -target image/png -i $f' 9 | elif [ $1 == "delay" ] 10 | then 11 | scrot -d 5 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f' 12 | fi 13 | -------------------------------------------------------------------------------- /.config/sway/lockman.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Times the screen off and puts it to background 3 | swayidle \ 4 | timeout 5 'swaymsg "output * dpms off"' \ 5 | resume 'swaymsg "output * dpms on"' & 6 | # Locks the screen immediately 7 | swaylock -C ~/.config/swaylock/config 8 | # Kills last background task so idle timer doesn't keep running 9 | kill %% 10 | -------------------------------------------------------------------------------- /.config/sway/window.sh: -------------------------------------------------------------------------------- 1 | swaymsg -t get_tree | 2 | jq -r '.nodes[].nodes[] | if .nodes then [recurse(.nodes[])] else [] end + .floating_nodes | .[] | 3 | select(.nodes==[]) | ((.id | tostring) + "" + .name)' | 4 | wofi --show dmenu | { 5 | read -r id name 6 | swaymsg "[con_id=$id]" focus 7 | } 8 | -------------------------------------------------------------------------------- /.config/sxhkd/reset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "0" > $HOME/.config/bspwm/flag 3 | -------------------------------------------------------------------------------- /.config/waybar/.nord.css.kate-swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.config/waybar/.nord.css.kate-swp -------------------------------------------------------------------------------- /.config/waybar/scripts/mediaplayer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo '{"text": "'$(playerctl metadata title)'", "alt": "'$(playerctl status)'", "tooltip": "'$(playerctl metadata --format "{{ playerName }} : {{ artist }} - {{ title }}")'", "class": "'$(playerctl status)'" }' 4 | -------------------------------------------------------------------------------- /.config/waybar/scripts/power.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if pgrep river; then 4 | wlogout -p layer-shell 5 | else 6 | nwgbar -o 0.4 7 | fi 8 | -------------------------------------------------------------------------------- /.config/waybar/scripts/weather.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LOC="$1" 3 | # HTML encode string as %20 4 | LOCATION=$(sed -e "s/ /%20/g" <<<"$LOC") 5 | content=$(curl -sS "https://thisdavej.azurewebsites.net/api/weather/current?loc=$LOCATION°=C") 6 | ICON=$(curl -s 'https://wttr.in/?format=1' | sed 's/[+0-9a-cA-Z°]//g' ) 7 | # echo $ICON 8 | TEMP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)"' | sed 's/"//g') 9 | TOOLTIP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)\n\(.skytext)"' | sed 's/"//g') 10 | CLASS=$(echo $content | jq .skytext) 11 | echo '{"text": "'$TEMP'", "tooltip": "'$ICON $TOOLTIP $LOC'", "class": '$CLASS' }' 12 | 13 | -------------------------------------------------------------------------------- /.config/waybar/taskbar: -------------------------------------------------------------------------------- 1 | { 2 | "layer": "top", 3 | "position": "bottom", 4 | "height": 25 5 | } 6 | -------------------------------------------------------------------------------- /.config/xmobar/trayer-padding-icon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copied from https://github.com/jaor/xmobar/issues/239#issuecomment-233206552 3 | # Detects the width of running trayer-srg window (xprop name 'panel') 4 | # and creates an XPM icon of that width, 1px height, and transparent. 5 | # Outputs an -tag for use in xmobar to display the generated 6 | # XPM icon. 7 | # 8 | # Run script from xmobar: 9 | # `Run Com "/where/ever/trayer-padding-icon.sh" [] "trayerpad" 10` 10 | # and use `%trayerpad%` in your template. 11 | 12 | 13 | # Function to create a transparent Wx1 px XPM icon 14 | create_xpm_icon () { 15 | timestamp=$(date) 16 | pixels=$(for i in `seq $1`; do echo -n "."; done) 17 | 18 | cat << EOF > "$2" 19 | /* XPM * 20 | static char * trayer_pad_xpm[] = { 21 | /* This XPM icon is used for padding in xmobar to */ 22 | /* leave room for trayer-srg. It is dynamically */ 23 | /* updated by by trayer-padding-icon.sh which is run */ 24 | /* by xmobar. */ 25 | /* Created: ${timestamp} */ 26 | /* */ 27 | "$1 1 1 1", 28 | /* Colors (none: transparent) */ 29 | ". c none", 30 | /* Pixels */ 31 | "$pixels" 32 | }; 33 | EOF 34 | } 35 | 36 | # Width of the trayer window 37 | width=$(xprop -name panel | grep 'program specified minimum size' | cut -d ' ' -f 5) 38 | 39 | # Icon file name 40 | iconfile="/tmp/trayer-padding-${width}px.xpm" 41 | 42 | # If the desired icon does not exist create it 43 | if [ ! -f $iconfile ]; then 44 | create_xpm_icon $width $iconfile 45 | fi 46 | 47 | # Output the icon tag for xmobar 48 | echo "" 49 | -------------------------------------------------------------------------------- /.config/xsettingsd/xsettingsd.conf: -------------------------------------------------------------------------------- 1 | Net/ThemeName "Orchis-light" 2 | Gtk/EnableAnimations 1 3 | Gtk/DecorationLayout ":minimize,maximize,close" 4 | Gtk/PrimaryButtonWarpsSlider 0 5 | Gtk/ToolbarStyle 3 6 | Gtk/MenuImages 1 7 | Gtk/ButtonImages 1 8 | Gtk/CursorThemeSize 24 9 | Gtk/CursorThemeName "WhiteSur-cursors" 10 | Net/IconThemeName "Material-Originals-dark" 11 | Gtk/FontName "Noto Sans, 10" 12 | 13 | -------------------------------------------------------------------------------- /.config/zathura/zathurarc-light: -------------------------------------------------------------------------------- 1 | set selection-clipboard clipboard 2 | 3 | set font "JetBrains Mono 10" 4 | set default-fg "#2e3440" 5 | set default-bg "#eceff4" 6 | 7 | set completion-bg "#3b4252" 8 | set completion-fg "#eceff4" 9 | set completion-highlight-bg "#4c566a" 10 | set completion-highlight-fg "#eceff4" 11 | set completion-group-bg "#3b4252" 12 | set completion-group-fg "#88c0d0" 13 | 14 | set statusbar-fg "#2e3440" 15 | set statusbar-bg "#eceff4" 16 | set statusbar-h-padding 10 17 | set statusbar-v-padding 10 18 | 19 | set notification-bg "#eceff4" 20 | set notification-fg "#2e3440" 21 | set notification-error-bg "#eceff4" 22 | set notification-error-fg "#bf616a" 23 | set notification-warning-bg "#d8dee9" 24 | set notification-warning-fg "#ebcb8b" 25 | set selection-notification "true" 26 | 27 | set inputbar-fg "#3b4252" 28 | set inputbar-bg "#eceff4" 29 | 30 | set recolor "true" 31 | set recolor-lightcolor "#d8dee9" 32 | set recolor-darkcolor "#2e3440" 33 | 34 | set index-fg "#2e3440" 35 | set index-bg "#eceff4" 36 | set index-active-fg "#2e3440" 37 | set index-active-bg "#e5e9f0" 38 | 39 | set render-loading-bg "#eceff4" 40 | set render-loading-fg "#2e3440" 41 | 42 | set highlight-color "#88c0d0" 43 | set highlight-active-color "#5e81ac" 44 | 45 | set adjust-open "width" 46 | -------------------------------------------------------------------------------- /.config/zathura/zathurarc-nord: -------------------------------------------------------------------------------- 1 | set selection-clipboard clipboard 2 | 3 | set font "JetBrains Mono 10" 4 | set default-fg "#eceff4" 5 | set default-bg "#2e3440" 6 | 7 | set completion-bg "#3b4252" 8 | set completion-fg "#eceff4" 9 | set completion-highlight-bg "#4c566a" 10 | set completion-highlight-fg "#eceff4" 11 | set completion-group-bg "#3b4252" 12 | set completion-group-fg "#88c0d0" 13 | 14 | set statusbar-fg "#eceff4" 15 | set statusbar-bg "#3b4252" 16 | set statusbar-h-padding 10 17 | set statusbar-v-padding 10 18 | 19 | set notification-bg "#2e3440" 20 | set notification-fg "#eceff4" 21 | set notification-error-bg "#2e3440" 22 | set notification-error-fg "#bf616a" 23 | set notification-warning-bg "#2e3440" 24 | set notification-warning-fg "#ebcb8b" 25 | set selection-notification "true" 26 | 27 | set inputbar-fg "#eceff4" 28 | set inputbar-bg "#3b4252" 29 | 30 | set recolor "true" 31 | set recolor-lightcolor "#2e3440" 32 | set recolor-darkcolor "#d8dee9" 33 | 34 | set index-fg "#eceff4" 35 | set index-bg "#2e3440" 36 | set index-active-fg "#eceff4" 37 | set index-active-bg "#4c566a" 38 | 39 | set render-loading-bg "#2e3440" 40 | set render-loading-fg "#eceff4" 41 | 42 | set highlight-color "#88c0d0" 43 | set highlight-active-color "#5e81ac" 44 | 45 | set adjust-open "width" 46 | -------------------------------------------------------------------------------- /.dmenu/LICENSE: -------------------------------------------------------------------------------- 1 | MIT/X Consortium License 2 | 3 | © 2006-2019 Anselm R Garbe 4 | © 2006-2008 Sander van Dijk 5 | © 2006-2007 Michał Janeczek 6 | © 2007 Kris Maglione 7 | © 2009 Gottox 8 | © 2009 Markus Schnalke 9 | © 2009 Evan Gates 10 | © 2010-2012 Connor Lane Smith 11 | © 2014-2020 Hiltjo Posthuma 12 | © 2015-2019 Quentin Rameau 13 | 14 | Permission is hereby granted, free of charge, to any person obtaining a 15 | copy of this software and associated documentation files (the "Software"), 16 | to deal in the Software without restriction, including without limitation 17 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 18 | and/or sell copies of the Software, and to permit persons to whom the 19 | Software is furnished to do so, subject to the following conditions: 20 | 21 | The above copyright notice and this permission notice shall be included in 22 | all copies or substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 25 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 27 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 28 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 29 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 30 | DEALINGS IN THE SOFTWARE. 31 | -------------------------------------------------------------------------------- /.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 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 | 56 | uninstall: 57 | rm -f $(DESTDIR)$(PREFIX)/bin/dmenu\ 58 | $(DESTDIR)$(PREFIX)/bin/dmenu_path\ 59 | $(DESTDIR)$(PREFIX)/bin/dmenu_run\ 60 | $(DESTDIR)$(PREFIX)/bin/stest\ 61 | $(DESTDIR)$(MANPREFIX)/man1/dmenu.1\ 62 | $(DESTDIR)$(MANPREFIX)/man1/stest.1 63 | 64 | .PHONY: all options clean dist install uninstall 65 | -------------------------------------------------------------------------------- /.dmenu/README: -------------------------------------------------------------------------------- 1 | dmenu - dynamic menu 2 | ==================== 3 | dmenu is an efficient dynamic menu for X. 4 | 5 | 6 | Requirements 7 | ------------ 8 | In order to build dmenu you need the Xlib header files. 9 | 10 | 11 | Installation 12 | ------------ 13 | Edit config.mk to match your local setup (dmenu is installed into 14 | the /usr/local namespace by default). 15 | 16 | Afterwards enter the following command to build and install dmenu 17 | (if necessary as root): 18 | 19 | make clean install 20 | 21 | 22 | Running dmenu 23 | ------------- 24 | See the man page for details. 25 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.dmenu/config.def.h: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | /* Default settings; can be overriden by command line. */ 3 | 4 | static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ 5 | /* -fn option overrides fonts[0]; default X11 font or font set */ 6 | static const char *fonts[] = { 7 | "Sarasa UI SC:size=12:antialias=true:autohint=true"}; 8 | static const char *prompt = 9 | NULL; /* -p option; prompt to the left of input field */ 10 | static const char *colors[SchemeLast][2] = { 11 | /* fg bg */ 12 | [SchemeNorm] = {"#2E3440", "#ECEFF4"}, 13 | [SchemeSel] = {"#3B4252", "#88C0D0"}, 14 | [SchemeOut] = {"#000000", "#00ffff"}, 15 | }; 16 | /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ 17 | static unsigned int lines = 0; 18 | 19 | /* -h option; minimum height of a menu line */ 20 | static unsigned int lineheight = 30; 21 | static unsigned int min_lineheight = 20; 22 | 23 | /* 24 | * Characters not considered part of a word while deleting words 25 | * for example: " /?\"&[]" 26 | */ 27 | static const char worddelimiters[] = " "; 28 | -------------------------------------------------------------------------------- /.dmenu/config.def.h.orig: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | /* Default settings; can be overriden by command line. */ 3 | 4 | static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ 5 | /* -fn option overrides fonts[0]; default X11 font or font set */ 6 | static const char *fonts[] = { 7 | "Sarasa UI SC:size=10:antialias=true:autohint=true"}; 8 | static const char *prompt = 9 | NULL; /* -p option; prompt to the left of input field */ 10 | static const char *colors[SchemeLast][2] = { 11 | /* fg bg */ 12 | [SchemeNorm] = {"#2E3440", "#ECEFF4"}, 13 | [SchemeSel] = {"#3B4252", "#88C0D0"}, 14 | [SchemeOut] = {"#000000", "#00ffff"}, 15 | }; 16 | /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ 17 | static unsigned int lines = 0; 18 | 19 | /* 20 | * Characters not considered part of a word while deleting words 21 | * for example: " /?\"&[]" 22 | */ 23 | static const char worddelimiters[] = " "; 24 | -------------------------------------------------------------------------------- /.dmenu/config.def.h.rej: -------------------------------------------------------------------------------- 1 | --- config.def.h 2 | +++ config.def.h 3 | @@ -15,6 +15,9 @@ static const char *colors[SchemeLast][2] = { 4 | }; 5 | /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ 6 | static unsigned int lines = 0; 7 | +/* -h option; minimum height of a menu line */ 8 | +static unsigned int lineheight = 0; 9 | +static unsigned int min_lineheight = 8; 10 | 11 | /* 12 | * Characters not considered part of a word while deleting words 13 | -------------------------------------------------------------------------------- /.dmenu/config.h: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | /* Default settings; can be overriden by command line. */ 3 | 4 | static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ 5 | /* -fn option overrides fonts[0]; default X11 font or font set */ 6 | static const char *fonts[] = { 7 | "Sarasa UI SC:size=12:antialias=true:autohint=true"}; 8 | static const char *prompt = 9 | NULL; /* -p option; prompt to the left of input field */ 10 | static const char *colors[SchemeLast][2] = { 11 | /* fg bg */ 12 | [SchemeNorm] = {"#2E3440", "#ECEFF4"}, 13 | [SchemeSel] = {"#3B4252", "#88C0D0"}, 14 | [SchemeOut] = {"#000000", "#00ffff"}, 15 | }; 16 | /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ 17 | static unsigned int lines = 0; 18 | 19 | /* -h option; minimum height of a menu line */ 20 | static unsigned int lineheight = 30; 21 | static unsigned int min_lineheight = 20; 22 | 23 | /* 24 | * Characters not considered part of a word while deleting words 25 | * for example: " /?\"&[]" 26 | */ 27 | static const char worddelimiters[] = " "; 28 | -------------------------------------------------------------------------------- /.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) 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 | -------------------------------------------------------------------------------- /.dmenu/dmenu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dmenu/dmenu -------------------------------------------------------------------------------- /.dmenu/dmenu.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dmenu/dmenu.o -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.dmenu/dmenu_run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | dmenu_path | dmenu "$@" | ${SHELL:-"/bin/sh"} & 3 | -------------------------------------------------------------------------------- /.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 | Drawable drawable; 24 | GC gc; 25 | Clr *scheme; 26 | Fnt *fonts; 27 | } Drw; 28 | 29 | /* Drawable abstraction */ 30 | Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h); 31 | void drw_resize(Drw *drw, unsigned int w, unsigned int h); 32 | void drw_free(Drw *drw); 33 | 34 | /* Fnt abstraction */ 35 | Fnt *drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount); 36 | void drw_fontset_free(Fnt* set); 37 | unsigned int drw_fontset_getwidth(Drw *drw, const char *text); 38 | void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h); 39 | 40 | /* Colorscheme abstraction */ 41 | void drw_clr_create(Drw *drw, Clr *dest, const char *clrname); 42 | Clr *drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount); 43 | 44 | /* Cursor abstraction */ 45 | Cur *drw_cur_create(Drw *drw, int shape); 46 | void drw_cur_free(Drw *drw, Cur *cursor); 47 | 48 | /* Drawing context manipulation */ 49 | void drw_setfontset(Drw *drw, Fnt *set); 50 | void drw_setscheme(Drw *drw, Clr *scm); 51 | 52 | /* Drawing functions */ 53 | void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert); 54 | int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert); 55 | 56 | /* Map functions */ 57 | void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h); 58 | -------------------------------------------------------------------------------- /.dmenu/drw.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dmenu/drw.o -------------------------------------------------------------------------------- /.dmenu/recompile: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -f ./config.h 4 | doas make clean install 5 | -------------------------------------------------------------------------------- /.dmenu/stest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dmenu/stest -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.dmenu/stest.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dmenu/stest.o -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.dmenu/util.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dmenu/util.o -------------------------------------------------------------------------------- /.doom.d/package.el: -------------------------------------------------------------------------------- 1 | ;;; package.el -*- lexical-binding: t; -*- 2 | 3 | (package! nord-theme) 4 | -------------------------------------------------------------------------------- /.dwm-bar/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to dwm-bar 2 | One goal of this project is to support as many (reasonable) plugins as possible which the user can enable or disable depending on their needs. This means that new plugins will almost always be a welcome addition. 3 | To ensure that dwm-bar stays compatible, uniform, and efficient there are a few guidelines that should be followed. 4 | 5 | The most important part of this project is to have fun using shell scripts. I created this project to learn, and learning only happens when mistakes are made, so don't worry too much. 6 | ## Making/editing a plugin 7 | * Ensure that plugins are POSIX compliant (use ```#!/bin/sh``` instead of ```#!/bin/bash``` etc.). A good way to check this is by using [ShellCheck](https://www.shellcheck.net/) on your script and amending compatibility errors. 8 | * Display plugin output in the terminal. This is easily done by wiriting the plugin in a function and calling the function at the end of the script. This helps with debugging and spotting errors. 9 | * Include a dependencies section at the top of the script (```Dependencies: example1, example2```). 10 | ## Editing dwm_bar.sh 11 | * Do not remove functions from the main script. 12 | ## Editing README.md 13 | * When adding a plugin to README.md, follow this template: 14 | ``` 15 | ### plugin_name 16 | Description of the plugin 17 | ``` 18 | [❗ Plugin output on bar] 19 | ``` 20 | Dependencies: example1, example2 21 | ``` 22 | * Ensure additons are added to the table of contents: 23 | ``` 24 | - [Current Functions])(#current-functions) 25 | -[plugin_name](#plugin_name) 26 | ``` 27 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_alarm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_status function that displays upcoming alarms from alarm.sh 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | # Dependencies: https://github.com/joestandring/alarm 8 | 9 | dwm_alarm () { 10 | for f in /tmp/alarm.*; do 11 | if [ -e "$f" ]; then 12 | printf "%s" "$SEP1" 13 | if [ "$IDENTIFIER" = "unicode" ]; then 14 | printf "⏰ %s" "$(cat /tmp/alarm.*)" 15 | else 16 | printf "ALM %s" "$(cat /tmp/alarm.*)" 17 | fi 18 | printf "%s\n" "$SEP2" 19 | 20 | break 21 | fi 22 | done 23 | } 24 | 25 | dwm_alarm 26 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_alsa.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function to show the master volume of ALSA 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | # Dependencies: alsa-utils 8 | 9 | dwm_alsa () { 10 | STATUS=$(amixer sget Master | tail -n1 | sed -r "s/.*\[(.*)\]/\1/") 11 | VOL=$(amixer get Master | tail -n1 | sed -r "s/.*\[(.*)%\].*/\1/") 12 | printf "%s" "$SEP1" 13 | if [ "$IDENTIFIER" = "unicode" ]; then 14 | if [ "$STATUS" = "off" ]; then 15 | printf "🔇" 16 | else 17 | #removed this line becuase it may get confusing 18 | if [ "$VOL" -gt 0 ] && [ "$VOL" -le 33 ]; then 19 | printf "🔈 %s%%" "$VOL" 20 | elif [ "$VOL" -gt 33 ] && [ "$VOL" -le 66 ]; then 21 | printf "🔉 %s%%" "$VOL" 22 | else 23 | printf "🔊 %s%%" "$VOL" 24 | fi 25 | fi 26 | else 27 | if [ "$STATUS" = "off" ]; then 28 | printf "MUTE" 29 | else 30 | # removed this line because it may get confusing 31 | if [ "$VOL" -gt 0 ] && [ "$VOL" -le 33 ]; then 32 | printf "VOL %s%%" "$VOL" 33 | elif [ "$VOL" -gt 33 ] && [ "$VOL" -le 66 ]; then 34 | printf "VOL %s%%" "$VOL" 35 | else 36 | printf "VOL %s%%" "$VOL" 37 | fi 38 | fi 39 | fi 40 | printf "%s\n" "$SEP2" 41 | } 42 | 43 | dwm_alsa 44 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_backlight.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar module to display the current backlight brighness with xbacklight 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | # Dependencies: xbacklight 8 | 9 | dwm_backlight () { 10 | printf "%s☀ %.0f%s\n" "$SEP1" "$(xbacklight)" "$SEP2" 11 | } 12 | 13 | dwm_backlight 14 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_battery.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function to read the battery level and status 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | dwm_battery () { 8 | # Change BAT1 to whatever your battery is identified as. Typically BAT0 or BAT1 9 | CHARGE=$(cat /sys/class/power_supply/BAT0/capacity) 10 | STATUS=$(cat /sys/class/power_supply/BAT0/status) 11 | 12 | printf "%s" "$SEP1" 13 | if [ "$IDENTIFIER" = "unicode" ]; then 14 | if [ "$STATUS" = "Charging" ]; then 15 | printf "🔌%s%% %s" "$CHARGE" "$STATUS" 16 | else 17 | printf " %s%% %s" "$CHARGE" "$STATUS" 18 | fi 19 | else 20 | printf "BAT %s%% %s" "$CHARGE" "$STATUS" 21 | fi 22 | printf "%s\n" "$SEP2" 23 | } 24 | 25 | dwm_battery 26 | 27 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_ccurse.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function to show the closest appointment in calcurse 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | # Dependencies: calcurse 8 | 9 | dwm_ccurse () { 10 | APTSFILE="$HOME/.calcurse/apts" 11 | APPOINTMENT=$(head -n 1 "$APTSFILE" | sed -r 's/\[1\] //') 12 | 13 | if [ "$APPOINTMENT" != "" ]; then 14 | printf "%s" "$SEP1" 15 | if [ "$IDENTIFIER" = "unicode" ]; then 16 | printf "💡 %s" "$APPOINTMENT" 17 | else 18 | printf "APT %s" "$APPOINTMENT" 19 | fi 20 | printf "%s\n" "$SEP2" 21 | fi 22 | } 23 | 24 | dwm_ccurse 25 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_cmus.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function that shows the current artist, track, position, duration, and status from cmus 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | # Dependencies: cmus 8 | 9 | dwm_cmus () { 10 | if ps -C cmus > /dev/null; then 11 | ARTIST=$(cmus-remote -Q | grep -a '^tag artist' | awk '{gsub("tag artist ", "");print}') 12 | TRACK=$(cmus-remote -Q | grep -a '^tag title' | awk '{gsub("tag title ", "");print}') 13 | POSITION=$(cmus-remote -Q | grep -a '^position' | awk '{gsub("position ", "");print}') 14 | DURATION=$(cmus-remote -Q | grep -a '^duration' | awk '{gsub("duration ", "");print}') 15 | STATUS=$(cmus-remote -Q | grep -a '^status' | awk '{gsub("status ", "");print}') 16 | SHUFFLE=$(cmus-remote -Q | grep -a '^set shuffle' | awk '{gsub("set shuffle ", "");print}') 17 | 18 | if [ "$IDENTIFIER" = "unicode" ]; then 19 | if [ "$STATUS" = "playing" ]; then 20 | STATUS="▶" 21 | else 22 | STATUS="⏸" 23 | fi 24 | 25 | if [ "$SHUFFLE" = "true" ]; then 26 | SHUFFLE=" 🔀" 27 | else 28 | SHUFFLE="" 29 | fi 30 | else 31 | if [ "$STATUS" = "playing" ]; then 32 | STATUS="PLA" 33 | else 34 | STATUS="PAU" 35 | fi 36 | 37 | if [ "$SHUFFLE" = "true" ]; then 38 | SHUFFLE=" S" 39 | else 40 | SHUFFLE="" 41 | fi 42 | fi 43 | 44 | printf "%s%s %s - %s " "$SEP1" "$STATUS" "$ARTIST" "$TRACK" 45 | printf "%0d:%02d/" $((POSITION%3600/60)) $((POSITION%60)) 46 | printf "%0d:%02d" $((DURATION%3600/60)) $((DURATION%60)) 47 | printf "%s%s\n" "$SHUFFLE" "$SEP2" 48 | fi 49 | } 50 | 51 | dwm_cmus 52 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_connman.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function to show the current network connection/SSID, Wifi Strength, private IP using Connmanctl. 4 | # procrastimax 5 | # GNU GPLv3 6 | 7 | # Dependencies: connman 8 | 9 | dwm_connman () { 10 | printf "%s" "$SEP1" 11 | if [ "$IDENTIFIER" = "unicode" ]; then 12 | printf "🌐 " 13 | else 14 | printf "NET " 15 | fi 16 | 17 | # get the connmanctl service name 18 | # this is a UID starting with 'vpn_', 'wifi_', or 'ethernet_', we dont care for the vpn one 19 | # if the servicename string is empty, there is no online connection 20 | SERVICENAME=$(connmanctl services | grep -E "^\*AO|^\*O" | grep -Eo 'wifi_.*|ethernet_.*') 21 | 22 | if [ ! "$SERVICENAME" ]; then 23 | printf "OFFLINE" 24 | printf "%s\n" "$SEP2" 25 | return 26 | else 27 | STRENGTH=$(connmanctl services "$SERVICENAME" | sed -n -e 's/Strength =//p' | tr -d ' ') 28 | CONNAME=$(connmanctl services "$SERVICENAME" | sed -n -e 's/Name =//p' | tr -d ' ') 29 | IP=$(connmanctl services "$SERVICENAME" | grep 'IPv4 =' | awk '{print $5}' | sed -n -e 's/Address=//p' | tr -d ',') 30 | fi 31 | 32 | # if STRENGTH is empty, we have a wired connection 33 | if [ "$STRENGTH" ]; then 34 | printf "%s %s %s%%" "$IP" "$CONNAME" "$STRENGTH" 35 | else 36 | printf "%s %s" "$IP" "$CONNAME" 37 | fi 38 | 39 | printf "%s\n" "$SEP2" 40 | } 41 | 42 | dwm_connman 43 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_countdown.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_status function that displays the status of countdown.sh 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | # Dependencies: https://github.com/joestandring/countdown 8 | 9 | dwm_countdown () { 10 | for f in /tmp/countdown.*; do 11 | if [ -e "$f" ]; then 12 | printf "%s" "$SEP1" 13 | if [ "$IDENTIFIER" = "unicode" ]; then 14 | printf "⏳ %s" "$(tail -1 /tmp/countdown.*)" 15 | else 16 | printf "CDN %s" "$(tail -1 /tmp/countdown.*)" 17 | fi 18 | printf "%s\n" "$SEP2" 19 | 20 | break 21 | fi 22 | done 23 | } 24 | 25 | dwm_countdown 26 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_currency.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function to print the rate of CURRENCY/USD from rate.sx using rate.sx/1CURRENCY 4 | # Creator of the project: Joe Standring 5 | # Additional plugin added by Brayan de Albuquerque 6 | # GNU GPLv3 7 | 8 | # Dependencies: curl 9 | 10 | # Change the value of CURRENCY to match your currency code 11 | dwm_currency() { 12 | CURRENCY=EUR 13 | 14 | printf "%s" "$SEP1" 15 | if [ "$IDENTIFIER" = "unicode" ]; then 16 | printf "%s" "$(curl -s rate.sx/1$CURRENCY)" 17 | else 18 | printf "%s %.5s" "$CURRENCY" "$(curl -s rate.sx/1$CURRENCY)" 19 | fi 20 | printf "%s\n" "$SEP2" 21 | } 22 | 23 | dwm_currency 24 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_date.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function that shows the current date and time 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | # Date is formatted like like this: "[Mon 01-01-00 00:00:00]" 8 | dwm_date () { 9 | printf "%s" "$SEP1" 10 | if [ "$IDENTIFIER" = "unicode" ]; then 11 | printf " %s" "$(date "+%a %m-%d %T")" 12 | else 13 | printf "DAT %s" "$(date "+%a %m-%d %T")" 14 | fi 15 | printf "%s\n" "$SEP2" 16 | } 17 | 18 | dwm_date 19 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_kernel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dwm_kernel() { 4 | printf "%s" "$SEP1" 5 | version="$(uname -r)" 6 | printf " %s" "$version" 7 | printf "%s\n" "$SEP2" 8 | } 9 | 10 | dwm_kernel 11 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_keyboard.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function that displays the current keyboard layout 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | # Dependencies: xorg-setxkbmap 8 | 9 | dwm_keyboard () { 10 | printf "%s" "$SEP1" 11 | if [ "$IDENTIFIER" = "unicode" ]; then 12 | printf "⌨ %s" "$(setxkbmap -query | awk '/layout/{print $2}')" 13 | else 14 | printf "KEY %s" "$(setxkbmap -query | awk '/layout/{print $2}')" 15 | fi 16 | printf "%s\n" "$SEP2" 17 | } 18 | 19 | dwm_keyboard 20 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_loadavg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function to read the average system load 4 | # Alvar Penning 5 | # GNU GPLv3 6 | 7 | dwm_loadavg () { 8 | # LOAD_FIELDS specifies the load average values to be displayed. Values 9 | # within 1-3 are allowed, passed as a range (-) or comma-separated. 10 | # - 1: load average within the last minute 11 | # - 2: load average within the last five minutes 12 | # - 3: load average within the last fifteen minutes 13 | LOAD_FIELDS=1,2,3 14 | 15 | LOAD_AVG=$(cut -d " " -f ${LOAD_FIELDS} /proc/loadavg) 16 | 17 | printf "%s" "$SEP1" 18 | if [ "$IDENTIFIER" = "unicode" ]; then 19 | printf "⏱ %s" "$LOAD_AVG" 20 | else 21 | printf "AVG %s" "$LOAD_AVG" 22 | fi 23 | printf "%s\n" "$SEP2" 24 | } 25 | 26 | dwm_loadavg 27 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_mail.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function to display the number of emails in an inbox 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | # To count mail in an inbox, change "/path/to/inbox" below to the location of your inbox. For example, "/home/$USER/.mail/new" 8 | 9 | dwm_mail () { 10 | MAILBOX=$(ls /path/to/inbox | wc -l) 11 | 12 | printf "%s" "$SEP1" 13 | if [ "$IDENTIFIER" = "unicode" ]; then 14 | if [ "$MAILBOX" -eq 0 ]; then 15 | printf "📪 %s" "$MAILBOX" 16 | else 17 | printf "📫 %s" "$MAILBOX" 18 | fi 19 | else 20 | printf "MAI %s" "$MAILBOX" 21 | fi 22 | printf "%s\n" "$SEP2" 23 | } 24 | 25 | dwm_mail 26 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_mpc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function that shows the current artist, track, position, duration, and status from mpc 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | # Dependencies: mpc 8 | 9 | dwm_mpc () { 10 | if ps -C mpd > /dev/null; then 11 | ARTIST=$(mpc current -f %artist%) 12 | TRACK=$(mpc current -f %title%) 13 | POSITION=$(mpc status | grep "%)" | awk '{ print $3 }' | awk -F/ '{ print $1 }') 14 | DURATION=$(mpc current -f %time%) 15 | STATUS=$(mpc status | sed -n 2p | awk '{print $1;}') 16 | SHUFFLE=$(mpc status | tail -n 1 | awk '{print $6}') 17 | 18 | if [ "$IDENTIFIER" = "unicode" ]; then 19 | if [ "$STATUS" = "[playing]" ]; then 20 | STATUS="▶" 21 | else 22 | STATUS="⏸" 23 | fi 24 | 25 | if [ "$SHUFFLE" = "on" ]; then 26 | SHUFFLE=" 🔀" 27 | else 28 | SHUFFLE="" 29 | fi 30 | else 31 | if [ "$STATUS" = "[playing]" ]; then 32 | STATUS="PLA" 33 | else 34 | STATUS="PAU" 35 | fi 36 | 37 | if [ "$SHUFFLE" = "on" ]; then 38 | SHUFFLE=" S" 39 | else 40 | SHUFFLE="" 41 | fi 42 | fi 43 | 44 | printf "%s%s %s - %s %s/%s%s%s" "$SEP1" "$STATUS" "$ARTIST" "$TRACK" "$POSITION" "$DURATION" "$SHUFFLE" "$SEP2" 45 | fi 46 | } 47 | 48 | dwm_mpc 49 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_networkmanager.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function to show the current network connection/SSID, private IP, and public IP using NetworkManager 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | # Dependencies: NetworkManager, curl 8 | 9 | dwm_networkmanager () { 10 | CONNAME=$(nmcli -a | grep 'Wired connection' | awk 'NR==1{print $1}') 11 | if [ "$CONNAME" = "" ]; then 12 | CONNAME=$(nmcli -t -f active,ssid dev wifi | grep '^yes' | cut -c 5-) 13 | fi 14 | 15 | PRIVATE=$(nmcli -a | grep 'inet4 192' | awk '{print $2}') 16 | PUBLIC=$(curl -s https://ipinfo.io/ip) 17 | 18 | printf "%s" "$SEP1" 19 | if [ "$IDENTIFIER" = "unicode" ]; then 20 | printf "🌐 %s %s | %s" "$CONNAME" "$PRIVATE" "$PUBLIC" 21 | else 22 | printf "NET %s %s | %s" "$CONNAME" "$PRIVATE" "$PUBLIC" 23 | fi 24 | printf "%s\n" "$SEP2" 25 | } 26 | 27 | dwm_networkmanager 28 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_pulse.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function to show the master volume of PulseAudio 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | # Dependencies: pamixer 8 | 9 | dwm_pulse () { 10 | VOL=$(pamixer --get-volume) 11 | 12 | printf "%s" "$SEP1" 13 | if [ "$IDENTIFIER" = "unicode" ]; then 14 | if [ "$VOL" = "muted" ] || [ "$VOL" -eq 0 ]; then 15 | printf "🔇" 16 | elif [ "$VOL" -gt 0 ] && [ "$VOL" -le 33 ]; then 17 | printf " %s%%" "$VOL" 18 | elif [ "$VOL" -gt 33 ] && [ "$VOL" -le 66 ]; then 19 | printf " %s%%" "$VOL" 20 | else 21 | printf " %s%%" "$VOL" 22 | fi 23 | else 24 | if [ "$VOL" = "muted" ] || [ "$VOL" -eq 0 ]; then 25 | printf "MUTE" 26 | elif [ "$VOL" -gt 0 ] && [ "$VOL" -le 33 ]; then 27 | printf "VOL %s%%" "$VOL" 28 | elif [ "$VOL" -gt 33 ] && [ "$VOL" -le 66 ]; then 29 | printf "VOL %s%%" "$VOL" 30 | else 31 | printf "VOL %s%%" "$VOL" 32 | fi 33 | fi 34 | printf "%s\n" "$SEP2" 35 | } 36 | 37 | dwm_pulse 38 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function to display information regarding system memory, CPU temperature, and storage 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | df_check_location='/home' 8 | 9 | dwm_resources () { 10 | # get all the infos first to avoid high resources usage 11 | free_output=$(free -h | grep Mem) 12 | df_output=$(df -h $df_check_location | tail -n 1) 13 | # Used and total memory 14 | MEMUSED=$(echo $free_output | awk '{print $3}') 15 | MEMTOT=$(echo $free_output | awk '{print $2}') 16 | # CPU temperature 17 | CPU=$(top -bn1 | grep Cpu | awk '{print $2}')% 18 | #CPU=$(sysctl -n hw.sensors.cpu0.temp0 | cut -d. -f1) 19 | # Used and total storage in /home (rounded to 1024B) 20 | STOUSED=$(echo $df_output | awk '{print $3}') 21 | STOTOT=$(echo $df_output | awk '{print $2}') 22 | STOPER=$(echo $df_output | awk '{print $5}') 23 | 24 | printf "%s" "$SEP1" 25 | if [ "$IDENTIFIER" = "unicode" ]; then 26 | printf " %s/%s  %s  %s/%s: %s" "$MEMUSED" "$MEMTOT" "$CPU" "$STOUSED" "$STOTOT" "$STOPER" 27 | else 28 | printf "STA | MEM %s/%s CPU %s STO %s/%s: %s" "$MEMUSED" "$MEMTOT" "$CPU" "$STOUSED" "$STOTOT" "$STOPER" 29 | fi 30 | printf "%s\n" "$SEP2" 31 | } 32 | 33 | dwm_resources 34 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_solar_panel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This module can get data from a SMA Inverter. 3 | # Its purpose is to show you how much Watts are being produced 4 | # To make it work change the INVERTER_IP variable and your User password 5 | # Vincenzo Petrolo 6 | # For infos on how i made it, and help or bugs, you cant contact me or 7 | # open an issue 8 | # GNU GPLv3 9 | 10 | # P.s: Be careful when trying to modify urls, as they contains special 11 | # characters that may change the behaviour of the query 12 | 13 | dwm_solar_panel () { 14 | 15 | INVERTER_IP="YOUR INVERTER IP" 16 | PASSWORD="YOUR PASSWORD" 17 | 18 | 19 | if [[ -f ~/.cache/solar_panel.cache ]]; 20 | then 21 | read SID < ~/.cache/solar_panel.cache 22 | if [ "$SID" == "null" ]; 23 | then 24 | #Getting session id 25 | SID=$( curl -s --location --request POST "http://$INVERTER_IP/dyn/login.json" \ 26 | --header 'Content-Type: text/plain' \ 27 | --data-raw "{\"right\":\"usr\",\"pass\":\""$PASSWORD\""}" | jq .result.sid) 28 | SID=${SID//\"} 29 | fi 30 | #checks if it got a session token 31 | 32 | if [ "$SID" != "" ] && [ "$SID" != "null" ]; 33 | then 34 | echo $SID > ~/.cache/solar_panel.cache 35 | WATTS=$(curl -s --location --request POST "http://$INVERTER_IP/dyn/getValues.json?sid=$SID" \ 36 | --header 'Content-Type: text/plain' \ 37 | --data-raw '{"destDev":[],"keys":["6100_00543100","6800_008AA200","6100_40263F00","6800_00832A00","6180_08214800","6180_08414900","6180_08522F00","6400_00543A00","6400_00260100","6800_08811F00","6400_00462E00"]}' | jq '.result."0156-76BC3EC6"."6100_40263F00"."1"[0].val') 38 | 39 | if [ "$WATTS" == "" ] || [ "$WATTS" == "null" ]; 40 | then 41 | echo "null" > ~/.cache/solar_panel.cache 42 | else 43 | printf "%s💡 $WATTS W %s" "$SEP1" "$SEP2" 44 | fi 45 | 46 | fi 47 | else 48 | touch ~/.cache/solar_panel.cache 49 | 50 | echo "null" > ~/.cache/solar_panel.cache 51 | fi 52 | 53 | } 54 | dwm_solar_panel 55 | 56 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_transmission.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function to show the status of a torrent woth transmission-remote 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | # Dependencies: transmission-remote 8 | 9 | dwm_transmission () { 10 | TORRENT=$(transmission-remote -l | sed '2q;d' | sed 's/\(.\) /\1/g') 11 | ID=$(printf "%s" "$TORRENT" | awk '{print $1;}') 12 | STATUS=$(printf "%s" "$TORRENT" | awk '{print $8;}') 13 | ETA=$(printf "%s" "$TORRENT" | awk '{print $4;}') 14 | NAME=$(printf "%s" "$TORRENT" | awk '{for(i=9;i<=NF;++i)print $i}' | tr -d "\n" | head -c 20; printf "...") 15 | DONE=$(printf "%s" "$TORRENT" | awk '{print $2;}') 16 | UP=$(printf "%s" "$TORRENT" | awk '{print $5;}') 17 | DOWN=$(printf "%s" "$TORRENT" | awk '{print $5;}') 18 | 19 | if [ "$ID" != "Sum:" ]; then 20 | printf "%s" "$SEP1" 21 | if [ "$IDENTIFIER" = "unicode" ]; then 22 | case "$STATUS" in 23 | "Idle") 24 | printf "🛑 %s | %s %s ⬆%s ⬇%s" "$NAME" "$DONE" "$ETA" "$UP" "$DOWN" 25 | ;; 26 | "Seeding") 27 | printf "🌱 %s | ⬆%s ⬇%s" "$NAME" "$UP" "$DOWN" 28 | ;; 29 | "Downloading") 30 | printf "⏬ %s | %s %s ⬆%s ⬇%s" "$NAME" "$DONE" "$ETA" "$UP" "$DOWN" 31 | ;; 32 | esac 33 | else 34 | case "$STATUS" in 35 | "Idle") 36 | printf "IDLE %s | %s %s ⬆%s ⬇%s" "$NAME" "$DONE" "$ETA" "$UP" "$DOWN" 37 | ;; 38 | "Seeding") 39 | printf "SEEDING %s | ⬆%s ⬇%s" "$NAME" "$UP" "$DOWN" 40 | ;; 41 | "Downloading") 42 | printf "DOWNLOADING %s | %s %s ⬆%s ⬇%s" "$NAME" "$DONE" "$ETA" "$UP" "$DOWN" 43 | ;; 44 | esac 45 | fi 46 | printf "%s\n" "$SEP2" 47 | fi 48 | } 49 | 50 | dwm_transmission 51 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_upt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dwm_upt() { 4 | printf "%s" "$SEP1" 5 | upt="$(uptime --pretty | sed -e 's/up //g' -e 's/ days/d/g' -e 's/ day/d/g' -e 's/ hours/h/g' -e 's/ hour/h/g' -e 's/ minutes/m/g' -e 's/, / /g')" 6 | # echo -e " $upt " 7 | printf " %s" "$upt" 8 | printf "%s\n" "$SEP2" 9 | } 10 | 11 | dwm_upt 12 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_vpn.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function to show VPN connections with OpenVPN or WireGuard (if any are active) 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | # Dependencies: NetworkManager, NetworkManager-openvpn (for OpenVPN connections) 8 | 9 | dwm_vpn () { 10 | VPN=$(nmcli -a | grep 'VPN connection' | sed -e 's/\( VPN connection\)*$//g') 11 | 12 | if [ "$VPN" = "" ]; then 13 | VPN=$(nmcli connection | grep 'wireguard' | sed 's/\s.*$//') 14 | fi 15 | 16 | if [ "$VPN" != "" ]; then 17 | printf "%s" "$SEP1" 18 | if [ "$IDENTIFIER" = "unicode" ]; then 19 | printf "🔒 %s" "$VPN" 20 | else 21 | printf "VPN %s" "$VPN" 22 | fi 23 | printf "%s\n" "$SEP2" 24 | fi 25 | } 26 | 27 | 28 | dwm_vpn 29 | -------------------------------------------------------------------------------- /.dwm-bar/bar-functions/dwm_weather.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dwm_bar function to print the weather from wttr.in 4 | # Joe Standring 5 | # GNU GPLv3 6 | 7 | # Dependencies: curl 8 | 9 | # Change the value of LOCATION to match your city 10 | dwm_weather() { 11 | LOCATION=baode 12 | 13 | printf "%s" "$SEP1" 14 | if [ "$IDENTIFIER" = "unicode" ]; then 15 | printf "%s" "$(curl -s wttr.in/$LOCATION?format=1)" 16 | else 17 | printf "WEA %s" "$(curl -s wttr.in/$LOCATION?format="%c+%t+%h")" 18 | fi 19 | printf "%s\n" "$SEP2" 20 | } 21 | 22 | dwm_weather 23 | -------------------------------------------------------------------------------- /.dwm-with-polybar/IPCClient.c: -------------------------------------------------------------------------------- 1 | #include "IPCClient.h" 2 | 3 | #include 4 | #include 5 | 6 | #include "util.h" 7 | 8 | IPCClient * 9 | ipc_client_new(int fd) 10 | { 11 | IPCClient *c = (IPCClient *)malloc(sizeof(IPCClient)); 12 | 13 | if (c == NULL) return NULL; 14 | 15 | // Initialize struct 16 | memset(&c->event, 0, sizeof(struct epoll_event)); 17 | 18 | c->buffer_size = 0; 19 | c->buffer = NULL; 20 | c->fd = fd; 21 | c->event.data.fd = fd; 22 | c->next = NULL; 23 | c->prev = NULL; 24 | c->subscriptions = 0; 25 | 26 | return c; 27 | } 28 | 29 | void 30 | ipc_list_add_client(IPCClientList *list, IPCClient *nc) 31 | { 32 | DEBUG("Adding client with fd %d to list\n", nc->fd); 33 | 34 | if (*list == NULL) { 35 | // List is empty, point list at first client 36 | *list = nc; 37 | } else { 38 | IPCClient *c; 39 | // Go to last client in list 40 | for (c = *list; c && c->next; c = c->next) 41 | ; 42 | c->next = nc; 43 | nc->prev = c; 44 | } 45 | } 46 | 47 | void 48 | ipc_list_remove_client(IPCClientList *list, IPCClient *c) 49 | { 50 | IPCClient *cprev = c->prev; 51 | IPCClient *cnext = c->next; 52 | 53 | if (cprev != NULL) cprev->next = c->next; 54 | if (cnext != NULL) cnext->prev = c->prev; 55 | if (c == *list) *list = c->next; 56 | } 57 | 58 | IPCClient * 59 | ipc_list_get_client(IPCClientList list, int fd) 60 | { 61 | for (IPCClient *c = list; c; c = c->next) { 62 | if (c->fd == fd) return c; 63 | } 64 | 65 | return NULL; 66 | } 67 | -------------------------------------------------------------------------------- /.dwm-with-polybar/IPCClient.h: -------------------------------------------------------------------------------- 1 | #ifndef IPC_CLIENT_H_ 2 | #define IPC_CLIENT_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | typedef struct IPCClient IPCClient; 9 | /** 10 | * This structure contains the details of an IPC Client and pointers for a 11 | * linked list 12 | */ 13 | struct IPCClient { 14 | int fd; 15 | int subscriptions; 16 | 17 | char *buffer; 18 | uint32_t buffer_size; 19 | 20 | struct epoll_event event; 21 | IPCClient *next; 22 | IPCClient *prev; 23 | }; 24 | 25 | typedef IPCClient *IPCClientList; 26 | 27 | /** 28 | * Allocate memory for new IPCClient with the specified file descriptor and 29 | * initialize struct. 30 | * 31 | * @param fd File descriptor of IPC client 32 | * 33 | * @return Address to allocated IPCClient struct 34 | */ 35 | IPCClient *ipc_client_new(int fd); 36 | 37 | /** 38 | * Add an IPC Client to the specified list 39 | * 40 | * @param list Address of the list to add the client to 41 | * @param nc Address of the IPCClient 42 | */ 43 | void ipc_list_add_client(IPCClientList *list, IPCClient *nc); 44 | 45 | /** 46 | * Remove an IPCClient from the specified list 47 | * 48 | * @param list Address of the list to remove the client from 49 | * @param c Address of the IPCClient 50 | */ 51 | void ipc_list_remove_client(IPCClientList *list, IPCClient *c); 52 | 53 | /** 54 | * Get an IPCClient from the specified IPCClient list 55 | * 56 | * @param list List to remove the client from 57 | * @param fd File descriptor of the IPCClient 58 | */ 59 | IPCClient *ipc_list_get_client(IPCClientList list, int fd); 60 | 61 | #endif // IPC_CLIENT_H_ 62 | -------------------------------------------------------------------------------- /.dwm-with-polybar/Makefile: -------------------------------------------------------------------------------- 1 | # dwm - dynamic window manager 2 | # See LICENSE file for copyright and license details. 3 | 4 | include config.mk 5 | 6 | SRC = drw.c dwm.c util.c 7 | OBJ = ${SRC:.c=.o} 8 | 9 | all: options dwm dwm-msg 10 | 11 | options: 12 | @echo dwm build options: 13 | @echo "CFLAGS = ${CFLAGS}" 14 | @echo "LDFLAGS = ${LDFLAGS}" 15 | @echo "CC = ${CC}" 16 | 17 | .c.o: 18 | ${CC} -c ${CFLAGS} $< 19 | 20 | ${OBJ}: config.h config.mk 21 | 22 | config.h: 23 | cp config.def.h $@ 24 | 25 | dwm: ${OBJ} 26 | ${CC} -o $@ ${OBJ} ${LDFLAGS} 27 | 28 | dwm-msg: dwm-msg.o 29 | ${CC} -o $@ $< ${LDFLAGS} 30 | 31 | clean: 32 | rm -f dwm dwm-msg ${OBJ} dwm-${VERSION}.tar.gz 33 | 34 | dist: clean 35 | mkdir -p dwm-${VERSION} 36 | cp -R LICENSE Makefile README config.def.h config.mk\ 37 | dwm.1 drw.h util.h ${SRC} dwm.png transient.c dwm-${VERSION} 38 | tar -cf dwm-${VERSION}.tar dwm-${VERSION} 39 | gzip dwm-${VERSION}.tar 40 | rm -rf dwm-${VERSION} 41 | 42 | install: all 43 | mkdir -p ${DESTDIR}${PREFIX}/bin 44 | cp -f dwm dwm-msg ${DESTDIR}${PREFIX}/bin 45 | chmod 755 ${DESTDIR}${PREFIX}/bin/dwm 46 | chmod 755 ${DESTDIR}${PREFIX}/bin/dwm-msg 47 | mkdir -p ${DESTDIR}${MANPREFIX}/man1 48 | sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1 49 | chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1 50 | 51 | uninstall: 52 | rm -f ${DESTDIR}${PREFIX}/bin/dwm\ 53 | ${DESTDIR}${MANPREFIX}/man1/dwm.1 54 | 55 | .PHONY: all options clean dist install uninstall 56 | -------------------------------------------------------------------------------- /.dwm-with-polybar/autostart.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sh ~/.fehbg 4 | 5 | arr=("dwmbar" "xfce4-power-manager" "copyq" "fcitx5" "dunst" "xdman" "clipmenud" "qv2ray" "redshift-gtk" "mpd" "picom") 6 | 7 | for value in ${arr[@]} 8 | do 9 | isExist=`ps -ef | grep "$value" | grep -v grep | wc -l` 10 | if [ $isExist = 0 ] 11 | then 12 | exec "$value" & 13 | fi 14 | done 15 | -------------------------------------------------------------------------------- /.dwm-with-polybar/config.def.h.rej: -------------------------------------------------------------------------------- 1 | --- config.def.h 2 | +++ config.def.h 3 | @@ -5,6 +5,10 @@ static const unsigned int borderpx = 1; /* border pixel of windows */ 4 | static const unsigned int snap = 32; /* snap pixel */ 5 | static const int showbar = 1; /* 0 means no bar */ 6 | static const int topbar = 1; /* 0 means bottom bar */ 7 | +static const int usealtbar = 1; /* 1 means use non-dwm status bar */ 8 | +static const char *altbarclass = "Polybar"; /* Alternate bar class name */ 9 | +static const char *alttrayname = "tray"; /* Polybar tray instance name */ 10 | +static const char *altbarcmd = "$HOME/bar.sh"; /* Alternate bar launch command */ 11 | static const char *fonts[] = { "monospace:size=10" }; 12 | static const char dmenufont[] = "monospace:size=10"; 13 | static const char col_gray1[] = "#222222"; 14 | -------------------------------------------------------------------------------- /.dwm-with-polybar/config.mk: -------------------------------------------------------------------------------- 1 | # dwm version 2 | VERSION = 6.2 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 | # OpenBSD (uncomment) 21 | #FREETYPEINC = ${X11INC}/freetype2 22 | 23 | # yajl 24 | YAJLLIBS = -lyajl 25 | YAJLINC = /usr/include/yajl 26 | 27 | # includes and libs 28 | INCS = -I${X11INC} -I${FREETYPEINC} -I${YAJLINC} 29 | LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} ${YAJLLIBS} 30 | 31 | # flags 32 | CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} 33 | #CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS} 34 | CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS} 35 | LDFLAGS = ${LIBS} 36 | 37 | # Solaris 38 | #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" 39 | #LDFLAGS = ${LIBS} 40 | 41 | # compiler and linker 42 | CC = cc 43 | -------------------------------------------------------------------------------- /.dwm-with-polybar/config.mk.orig: -------------------------------------------------------------------------------- 1 | # dwm version 2 | VERSION = 6.2 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 | # OpenBSD (uncomment) 21 | #FREETYPEINC = ${X11INC}/freetype2 22 | 23 | # includes and libs 24 | INCS = -I${X11INC} -I${FREETYPEINC} 25 | LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} 26 | 27 | # flags 28 | CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} 29 | #CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS} 30 | CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS} 31 | LDFLAGS = ${LIBS} 32 | 33 | # Solaris 34 | #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" 35 | #LDFLAGS = ${LIBS} 36 | 37 | # compiler and linker 38 | CC = cc 39 | -------------------------------------------------------------------------------- /.dwm-with-polybar/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, ColBorder }; /* 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 | Drawable drawable; 24 | GC gc; 25 | Clr *scheme; 26 | Fnt *fonts; 27 | } Drw; 28 | 29 | /* Drawable abstraction */ 30 | Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h); 31 | void drw_resize(Drw *drw, unsigned int w, unsigned int h); 32 | void drw_free(Drw *drw); 33 | 34 | /* Fnt abstraction */ 35 | Fnt *drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount); 36 | void drw_fontset_free(Fnt* set); 37 | unsigned int drw_fontset_getwidth(Drw *drw, const char *text); 38 | void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h); 39 | 40 | /* Colorscheme abstraction */ 41 | void drw_clr_create(Drw *drw, Clr *dest, const char *clrname); 42 | Clr *drw_scm_create(Drw *drw, char *clrnames[], size_t clrcount); 43 | 44 | /* Cursor abstraction */ 45 | Cur *drw_cur_create(Drw *drw, int shape); 46 | void drw_cur_free(Drw *drw, Cur *cursor); 47 | 48 | /* Drawing context manipulation */ 49 | void drw_setfontset(Drw *drw, Fnt *set); 50 | void drw_setscheme(Drw *drw, Clr *scm); 51 | 52 | /* Drawing functions */ 53 | void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert); 54 | int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert); 55 | 56 | /* Map functions */ 57 | void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h); 58 | -------------------------------------------------------------------------------- /.dwm-with-polybar/drw.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dwm-with-polybar/drw.o -------------------------------------------------------------------------------- /.dwm-with-polybar/dwm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dwm-with-polybar/dwm -------------------------------------------------------------------------------- /.dwm-with-polybar/dwm-msg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dwm-with-polybar/dwm-msg -------------------------------------------------------------------------------- /.dwm-with-polybar/dwm-msg.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dwm-with-polybar/dwm-msg.o -------------------------------------------------------------------------------- /.dwm-with-polybar/dwm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dwm-with-polybar/dwm.o -------------------------------------------------------------------------------- /.dwm-with-polybar/dwm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dwm-with-polybar/dwm.png -------------------------------------------------------------------------------- /.dwm-with-polybar/layouts.c: -------------------------------------------------------------------------------- 1 | void 2 | grid(Monitor *m) { 3 | unsigned int i, n, cx, cy, cw, ch, aw, ah, cols, rows; 4 | Client *c; 5 | 6 | for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next)) 7 | n++; 8 | 9 | /* grid dimensions */ 10 | for(rows = 0; rows <= n/2; rows++) 11 | if(rows*rows >= n) 12 | break; 13 | cols = (rows && (rows - 1) * rows >= n) ? rows - 1 : rows; 14 | 15 | /* window geoms (cell height/width) */ 16 | ch = m->wh / (rows ? rows : 1); 17 | cw = m->ww / (cols ? cols : 1); 18 | for(i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next)) { 19 | cx = m->wx + (i / rows) * cw; 20 | cy = m->wy + (i % rows) * ch; 21 | /* adjust height/width of last row/column's windows */ 22 | ah = ((i + 1) % rows == 0) ? m->wh - ch * rows : 0; 23 | aw = (i >= rows * (cols - 1)) ? m->ww - cw * cols : 0; 24 | resize(c, cx, cy, cw - 2 * c->bw + aw, ch - 2 * c->bw + ah, False); 25 | i++; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /.dwm-with-polybar/patches/dwm-focusmaster-20200717-bb2e722.diff: -------------------------------------------------------------------------------- 1 | From 3e020d93df3aaec92d2daa142cd1f0d5301b3197 Mon Sep 17 00:00:00 2001 2 | From: Mateus Auler 3 | Date: Fri, 17 Jul 2020 12:36:36 -0300 4 | Subject: [PATCH] Ability to map a key combination to switch focus to 5 | the master window. 6 | 7 | --- 8 | dwm.c | 16 ++++++++++++++++ 9 | 1 file changed, 16 insertions(+) 10 | 11 | diff --git a/dwm.c b/dwm.c 12 | index 9fd0286..be01927 100644 13 | --- a/dwm.c 14 | +++ b/dwm.c 15 | @@ -235,6 +235,8 @@ static int xerrordummy(Display *dpy, XErrorEvent *ee); 16 | static int xerrorstart(Display *dpy, XErrorEvent *ee); 17 | static void zoom(const Arg *arg); 18 | 19 | +static void focusmaster(const Arg *arg); 20 | + 21 | /* variables */ 22 | static const char broken[] = "broken"; 23 | static char stext[256]; 24 | @@ -2150,3 +2152,17 @@ main(int argc, char *argv[]) 25 | XCloseDisplay(dpy); 26 | return EXIT_SUCCESS; 27 | } 28 | + 29 | +void 30 | +focusmaster(const Arg *arg) 31 | +{ 32 | + Client *c; 33 | + 34 | + if (selmon->nmaster < 1) 35 | + return; 36 | + 37 | + c = nexttiled(selmon->clients); 38 | + 39 | + if (c) 40 | + focus(c); 41 | +} 42 | -- 43 | 2.27.0 44 | 45 | -------------------------------------------------------------------------------- /.dwm-with-polybar/patches/dwm-focusonnetactive-6.2.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 | -------------------------------------------------------------------------------- /.dwm-with-polybar/recompile: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -f ./config.h 4 | doas make clean install 5 | -------------------------------------------------------------------------------- /.dwm-with-polybar/tcl.c: -------------------------------------------------------------------------------- 1 | void 2 | tcl(Monitor * m) 3 | { 4 | int x, y, h, w, mw, sw, bdw; 5 | unsigned int i, n; 6 | Client * c; 7 | 8 | for (n = 0, c = nexttiled(m->clients); c; 9 | c = nexttiled(c->next), n++); 10 | 11 | if (n == 0) 12 | return; 13 | 14 | c = nexttiled(m->clients); 15 | 16 | mw = m->mfact * m->ww; 17 | sw = (m->ww - mw) / 2; 18 | bdw = (2 * c->bw); 19 | resize(c, 20 | n < 3 ? m->wx : m->wx + sw, 21 | m->wy, 22 | n == 1 ? m->ww - bdw : mw - bdw, 23 | m->wh - bdw, 24 | False); 25 | 26 | if (--n == 0) 27 | return; 28 | 29 | w = (m->ww - mw) / ((n > 1) + 1); 30 | c = nexttiled(c->next); 31 | 32 | if (n > 1) 33 | { 34 | x = m->wx + ((n > 1) ? mw + sw : mw); 35 | y = m->wy; 36 | h = m->wh / (n / 2); 37 | 38 | if (h < bh) 39 | h = m->wh; 40 | 41 | for (i = 0; c && i < n / 2; c = nexttiled(c->next), i++) 42 | { 43 | resize(c, 44 | x, 45 | y, 46 | w - bdw, 47 | (i + 1 == n / 2) ? m->wy + m->wh - y - bdw : h - bdw, 48 | False); 49 | 50 | if (h != m->wh) 51 | y = c->y + HEIGHT(c); 52 | } 53 | } 54 | 55 | x = (n + 1 / 2) == 1 ? mw : m->wx; 56 | y = m->wy; 57 | h = m->wh / ((n + 1) / 2); 58 | 59 | if (h < bh) 60 | h = m->wh; 61 | 62 | for (i = 0; c; c = nexttiled(c->next), i++) 63 | { 64 | resize(c, 65 | x, 66 | y, 67 | (i + 1 == (n + 1) / 2) ? w - bdw : w - bdw, 68 | (i + 1 == (n + 1) / 2) ? m->wy + m->wh - y - bdw : h - bdw, 69 | False); 70 | 71 | if (h != m->wh) 72 | y = c->y + HEIGHT(c); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /.dwm-with-polybar/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 | -------------------------------------------------------------------------------- /.dwm-with-polybar/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 | #ifdef _DEBUG 8 | #define DEBUG(...) fprintf(stderr, __VA_ARGS__) 9 | #else 10 | #define DEBUG(...) 11 | #endif 12 | 13 | void die(const char *fmt, ...); 14 | void *ecalloc(size_t nmemb, size_t size); 15 | int normalizepath(const char *path, char **normal); 16 | int mkdirp(const char *path); 17 | int parentdir(const char *path, char **parent); 18 | int nullterminate(char **str, size_t *len); 19 | -------------------------------------------------------------------------------- /.dwm-with-polybar/util.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dwm-with-polybar/util.o -------------------------------------------------------------------------------- /.dwm/Makefile: -------------------------------------------------------------------------------- 1 | # dwm - dynamic window manager 2 | # See LICENSE file for copyright and license details. 3 | 4 | include config.mk 5 | 6 | SRC = drw.c dwm.c util.c 7 | OBJ = ${SRC:.c=.o} 8 | 9 | all: options dwm 10 | 11 | options: 12 | @echo dwm build options: 13 | @echo "CFLAGS = ${CFLAGS}" 14 | @echo "LDFLAGS = ${LDFLAGS}" 15 | @echo "CC = ${CC}" 16 | 17 | .c.o: 18 | ${CC} -c ${CFLAGS} $< 19 | 20 | ${OBJ}: config.h config.mk 21 | 22 | config.h: 23 | cp config.def.h $@ 24 | 25 | dwm: ${OBJ} 26 | ${CC} -o $@ ${OBJ} ${LDFLAGS} 27 | 28 | clean: 29 | rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz 30 | 31 | dist: clean 32 | mkdir -p dwm-${VERSION} 33 | cp -R LICENSE Makefile README config.def.h config.mk\ 34 | dwm.1 drw.h util.h ${SRC} dwm.png transient.c dwm-${VERSION} 35 | tar -cf dwm-${VERSION}.tar dwm-${VERSION} 36 | gzip dwm-${VERSION}.tar 37 | rm -rf dwm-${VERSION} 38 | 39 | install: all 40 | mkdir -p ${DESTDIR}${PREFIX}/bin 41 | cp -f dwm ${DESTDIR}${PREFIX}/bin 42 | chmod 755 ${DESTDIR}${PREFIX}/bin/dwm 43 | mkdir -p ${DESTDIR}${MANPREFIX}/man1 44 | sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1 45 | chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1 46 | 47 | uninstall: 48 | rm -f ${DESTDIR}${PREFIX}/bin/dwm\ 49 | ${DESTDIR}${MANPREFIX}/man1/dwm.1 50 | 51 | .PHONY: all options clean dist install uninstall 52 | -------------------------------------------------------------------------------- /.dwm/autostart.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sh ~/.fehbg 4 | 5 | arr=("dwmbar" "xfce4-power-manager" "copyq" "fcitx5" "dunst" "xdman" "clipmenud" "qv2ray" "redshift-gtk" "mpd" "picom") 6 | 7 | for value in ${arr[@]} 8 | do 9 | isExist=`ps -ef | grep "$value" | grep -v grep | wc -l` 10 | if [ $isExist = 0 ] 11 | then 12 | exec "$value" & 13 | fi 14 | done 15 | -------------------------------------------------------------------------------- /.dwm/config.def.h.rej: -------------------------------------------------------------------------------- 1 | --- config.def.h 2 | +++ config.def.h 3 | @@ -41,6 +41,8 @@ static const Layout layouts[] = { 4 | { "[]=", tile }, /* first entry is default */ 5 | { "><>", NULL }, /* no layout function means floating behavior */ 6 | { "[M]", monocle }, 7 | + { "TTT", bstack }, 8 | + { "===", bstackhoriz }, 9 | }; 10 | 11 | /* key definitions */ 12 | @@ -76,6 +78,8 @@ static Key keys[] = { 13 | { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, 14 | { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, 15 | { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, 16 | + { MODKEY, XK_u, setlayout, {.v = &layouts[3]} }, 17 | + { MODKEY, XK_o, setlayout, {.v = &layouts[4]} }, 18 | { MODKEY, XK_space, setlayout, {0} }, 19 | { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, 20 | { MODKEY, XK_0, view, {.ui = ~0 } }, 21 | -------------------------------------------------------------------------------- /.dwm/config.mk: -------------------------------------------------------------------------------- 1 | # dwm version 2 | VERSION = 6.2 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 | # OpenBSD (uncomment) 21 | #FREETYPEINC = ${X11INC}/freetype2 22 | 23 | # includes and libs 24 | INCS = -I${X11INC} -I${FREETYPEINC} 25 | LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} 26 | 27 | # flags 28 | CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} 29 | #CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS} 30 | CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS} 31 | LDFLAGS = ${LIBS} 32 | 33 | # Solaris 34 | #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" 35 | #LDFLAGS = ${LIBS} 36 | 37 | # compiler and linker 38 | CC = cc 39 | -------------------------------------------------------------------------------- /.dwm/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, ColBorder }; /* 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 | Drawable drawable; 24 | GC gc; 25 | Clr *scheme; 26 | Fnt *fonts; 27 | } Drw; 28 | 29 | /* Drawable abstraction */ 30 | Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h); 31 | void drw_resize(Drw *drw, unsigned int w, unsigned int h); 32 | void drw_free(Drw *drw); 33 | 34 | /* Fnt abstraction */ 35 | Fnt *drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount); 36 | void drw_fontset_free(Fnt* set); 37 | unsigned int drw_fontset_getwidth(Drw *drw, const char *text); 38 | void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h); 39 | 40 | /* Colorscheme abstraction */ 41 | void drw_clr_create(Drw *drw, Clr *dest, const char *clrname); 42 | Clr *drw_scm_create(Drw *drw, char *clrnames[], size_t clrcount); 43 | 44 | /* Cursor abstraction */ 45 | Cur *drw_cur_create(Drw *drw, int shape); 46 | void drw_cur_free(Drw *drw, Cur *cursor); 47 | 48 | /* Drawing context manipulation */ 49 | void drw_setfontset(Drw *drw, Fnt *set); 50 | void drw_setscheme(Drw *drw, Clr *scm); 51 | 52 | /* Drawing functions */ 53 | void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert); 54 | int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert); 55 | 56 | /* Map functions */ 57 | void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h); 58 | -------------------------------------------------------------------------------- /.dwm/drw.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dwm/drw.o -------------------------------------------------------------------------------- /.dwm/dwm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dwm/dwm -------------------------------------------------------------------------------- /.dwm/dwm.c.rej: -------------------------------------------------------------------------------- 1 | --- dwm.c 2 | +++ dwm.c 3 | @@ -1169,6 +1175,22 @@ loadxrdb() 4 | XRDB_LOAD_COLOR("dwm.selbordercolor", selbordercolor); 5 | XRDB_LOAD_COLOR("dwm.selbgcolor", selbgcolor); 6 | XRDB_LOAD_COLOR("dwm.selfgcolor", selfgcolor); 7 | + XRDB_LOAD_COLOR("color0", termcol0); 8 | + XRDB_LOAD_COLOR("color1", termcol1); 9 | + XRDB_LOAD_COLOR("color2", termcol2); 10 | + XRDB_LOAD_COLOR("color3", termcol3); 11 | + XRDB_LOAD_COLOR("color4", termcol4); 12 | + XRDB_LOAD_COLOR("color5", termcol5); 13 | + XRDB_LOAD_COLOR("color6", termcol6); 14 | + XRDB_LOAD_COLOR("color7", termcol7); 15 | + XRDB_LOAD_COLOR("color8", termcol8); 16 | + XRDB_LOAD_COLOR("color9", termcol9); 17 | + XRDB_LOAD_COLOR("color10", termcol10); 18 | + XRDB_LOAD_COLOR("color11", termcol11); 19 | + XRDB_LOAD_COLOR("color12", termcol12); 20 | + XRDB_LOAD_COLOR("color13", termcol13); 21 | + XRDB_LOAD_COLOR("color14", termcol14); 22 | + XRDB_LOAD_COLOR("color15", termcol15); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.dwm/dwm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dwm/dwm.o -------------------------------------------------------------------------------- /.dwm/dwm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dwm/dwm.png -------------------------------------------------------------------------------- /.dwm/layouts.c: -------------------------------------------------------------------------------- 1 | void 2 | grid(Monitor *m) { 3 | unsigned int i, n, cx, cy, cw, ch, aw, ah, cols, rows; 4 | Client *c; 5 | 6 | for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next)) 7 | n++; 8 | 9 | /* grid dimensions */ 10 | for(rows = 0; rows <= n/2; rows++) 11 | if(rows*rows >= n) 12 | break; 13 | cols = (rows && (rows - 1) * rows >= n) ? rows - 1 : rows; 14 | 15 | /* window geoms (cell height/width) */ 16 | ch = m->wh / (rows ? rows : 1); 17 | cw = m->ww / (cols ? cols : 1); 18 | for(i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next)) { 19 | cx = m->wx + (i / rows) * cw; 20 | cy = m->wy + (i % rows) * ch; 21 | /* adjust height/width of last row/column's windows */ 22 | ah = ((i + 1) % rows == 0) ? m->wh - ch * rows : 0; 23 | aw = (i >= rows * (cols - 1)) ? m->ww - cw * cols : 0; 24 | resize(c, cx, cy, cw - 2 * c->bw + aw, ch - 2 * c->bw + ah, False); 25 | i++; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /.dwm/patches/dwm-focusmaster-20200717-bb2e722.diff: -------------------------------------------------------------------------------- 1 | From 3e020d93df3aaec92d2daa142cd1f0d5301b3197 Mon Sep 17 00:00:00 2001 2 | From: Mateus Auler 3 | Date: Fri, 17 Jul 2020 12:36:36 -0300 4 | Subject: [PATCH] Ability to map a key combination to switch focus to 5 | the master window. 6 | 7 | --- 8 | dwm.c | 16 ++++++++++++++++ 9 | 1 file changed, 16 insertions(+) 10 | 11 | diff --git a/dwm.c b/dwm.c 12 | index 9fd0286..be01927 100644 13 | --- a/dwm.c 14 | +++ b/dwm.c 15 | @@ -235,6 +235,8 @@ static int xerrordummy(Display *dpy, XErrorEvent *ee); 16 | static int xerrorstart(Display *dpy, XErrorEvent *ee); 17 | static void zoom(const Arg *arg); 18 | 19 | +static void focusmaster(const Arg *arg); 20 | + 21 | /* variables */ 22 | static const char broken[] = "broken"; 23 | static char stext[256]; 24 | @@ -2150,3 +2152,17 @@ main(int argc, char *argv[]) 25 | XCloseDisplay(dpy); 26 | return EXIT_SUCCESS; 27 | } 28 | + 29 | +void 30 | +focusmaster(const Arg *arg) 31 | +{ 32 | + Client *c; 33 | + 34 | + if (selmon->nmaster < 1) 35 | + return; 36 | + 37 | + c = nexttiled(selmon->clients); 38 | + 39 | + if (c) 40 | + focus(c); 41 | +} 42 | -- 43 | 2.27.0 44 | 45 | -------------------------------------------------------------------------------- /.dwm/patches/dwm-focusonnetactive-6.2.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 | -------------------------------------------------------------------------------- /.dwm/recompile: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -f ./config.h 4 | doas make clean install 5 | -------------------------------------------------------------------------------- /.dwm/tcl.c: -------------------------------------------------------------------------------- 1 | void 2 | tcl(Monitor * m) 3 | { 4 | int x, y, h, w, mw, sw, bdw; 5 | unsigned int i, n; 6 | Client * c; 7 | 8 | for (n = 0, c = nexttiled(m->clients); c; 9 | c = nexttiled(c->next), n++); 10 | 11 | if (n == 0) 12 | return; 13 | 14 | c = nexttiled(m->clients); 15 | 16 | mw = m->mfact * m->ww; 17 | sw = (m->ww - mw) / 2; 18 | bdw = (2 * c->bw); 19 | resize(c, 20 | n < 3 ? m->wx : m->wx + sw, 21 | m->wy, 22 | n == 1 ? m->ww - bdw : mw - bdw, 23 | m->wh - bdw, 24 | False); 25 | 26 | if (--n == 0) 27 | return; 28 | 29 | w = (m->ww - mw) / ((n > 1) + 1); 30 | c = nexttiled(c->next); 31 | 32 | if (n > 1) 33 | { 34 | x = m->wx + ((n > 1) ? mw + sw : mw); 35 | y = m->wy; 36 | h = m->wh / (n / 2); 37 | 38 | if (h < bh) 39 | h = m->wh; 40 | 41 | for (i = 0; c && i < n / 2; c = nexttiled(c->next), i++) 42 | { 43 | resize(c, 44 | x, 45 | y, 46 | w - bdw, 47 | (i + 1 == n / 2) ? m->wy + m->wh - y - bdw : h - bdw, 48 | False); 49 | 50 | if (h != m->wh) 51 | y = c->y + HEIGHT(c); 52 | } 53 | } 54 | 55 | x = (n + 1 / 2) == 1 ? mw : m->wx; 56 | y = m->wy; 57 | h = m->wh / ((n + 1) / 2); 58 | 59 | if (h < bh) 60 | h = m->wh; 61 | 62 | for (i = 0; c; c = nexttiled(c->next), i++) 63 | { 64 | resize(c, 65 | x, 66 | y, 67 | (i + 1 == (n + 1) / 2) ? w - bdw : w - bdw, 68 | (i + 1 == (n + 1) / 2) ? m->wy + m->wh - y - bdw : h - bdw, 69 | False); 70 | 71 | if (h != m->wh) 72 | y = c->y + HEIGHT(c); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.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 | 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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.dwm/util.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.dwm/util.o -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.rej 2 | *.orig 3 | -------------------------------------------------------------------------------- /.local/bin/clip: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat $1 | xclip -selection clipboard 4 | -------------------------------------------------------------------------------- /.local/bin/dmenu_run_history: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cachedir=${XDG_CACHE_HOME:-"$HOME/.cache"} 4 | if [ -d "$cachedir" ]; then 5 | cache=$cachedir/dmenu_run 6 | historyfile=$cachedir/dmenu_history 7 | else # if no xdg dir, fall back to dotfiles in ~ 8 | cache=$HOME/.dmenu_cache 9 | historyfile=$HOME/.dmenu_history 10 | fi 11 | 12 | IFS=: 13 | if stest -dqr -n "$cache" $PATH; then 14 | stest -flx $PATH | sort -u > "$cache" 15 | fi 16 | unset IFS 17 | 18 | awk -v histfile=$historyfile ' 19 | BEGIN { 20 | while( (getline < histfile) > 0 ) { 21 | sub("^[0-9]+\t","") 22 | print 23 | x[$0]=1 24 | } 25 | } !x[$0]++ ' "$cache" \ 26 | | dmenu "$@" \ 27 | | awk -v histfile=$historyfile ' 28 | BEGIN { 29 | FS=OFS="\t" 30 | while ( (getline < histfile) > 0 ) { 31 | count=$1 32 | sub("^[0-9]+\t","") 33 | fname=$0 34 | history[fname]=count 35 | } 36 | close(histfile) 37 | } 38 | 39 | { 40 | history[$0]++ 41 | print 42 | } 43 | 44 | END { 45 | if(!NR) exit 46 | for (f in history) 47 | print history[f],f | "sort -t '\t' -k1rn >" histfile 48 | } 49 | ' \ 50 | | while read cmd; do ${SHELL:-"/bin/sh"} -c "$cmd" & done 51 | -------------------------------------------------------------------------------- /.local/bin/kitty_reload_w: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | bash -c "kitty @ set-colors --all --configured ~/.config/kitty/kitty-w.conf" 3 | -------------------------------------------------------------------------------- /.local/bin/kitty_reload_x: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | bash -c "kitty @ set-colors --all --configured ~/.config/kitty/kitty.conf" 3 | -------------------------------------------------------------------------------- /.local/bin/lock: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | blank='#00000000' # blank 4 | #background='#1A6785FF' 5 | background='#5E81ACFF' 6 | foreground='#D8DEE9FF' # text 7 | 8 | primary='#BF616AFF' # default 9 | alert='#EBCB8BFF' # wrong 10 | verifying='#A3BE8CFF' # verifying 11 | 12 | IMAGE=/tmp/lock.png 13 | SHOT="scrot $IMAGE" 14 | BLURTYPE="0x5" # 7.52s 15 | 16 | $SHOT 17 | convert $IMAGE -blur $BLURTYPE $IMAGE 18 | 19 | i3lock \ 20 | --image=$IMAGE \ 21 | \ 22 | --screen 1 \ 23 | --indicator \ 24 | --keylayout 2 \ 25 | --force-clock \ 26 | \ 27 | --insidevercolor=$background \ 28 | --insidewrongcolor=$background \ 29 | --insidecolor=$background \ 30 | \ 31 | --ringvercolor=$primary \ 32 | --ringwrongcolor=$alert \ 33 | --ringcolor=$primary \ 34 | \ 35 | --linecolor=$primary \ 36 | --line-uses-inside \ 37 | \ 38 | --keyhlcolor=$alert \ 39 | --bshlcolor=$alert \ 40 | \ 41 | --separatorcolor=$primary \ 42 | \ 43 | --verifcolor=$foreground \ 44 | --wrongcolor=$foreground \ 45 | --timecolor=$foreground \ 46 | --datecolor=$foreground \ 47 | --layoutcolor=$foreground \ 48 | \ 49 | --time-align=0 \ 50 | --date-align=0 \ 51 | --layout-align=0 \ 52 | --verif-align=0 \ 53 | --wrong-align=0 \ 54 | --modif-align=0 \ 55 | \ 56 | --blur 5 \ 57 | --indicator \ 58 | --keylayout 2 \ 59 | \ 60 | --veriftext="" \ 61 | --wrongtext="" \ 62 | # --clock \ 63 | # --timestr="%H:%M:%S" \ 64 | # --line-uses-inside \ 65 | # --datestr="%A, %m %Y" \ 66 | # --textsize=20 67 | # --modsize=10 68 | #--time-font=noto-sans \ 69 | #--datefont=noto-sans \ 70 | # etc 71 | 72 | rm $IMAGE 73 | -------------------------------------------------------------------------------- /.local/bin/startdaemon: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | emacs --daemon & 5 | dunst & 6 | -------------------------------------------------------------------------------- /.local/bin/startdaemon-sway: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | emacs --daemon & 5 | mako & 6 | -------------------------------------------------------------------------------- /.local/bin/umountmenu: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A dmenu prompt to unmount drives. 4 | # Provides you with mounted partitions, select one to unmount. 5 | # Drives mounted at /, /boot and /home will not be options to unmount. 6 | 7 | unmountusb() { 8 | [ -z "$drives" ] && exit 9 | chosen="$(echo "$drives" | dmenu -i -p "Unmount which drive?")" || exit 1 10 | chosen="$(echo "$chosen" | awk '{print $1}')" 11 | [ -z "$chosen" ] && exit 12 | doas umount "$chosen" && notify-send "💻 USB unmounting" "$chosen unmounted." 13 | } 14 | 15 | unmountandroid() { \ 16 | chosen="$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?")" || exit 1 17 | [ -z "$chosen" ] && exit 18 | doas umount -l "$chosen" && notify-send "🤖 Android unmounting" "$chosen unmounted." 19 | } 20 | 21 | asktype() { \ 22 | choice="$(printf "USB\\nAndroid" | dmenu -i -p "Unmount a USB drive or Android device?")" || exit 1 23 | case "$choice" in 24 | USB) unmountusb ;; 25 | Android) unmountandroid ;; 26 | esac 27 | } 28 | 29 | drives=$(lsblk -nrpo "name,type,size,mountpoint" | awk '$4!~/\/boot|\/home$|SWAP/&&length($4)>1{printf "%s (%s)\n",$4,$3}') 30 | 31 | if ! grep simple-mtpfs /etc/mtab; then 32 | [ -z "$drives" ] && echo "No drives to unmount." && exit 33 | echo "Unmountable USB drive detected." 34 | unmountusb 35 | else 36 | if [ -z "$drives" ] 37 | then 38 | echo "Unmountable Android device detected." 39 | unmountandroid 40 | else 41 | echo "Unmountable USB drive(s) and Android device(s) detected." 42 | asktype 43 | fi 44 | fi 45 | -------------------------------------------------------------------------------- /.local/share/fcitx5/themes/nord-dark/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.local/share/fcitx5/themes/nord-dark/arrow.png -------------------------------------------------------------------------------- /.local/share/fcitx5/themes/nord-dark/panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.local/share/fcitx5/themes/nord-dark/panel.png -------------------------------------------------------------------------------- /.local/share/fcitx5/themes/nord-dark/radio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.local/share/fcitx5/themes/nord-dark/radio.png -------------------------------------------------------------------------------- /.local/share/fcitx5/themes/nord-dark/theme.conf: -------------------------------------------------------------------------------- 1 | # vim: ft=dosini 2 | [Metadata] 3 | Name=Nord-Dark 4 | Version=0.1 5 | Author=tonyfettes 6 | Description=Nord Color Theme (Dark) 7 | ScaleWithDPI=True 8 | 9 | [InputPanel] 10 | # 字体 11 | Font=Sans 13 12 | # 非选中候选字颜色 13 | NormalColor=#81a1c1 14 | # 选中候选字颜色 15 | HighlightCandidateColor=#88c0d0 16 | # 高亮前景颜色(输入字符颜色) 17 | HighlightColor=#88c0d0 18 | # 输入字符背景颜色 19 | HighlightBackgroundColor=#434c5e 20 | # 21 | Spacing=3 22 | 23 | [InputPanel/TextMargin] 24 | # 候选字对左边距 25 | Left=10 26 | # 候选字对右边距 27 | Right=10 28 | # 候选字向上边距 29 | Top=6 30 | # 候选字向下边距 31 | Bottom=6 32 | 33 | [InputPanel/Background] 34 | Image=panel.png 35 | 36 | [InputPanel/Background/Margin] 37 | Left=2 38 | Right=2 39 | Top=2 40 | Bottom=2 41 | 42 | [InputPanel/Highlight] 43 | Color=#4c566a 44 | 45 | [InputPanel/Highlight/Margin] 46 | # 高亮区域左边距 47 | Left=10 48 | # 高亮区域右边距 49 | Right=10 50 | # 高亮区域上边距 51 | Top=7 52 | # 高亮区域下边距 53 | Bottom=7 54 | 55 | [Menu] 56 | Font=Sans 10 57 | NormalColor=#eceff4 58 | #HighlightColor=#4c566a 59 | Spacing=3 60 | 61 | [Menu/Background] 62 | Image=panel.png 63 | 64 | [Menu/Background/Margin] 65 | Left=2 66 | Right=2 67 | Top=2 68 | Bottom=2 69 | 70 | [Menu/ContentMargin] 71 | Left=2 72 | Right=2 73 | Top=2 74 | Bottom=2 75 | 76 | [Menu/Highlight] 77 | Color=#4c566a 78 | 79 | [Menu/Highlight/Margin] 80 | Left=10 81 | Right=10 82 | Top=5 83 | Bottom=5 84 | 85 | [Menu/Separator] 86 | Color=#2e3440 87 | 88 | [Menu/CheckBox] 89 | Image=radio.png 90 | 91 | [Menu/SubMenu] 92 | Image=arrow.png 93 | 94 | [Menu/TextMargin] 95 | Left=5 96 | Right=5 97 | Top=5 98 | Bottom=5 99 | -------------------------------------------------------------------------------- /.local/share/fcitx5/themes/nord-light/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.local/share/fcitx5/themes/nord-light/arrow.png -------------------------------------------------------------------------------- /.local/share/fcitx5/themes/nord-light/panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.local/share/fcitx5/themes/nord-light/panel.png -------------------------------------------------------------------------------- /.local/share/fcitx5/themes/nord-light/radio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.local/share/fcitx5/themes/nord-light/radio.png -------------------------------------------------------------------------------- /.local/share/fcitx5/themes/nord-light/theme.conf: -------------------------------------------------------------------------------- 1 | # vim: ft=dosini 2 | [Metadata] 3 | Name=Nord-Light 4 | Version=0.1 5 | Author=MiraculousMoon 6 | Description=Nord Color Theme (Light) 7 | ScaleWithDPI=True 8 | 9 | [InputPanel] 10 | # 字体 11 | Font=Sans 13 12 | # 非选中候选字颜色 13 | NormalColor=#81a1c1 14 | # 选中候选字颜色 15 | HighlightCandidateColor=#5e81ac 16 | # 高亮前景颜色(输入字符颜色) 17 | HighlightColor=#5e81ac 18 | # 输入字符背景颜色 19 | HighlightBackgroundColor=#eceff4 20 | # 21 | Spacing=3 22 | 23 | [InputPanel/TextMargin] 24 | # 候选字对左边距 25 | Left=10 26 | # 候选字对右边距 27 | Right=10 28 | # 候选字向上边距 29 | Top=6 30 | # 候选字向下边距 31 | Bottom=6 32 | 33 | [InputPanel/Background] 34 | Image=panel.png 35 | 36 | [InputPanel/Background/Margin] 37 | Left=2 38 | Right=2 39 | Top=2 40 | Bottom=2 41 | 42 | [InputPanel/Highlight] 43 | Color=#d8dee9 44 | 45 | [InputPanel/Highlight/Margin] 46 | # 高亮区域左边距 47 | Left=10 48 | # 高亮区域右边距 49 | Right=10 50 | # 高亮区域上边距 51 | Top=7 52 | # 高亮区域下边距 53 | Bottom=7 54 | 55 | [Menu] 56 | Font=Sans 10 57 | NormalColor=#2e3440 58 | #HighlightColor=#4c566a 59 | Spacing=3 60 | 61 | [Menu/Background] 62 | Image=panel.png 63 | 64 | [Menu/Background/Margin] 65 | Left=2 66 | Right=2 67 | Top=2 68 | Bottom=2 69 | 70 | [Menu/ContentMargin] 71 | Left=2 72 | Right=2 73 | Top=2 74 | Bottom=2 75 | 76 | [Menu/Highlight] 77 | Color=#4c566a 78 | 79 | [Menu/Highlight/Margin] 80 | Left=10 81 | Right=10 82 | Top=5 83 | Bottom=5 84 | 85 | [Menu/Separator] 86 | Color=#2e3440 87 | 88 | [Menu/CheckBox] 89 | Image=radio.png 90 | 91 | [Menu/SubMenu] 92 | Image=arrow.png 93 | 94 | [Menu/TextMargin] 95 | Left=5 96 | Right=5 97 | Top=5 98 | Bottom=5 99 | -------------------------------------------------------------------------------- /.xmonad/xmonad-x86_64-linux: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.xmonad/xmonad-x86_64-linux -------------------------------------------------------------------------------- /.xmonad/xmonad.errors: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.xmonad/xmonad.errors -------------------------------------------------------------------------------- /.xmonad/xmonad.hi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.xmonad/xmonad.hi -------------------------------------------------------------------------------- /.xmonad/xmonad.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/.xmonad/xmonad.o -------------------------------------------------------------------------------- /.xmonad/xpm/calendar-clock-icon_20.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * calendar_clock_icon_20_xpm[] = { 3 | "20 20 2 1", 4 | " c None", 5 | ". c #EFF0F1", 6 | " ", 7 | " ", 8 | " ", 9 | " ........ ", 10 | " .. .. ", 11 | " .. . .. ", 12 | " .. . .. ", 13 | " . . . ", 14 | " . . . ", 15 | " . . . ", 16 | " . ...... . ", 17 | " . . ", 18 | " . . ", 19 | " .. .. ", 20 | " .. .. ", 21 | " .. .. ", 22 | " ........ ", 23 | " ", 24 | " ", 25 | " "}; 26 | -------------------------------------------------------------------------------- /.xmonad/xpm/cpu_20.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * cpu_20_xpm[] = { 3 | "20 20 2 1", 4 | " c None", 5 | ". c #EFF0F1", 6 | " ", 7 | " ", 8 | " ", 9 | " ", 10 | " ................ ", 11 | " .. .. ", 12 | " .. .. ", 13 | " .. .. ", 14 | " .. .. ", 15 | " .. .. ", 16 | " .. .. ", 17 | " .. .. ", 18 | " ................ ", 19 | " .............. ", 20 | " .. ", 21 | " ........ ", 22 | " ", 23 | " ", 24 | " ", 25 | " "}; 26 | -------------------------------------------------------------------------------- /.xmonad/xpm/harddisk-icon_20.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * harddisk_icon_20_xpm[] = { 3 | "20 20 2 1", 4 | " c None", 5 | ". c #EFF0F1", 6 | " ", 7 | " ", 8 | " ", 9 | " ............ ", 10 | " .. .. ", 11 | " . . ", 12 | " . . ", 13 | " . . ", 14 | " .. .. ", 15 | " .. .. ", 16 | " . . ", 17 | " . . ", 18 | " . . ", 19 | " .. .. ", 20 | " ............ ", 21 | " . ... . ", 22 | " ............ ", 23 | " ............ ", 24 | " ", 25 | " "}; 26 | -------------------------------------------------------------------------------- /.xmonad/xpm/haskell_20.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * haskell_20_xpm[] = { 3 | "20 20 2 1", 4 | " c None", 5 | ". c #FFFFFF", 6 | " ", 7 | " ", 8 | " ", 9 | ".... .... ", 10 | " .... ... ", 11 | " ... .... ", 12 | " .... .... ", 13 | " .... ... ........", 14 | " ... .... .......", 15 | " .... .... ", 16 | " .... .... ", 17 | " ... ...... .....", 18 | " .... ....... ....", 19 | " .... .... ... ", 20 | " ... .... .... ", 21 | " .... ... .... ", 22 | ".... .... ... ", 23 | " ", 24 | " ", 25 | " "}; 26 | -------------------------------------------------------------------------------- /.xmonad/xpm/memory-icon_20.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * memory_icon_20_xpm[] = { 3 | "20 20 2 1", 4 | " c None", 5 | ". c #EFF0F1", 6 | " ", 7 | " ", 8 | " ", 9 | " ........... ", 10 | " . . ", 11 | " . . . ", 12 | " . . . . . ", 13 | " . .. . .. . ", 14 | " . .. . .. . ", 15 | " . .. . .. . ", 16 | " . . ", 17 | " . . ", 18 | " .. . ", 19 | " . . ", 20 | " . . ", 21 | " . . ", 22 | " ............ ", 23 | " ............ ", 24 | " ", 25 | " "}; 26 | -------------------------------------------------------------------------------- /.xmonad/xpm/net_down_20.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * net_down_20_xpm[] = { 3 | "20 20 2 1", 4 | " c None", 5 | ". c #EFF0F1", 6 | " ", 7 | " ", 8 | " . ", 9 | " . ", 10 | " . ", 11 | " . ", 12 | " . ", 13 | " . ", 14 | " . ", 15 | " .. . . ", 16 | " . . .. ", 17 | " .. . . ", 18 | " . ... ", 19 | " .... ", 20 | " ... ", 21 | " .. ", 22 | " . ", 23 | " ", 24 | " ", 25 | " "}; 26 | -------------------------------------------------------------------------------- /.xmonad/xpm/net_up_20.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * net_up_20_xpm[] = { 3 | "20 20 2 1", 4 | " c None", 5 | ". c #EFF0F1", 6 | " ", 7 | " ", 8 | " ", 9 | " . ", 10 | " .. ", 11 | " ... ", 12 | " .... ", 13 | " . ... ", 14 | " .. . . ", 15 | " . . .. ", 16 | " .. . . ", 17 | " . ", 18 | " . ", 19 | " . ", 20 | " . ", 21 | " . ", 22 | " . ", 23 | " . ", 24 | " ", 25 | " "}; 26 | -------------------------------------------------------------------------------- /.xprofile: -------------------------------------------------------------------------------- 1 | export GTK_IM_MODULE=fcitx 2 | export QT_IM_MODULE=fcitx 3 | export XMODIFIERS="@im=fcitx" 4 | export GLFW_IM_MODULE="ibus" 5 | export _JAVA_AWT_WM_NONREPARENTING=1 6 | setxkbmap -option "ctrl:swapcaps" 7 | xautolock -time 10 -locker '/usr/bin/betterlockscreen -l' -corners ---- -cornersize 30 & 8 | xsettingsd & 9 | -------------------------------------------------------------------------------- /Pictures/Background/NordDay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/Pictures/Background/NordDay.png -------------------------------------------------------------------------------- /Pictures/Background/NordNight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/Pictures/Background/NordNight.png -------------------------------------------------------------------------------- /Pictures/nord.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/Pictures/nord.png -------------------------------------------------------------------------------- /Pictures/shot/bspwm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/Pictures/shot/bspwm.png -------------------------------------------------------------------------------- /Pictures/shot/dwm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/Pictures/shot/dwm.png -------------------------------------------------------------------------------- /Pictures/shot/firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/Pictures/shot/firefox.png -------------------------------------------------------------------------------- /Pictures/shot/i3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/Pictures/shot/i3.png -------------------------------------------------------------------------------- /Pictures/shot/spectrwm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/Pictures/shot/spectrwm.png -------------------------------------------------------------------------------- /Pictures/shot/sway.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/Pictures/shot/sway.png -------------------------------------------------------------------------------- /Pictures/shot/switch.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/Pictures/shot/switch.gif -------------------------------------------------------------------------------- /Pictures/shot/xmonad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/Pictures/shot/xmonad.png -------------------------------------------------------------------------------- /chrome/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-2020 mut-ex 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /chrome/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/chrome/demo.gif -------------------------------------------------------------------------------- /chrome/left-arrow.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chrome/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/chrome/preview.png -------------------------------------------------------------------------------- /chrome/right-arrow.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chrome/userContent.css: -------------------------------------------------------------------------------- 1 | @import url("userChrome.css"); 2 | 3 | /* Removes white loading page */ 4 | @-moz-document url(about:blank), url(about:newtab), url(about:home) { 5 | html:not(#ublock0-epicker), html:not(#ublock0-epicker) body, #newtab-customize-overlay { 6 | background: var(--mff-bg) !important; 7 | } 8 | } 9 | 10 | 11 | /* Hide scrollbar */ 12 | 13 | :root{ 14 | scrollbar-width: right !important; 15 | } 16 | 17 | 18 | @-moz-document url(about:privatebrowsing) { 19 | 20 | :root{ 21 | scrollbar-width: right !important; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /startpage/README.md: -------------------------------------------------------------------------------- 1 | **This is my Nordic fork of [Bento by MiguelRAvila](https://github.com/MiguelRAvila/Bento), more details can be seen in original repo.** 2 | -------------------------------------------------------------------------------- /startpage/icons/Nord/01d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/01d.png -------------------------------------------------------------------------------- /startpage/icons/Nord/01n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/01n.png -------------------------------------------------------------------------------- /startpage/icons/Nord/02d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/02d.png -------------------------------------------------------------------------------- /startpage/icons/Nord/02n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/02n.png -------------------------------------------------------------------------------- /startpage/icons/Nord/03d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/03d.png -------------------------------------------------------------------------------- /startpage/icons/Nord/03n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/03n.png -------------------------------------------------------------------------------- /startpage/icons/Nord/04d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/04d.png -------------------------------------------------------------------------------- /startpage/icons/Nord/04n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/04n.png -------------------------------------------------------------------------------- /startpage/icons/Nord/09d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/09d.png -------------------------------------------------------------------------------- /startpage/icons/Nord/09n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/09n.png -------------------------------------------------------------------------------- /startpage/icons/Nord/10d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/10d.png -------------------------------------------------------------------------------- /startpage/icons/Nord/10n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/10n.png -------------------------------------------------------------------------------- /startpage/icons/Nord/11d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/11d.png -------------------------------------------------------------------------------- /startpage/icons/Nord/11n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/11n.png -------------------------------------------------------------------------------- /startpage/icons/Nord/13d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/13d.png -------------------------------------------------------------------------------- /startpage/icons/Nord/13n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/13n.png -------------------------------------------------------------------------------- /startpage/icons/Nord/50d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/50d.png -------------------------------------------------------------------------------- /startpage/icons/Nord/50n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/50n.png -------------------------------------------------------------------------------- /startpage/icons/Nord/unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/Nord/unknown.png -------------------------------------------------------------------------------- /startpage/icons/White/01d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/01d.png -------------------------------------------------------------------------------- /startpage/icons/White/01n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/01n.png -------------------------------------------------------------------------------- /startpage/icons/White/02d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/02d.png -------------------------------------------------------------------------------- /startpage/icons/White/02n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/02n.png -------------------------------------------------------------------------------- /startpage/icons/White/03d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/03d.png -------------------------------------------------------------------------------- /startpage/icons/White/03n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/03n.png -------------------------------------------------------------------------------- /startpage/icons/White/04d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/04d.png -------------------------------------------------------------------------------- /startpage/icons/White/04n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/04n.png -------------------------------------------------------------------------------- /startpage/icons/White/09d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/09d.png -------------------------------------------------------------------------------- /startpage/icons/White/09n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/09n.png -------------------------------------------------------------------------------- /startpage/icons/White/10d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/10d.png -------------------------------------------------------------------------------- /startpage/icons/White/10n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/10n.png -------------------------------------------------------------------------------- /startpage/icons/White/11d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/11d.png -------------------------------------------------------------------------------- /startpage/icons/White/11n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/11n.png -------------------------------------------------------------------------------- /startpage/icons/White/13d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/13d.png -------------------------------------------------------------------------------- /startpage/icons/White/13n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/13n.png -------------------------------------------------------------------------------- /startpage/icons/White/50d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/50d.png -------------------------------------------------------------------------------- /startpage/icons/White/50n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/50n.png -------------------------------------------------------------------------------- /startpage/icons/White/unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/White/unknown.png -------------------------------------------------------------------------------- /startpage/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/icons/favicon-32x32.png -------------------------------------------------------------------------------- /startpage/img/gnu-linux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/startpage/img/gnu-linux.png -------------------------------------------------------------------------------- /startpage/js/greeting.js: -------------------------------------------------------------------------------- 1 | // Get the hour 2 | const today = new Date(); 3 | const hour = today.getHours(); 4 | 5 | // Here you can change your name 6 | const name = ' Ayamir '; 7 | 8 | // Here you can change your greetings 9 | const gree1 = 'Go to Sleep! '; 10 | const gree2 = 'Good morning! '; 11 | const gree3 = 'Good afternoon '; 12 | const gree4 = 'Good evening, '; 13 | const gree5 = 'Good evening, '; 14 | const gree6 = 'Good evening, '; 15 | 16 | // Define the hours of the greetings 17 | if (hour >= 23 && hour < 5) { 18 | document.getElementById('greetings').innerText = gree1 + name; 19 | } else if (hour >= 6 && hour < 12) { 20 | document.getElementById('greetings').innerText = gree2 + name; 21 | } else if (hour >= 12 && hour < 19) { 22 | document.getElementById('greetings').innerText = gree3 + name; 23 | } else { 24 | document.getElementById('greetings').innerText = gree4 + name; 25 | } 26 | -------------------------------------------------------------------------------- /startpage/js/theme.js: -------------------------------------------------------------------------------- 1 | // Store the theme 2 | let darkTheme = localStorage.getItem("darkTheme"); 3 | const themeToggle = document.querySelector("#themeButton"); 4 | 5 | // Apply Dark theme 6 | const enableDark = () => { 7 | document.body.classList.add("darktheme"); 8 | localStorage.setItem("darkTheme", "enabled"); 9 | themeToggle.innerHTML = ``; 10 | feather.replace(); 11 | }; 12 | 13 | // Remove Dark theme 14 | const disableDark = () => { 15 | document.body.classList.remove("darktheme"); 16 | localStorage.setItem("darkTheme", null); 17 | themeToggle.innerHTML = ``; 18 | feather.replace(); 19 | }; 20 | 21 | //Toggle theme 22 | if (darkTheme === "enabled") { 23 | enableDark(); 24 | } else { 25 | disableDark(); 26 | } 27 | 28 | themeToggle.addEventListener("click", () => { 29 | darkTheme = localStorage.getItem("darkTheme"); 30 | if (darkTheme !== "enabled") { 31 | enableDark(); 32 | } else { 33 | disableDark(); 34 | } 35 | }); 36 | 37 | // Theme accordint the hour 38 | 39 | /* 40 | const today = new Date(); 41 | 42 | if (hour >= 19 || hour < 5) { 43 | enableDark(); 44 | } else { 45 | disableDark(); 46 | } 47 | */ 48 | -------------------------------------------------------------------------------- /startpage/js/time.js: -------------------------------------------------------------------------------- 1 | window.onload = displayClock(); 2 | function displayClock() { 3 | const monthNames = [ 4 | 'Jan', 5 | 'Feb', 6 | 'Mar', 7 | 'Apr', 8 | 'May', 9 | 'Jun', 10 | 'Jul', 11 | 'Aug', 12 | 'Sep', 13 | 'Oct', 14 | 'Nov', 15 | 'Dec', 16 | ]; 17 | 18 | // Set to true to use a 12 hour date format 19 | var format_12hour = false; 20 | 21 | var d = new Date(); 22 | var mm = monthNames[d.getMonth()]; 23 | var dd = d.getDate(); 24 | var min = (mins = ('0' + d.getMinutes()).slice(-2)); 25 | var hh = d.getHours(); 26 | var ampm = ''; 27 | 28 | if (format_12hour) { 29 | ampm = hh >= 12 ? ' pm' : ' am'; 30 | hh = hh % 12; 31 | hh = hh ? hh : 12; //show mod 0 as 12 32 | } 33 | 34 | document.getElementById('hour').innerText = hh; 35 | document.getElementById('separator').innerHTML = ' : '; 36 | document.getElementById('minutes').innerText = min + ampm; 37 | 38 | document.getElementById('month').innerText = mm; 39 | document.getElementById('day').innerText = dd; 40 | 41 | setTimeout(displayClock, 1000); 42 | } 43 | -------------------------------------------------------------------------------- /startpage/js/weather.js: -------------------------------------------------------------------------------- 1 | const iconElement = document.querySelector('.weather-icon'); 2 | const tempElement = document.querySelector('.temperature-value p'); 3 | const descElement = document.querySelector('.temperature-description p'); 4 | 5 | // App data 6 | const weather = {}; 7 | weather.temperature = { 8 | unit: 'celsius', 9 | }; 10 | 11 | // Change to 'F' for Fahrenheit 12 | var tempUnit = 'C'; 13 | 14 | const KELVIN = 273.15; 15 | // Use your own key for the Weather, Get it here: https://openweathermap.org/ 16 | const key = 'eaf0bf95962bd42471d02500acc89aa1'; 17 | 18 | // Set Position function 19 | setPosition(); 20 | 21 | function setPosition(position) { 22 | // Here you can change your position 23 | // You can use https://www.latlong.net/ to get it! (I use San Francisco as an example) 24 | let latitude = 39.2365; 25 | let longitude = 111.6403; 26 | 27 | getWeather(latitude, longitude); 28 | } 29 | 30 | // Get the Weather data 31 | function getWeather(latitude, longitude) { 32 | let api = `https://api.openweathermap.org/data/2.5/weather?lat=${latitude}&lon=${longitude}&appid=${key}`; 33 | 34 | console.log(api); 35 | 36 | fetch(api) 37 | .then(function (response) { 38 | let data = response.json(); 39 | return data; 40 | }) 41 | .then(function (data) { 42 | let celsius = Math.floor(data.main.temp - KELVIN); 43 | weather.temperature.value = 44 | tempUnit == 'C' ? celsius : (celsius * 9) / 5 + 32; 45 | weather.description = data.weather[0].description; 46 | weather.iconId = data.weather[0].icon; 47 | }) 48 | .then(function () { 49 | displayWeather(); 50 | }); 51 | } 52 | 53 | // Display Weather info 54 | function displayWeather() { 55 | iconElement.innerHTML = ``; 56 | tempElement.innerHTML = `${weather.temperature.value}°${tempUnit}`; 57 | descElement.innerHTML = weather.description; 58 | } 59 | -------------------------------------------------------------------------------- /wofer/config: -------------------------------------------------------------------------------- 1 | style=~/.config/wofi/style.css 2 | show=dmenu 3 | width=30% 4 | term=kitty 5 | allow_markup=true 6 | content_halign=start 7 | hide_scroll=true 8 | always_parse_args=true 9 | parse_search=true 10 | show_all=true 11 | print_command=true 12 | layer=overlay 13 | allow-images=true 14 | insensitive=true 15 | matching=contains 16 | prompt= 17 | image_size=25 18 | display_generic=true 19 | 20 | # Vi keybindings 21 | # key_forward=j 22 | # key_backward=k 23 | # key_submit=l 24 | # key_pgup=Tab 25 | -------------------------------------------------------------------------------- /wofer/extensions/gofile: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | file="$1" 4 | email='' 5 | server='srv-store1' 6 | 7 | # Uncomment if you don't already know your server. I recommend running this command once to make things faster once and for all. 8 | # set server (curl https://apiv2.gofile.io/getServer | jq .data.server | sed 's/["]//g') 9 | if ! -d ~/wofer/extensions/upload; then 10 | mkdir ~/wofer/extensions/upload 11 | fi 12 | message=$(curl -F email="$email" -F file=@"$file" https://"$server".gofile.io/uploadFile) 13 | code=$(echo $message | jq .data.code | sed 's/["]//g') 14 | url="https://gofile.io/d/$code" 15 | wl-copy "$url" 16 | -------------------------------------------------------------------------------- /wofer/extensions/kdeconnect: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DEVICE=$( kdeconnect-cli -l | wofi --dmenu -i -c ~/wofer/style.css -s ~/wofer/style.css | sed '$ s/.*: //' | sed 's/ .*//' ) 4 | 5 | if [[ "$1" != "" ]]; then 6 | kdeconnect-cli --share "$1" -d "$DEVICE" 7 | fi 8 | 9 | 10 | -------------------------------------------------------------------------------- /wofer/extensions/manga: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Manga library directory 4 | DIR=$HOME/.mangas 5 | 6 | cd $DIR 7 | 8 | lsi () { 9 | if [[ $(pwd) =~ mangas ]]; then 10 | echo " .." 11 | fi 12 | ls -d */ | sort -n | while read entry; do 13 | echo " $(echo $entry | sed "s|/$||" )" 14 | done 15 | } 16 | 17 | library () { 18 | while : 19 | do 20 | stdout=$( lsi | wofi -i -c ~/wofer/config -s ~/wofer/style.css | grep -o ' .*' | sed 's| *||') 21 | if [[ $(pwd) == $DIR ]]; then 22 | if [[ $stdout =~ \.\. || $stdout == "" ]]; then 23 | exit 24 | fi 25 | cd "$stdout" 26 | elif [[ $(pwd) =~ $DIR/.+ ]]; then 27 | if [[ $stdout =~ \.\. ]]; then 28 | cd .. 29 | else 30 | cd "$stdout"; ls ./ | sort -n | imv_config=~/.config/imv/manga imv 31 | exit 32 | fi 33 | else 34 | exit 35 | fi 36 | done 37 | } 38 | 39 | library 40 | -------------------------------------------------------------------------------- /wofer/extensions/nvim: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sleep .1 4 | 5 | nvim "$1" 6 | -------------------------------------------------------------------------------- /wofer/scrots/directory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/wofer/scrots/directory.png -------------------------------------------------------------------------------- /wofer/scrots/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/wofer/scrots/file.png -------------------------------------------------------------------------------- /wofer/scrots/hidden.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/wofer/scrots/hidden.png -------------------------------------------------------------------------------- /wofer/scrots/rice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayamir/nord-and-light/51f58b2390b26b9e88dda4fa8c3c61315e6421ae/wofer/scrots/rice.png -------------------------------------------------------------------------------- /wofer/style.css: -------------------------------------------------------------------------------- 1 | #entry { 2 | /* background-color: transparent; */ 3 | border-radius: 5px; 4 | padding: 10px; 5 | margin-bottom: 5px; 6 | } 7 | 8 | #entry:selected { 9 | background-color: #5e81ac; 10 | /* border: none; */ 11 | } 12 | 13 | #text:selected { 14 | color: #434c5e; 15 | } 16 | 17 | #window { 18 | padding: 2px; 19 | background-color: rgba(228, 231, 236, 1.0); 20 | border: 3px solid #3b4252; 21 | border-radius: 3px; 22 | font-family: Product Sans; 23 | } 24 | 25 | #input { 26 | border: 2px solid #5e81ac; 27 | background-color: #eceff4; 28 | padding: 5px; 29 | margin: 2px; 30 | font-size: 16px; 31 | border-radius: 5px; 32 | } 33 | 34 | #inner-box { 35 | color: #434c5e; 36 | padding: 2px; 37 | background-color: transparent; 38 | } 39 | 40 | #outer-box { 41 | margin: 15px; 42 | background-color: transparent; 43 | } 44 | 45 | #scroll { 46 | margin-top: 10px; 47 | } 48 | 49 | #text { 50 | font-size: 16px; 51 | color: #434c5e; 52 | background-color: transparent; 53 | } 54 | 55 | #img { 56 | background-color: transparent; 57 | padding: 5px; 58 | } 59 | --------------------------------------------------------------------------------