Browse Source

Update dotfiles

master
NotNite 4 months ago
parent
commit
0f8daf8414
Signed by: j <[email protected]> GPG Key ID: 6FFA26EC114BF88D
14 changed files with 767 additions and 4 deletions
  1. +29
    -0
      config/.Xresources
  2. +73
    -0
      config/.vimrc
  3. +415
    -0
      config/dunst/dunstrc
  4. +1
    -0
      config/dunst/reload
  5. +1
    -1
      config/htop/htoprc
  6. +2
    -2
      config/i3/config
  7. +10
    -0
      config/i3/launch.sh
  8. +10
    -0
      config/i3/redshift.sh
  9. +1
    -1
      config/neofetch/config.conf
  10. +54
    -0
      config/redshift.conf
  11. +134
    -0
      elixire/elixiremanager.sh
  12. +37
    -0
      elixire/screenie
  13. BIN
      pictures/Garf.jpg
  14. BIN
      pictures/lightdmbg.png

+ 29
- 0
config/.Xresources View File

@@ -16,3 +16,32 @@ URxvt.keysym.Control-Down: \033[1;5B
URxvt.keysym.Control-Left: \033[1;5D
URxvt.keysym.Control-Right: \033[1;5C
URxvt.internalBorder: 8

! hard contrast: *background: #1d2021
URxvt.background: #282828
! soft contrast: *background: #32302f
URxvt.foreground: #ebdbb2
! Black + DarkGrey
URxvt.color0: #282828
URxvt.color8: #928374
! DarkRed + Red
*color1: #cc241d
*color9: #fb4934
! DarkGreen + Green
*color2: #98971a
*color10: #b8bb26
! DarkYellow + Yellow
*color3: #d79921
*color11: #fabd2f
! DarkBlue + Blue
*color4: #458588
*color12: #83a598
! DarkMagenta + Magenta
*color5: #b16286
*color13: #d3869b
! DarkCyan + Cyan
*color6: #689d6a
*color14: #8ec07c
! LightGrey + White
URxvt.color7: #a89984
URxvt.color15: #ebdbb2

+ 73
- 0
config/.vimrc View File

@@ -0,0 +1,73 @@
set nocompatible " be iMproved, required
filetype off " required

"NeoBundle Scripts-----------------------------
if has('vim_starting')
" Required:
set runtimepath+=/home/julian/.config/nvim/bundle/neobundle.vim/
endif

" Required:
call neobundle#begin(expand('/home/julian/.config/nvim/bundle'))

" Let NeoBundle manage NeoBundle
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'

" Add or remove your Bundles here:
NeoBundle 'Shougo/neosnippet.vim'
NeoBundle 'Shougo/neosnippet-snippets'
NeoBundle 'tpope/vim-fugitive'
NeoBundle 'ctrlpvim/ctrlp.vim'
NeoBundle 'flazz/vim-colorschemes'
NeoBundle 'neoclide/coc.nvim', 'release', { 'build': { 'others': 'git checkout release' } }
NeoBundle 'vim-airline/vim-airline'
NeoBundle 'vim-airline/vim-airline-themes'
NeoBundle 'sheerun/vim-polyglot'
NeoBundle 'shougo/denite.nvim'
NeoBundle 'morhetz/gruvbox'
NeoBundle 'aurieh/discord.nvim'

" You can specify revision/branch/tag.
NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' }

" Required:
call neobundle#end()

" Required:
filetype plugin indent on

" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck
"End NeoBundle Scripts-------------------------

" cbt
autocmd FileType denite call s:denite_my_settings()
function! s:denite_my_settings() abort
nnoremap <silent><buffer><expr> <CR>
\ denite#do_map('do_action')
nnoremap <silent><buffer><expr> d
\ denite#do_map('do_action', 'delete')
nnoremap <silent><buffer><expr> p
\ denite#do_map('do_action', 'preview')
nnoremap <silent><buffer><expr> q
\ denite#do_map('quit')
nnoremap <silent><buffer><expr> i
\ denite#do_map('open_filter_buffer')
nnoremap <silent><buffer><expr> <Space>
\ denite#do_map('toggle_select').'j'
endfunction

let g:airline_powerline_fonts = 1
let g:airline_theme='base16_gruvbox_dark_hard'
set shortmess=I " Read :help shortmess for everything else.
set number
set tabstop=4
set ts=4
set sw=4

colorscheme gruvbox

syntax on
hi Normal ctermbg=none

+ 415
- 0
config/dunst/dunstrc View File

@@ -0,0 +1,415 @@
[global]
### Display ###

# Which monitor should the notifications be displayed on.
monitor = 0

# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything
#
# "keyboard" needs a window manager that exports the
# _NET_ACTIVE_WINDOW property.
# This should be the case for almost all modern window managers.
#
# If this option is set to mouse or keyboard, the monitor option
# will be ignored.
follow = mouse

# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
# The geometry of the message window.
# The height is measured in number of notifications everything else
# in pixels. If the width is omitted but the height is given
# ("-geometry x2"), the message window expands over the whole screen
# (dmenu-like). If width is 0, the window expands to the longest
# message displayed. A positive x is measured from the left, a
# negative from the right side of the screen. Y is measured from
# the top and down respectively.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "1920x5-30+20"

# Show how many messages are currently hidden (because of geometry).
indicate_hidden = yes

# Shrink window if it's smaller than the width. Will be ignored if
# width is 0.
shrink = yes

# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 80

# The height of the entire notification. If the height is smaller
# than the font height and padding combined, it will be raised
# to the font height and padding.
notification_height = 0

# Draw a line of "separator_height" pixel height between two
# notifications.
# Set to 0 to disable.
separator_height = 0

# Padding between text and separator.
padding = 8

# Horizontal padding.
horizontal_padding = 5

# Defines width in pixels of frame around the notification window.
# Set to 0 to disable.
frame_width = 3

# Defines color of the frame around the notification window.
frame_color = "#fbf1c7"

# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = frame

# Sort messages by urgency.
sort = yes

# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
# A client can set the 'transient' hint to bypass this. See the rules
# section for how to disable this if necessary
idle_threshold = 120

### Text ###

font = Inconsolata 10

# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
line_height = 0

# Possible values are:
# full: Allow a small subset of html markup in notifications:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
# <https://developer.gnome.org/pango/stable/pango-Markup.html>.
#
# strip: This setting is provided for compatibility with some broken
# clients that send markup even though it's not enabled on the
# server. Dunst will try to strip the markup but the parsing is
# simplistic so using this option outside of matching rules for
# specific applications *IS GREATLY DISCOURAGED*.
#
# no: Disable markup parsing, incoming notifications will be treated as
# plain text. Dunst will not advertise that it has the body-markup
# capability if this is set as a global setting.
#
# It's important to note that markup inside the format option will be parsed
# regardless of what this is set to.
markup = full

# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# %n progress value if set without any extra characters
# %% Literal %
# Markup is allowed
format = "<b>%s</b>\n%b"

# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = right

# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 60

# Split notifications into multiple lines if they don't fit into
# geometry.
word_wrap = yes

# When word_wrap is set to no, specify where to make an ellipsis in long lines.
# Possible values are "start", "middle" and "end".
ellipsize = middle

# Ignore newlines '\n' in notifications.
ignore_newline = no

# Stack together notifications with the same content
stack_duplicates = true

# Hide the count of stacked notifications with the same content
hide_duplicate_count = false

# Display indicators for URLs (U) and actions (A).
show_indicators = yes

### Icons ###

# Align icons left/right/off
icon_position = off

# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 32

# Paths to default icons.
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/

### History ###

# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = yes

# Maximum amount of notifications kept in history
history_length = 20

### Misc/Advanced ###

# dmenu path.
dmenu = /usr/bin/dmenu -p dunst:

# Browser for opening urls in context menu.
browser = /usr/bin/firefox -new-tab

# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true

# Define the title of the windows spawned by dunst
title = Dunst

# Define the class of the windows spawned by dunst
class = Dunst

# Print a notification on startup.
# This is mainly for error detection, since dbus (re-)starts dunst
# automatically after a crash.
startup_notification = false

# Manage dunst's desire for talking
# Can be one of the following values:
# crit: Critical features. Dunst aborts
# warn: Only non-fatal warnings
# mesg: Important Messages
# info: all unimportant stuff
# debug: all less than unimportant stuff
verbosity = mesg

# Define the corner radius of the notification window
# in pixel size. If the radius is 0, you have no rounded
# corners.
# The radius will be automatically lowered if it exceeds half of the
# notification height to avoid clipping text and/or icons.
corner_radius = 0

### Legacy

# Use the Xinerama extension instead of RandR for multi-monitor support.
# This setting is provided for compatibility with older nVidia drivers that
# do not support RandR and using it on systems that support RandR is highly
# discouraged.
#
# By enabling this setting dunst will not be able to detect when a monitor
# is connected or disconnected which might break follow mode if the screen
# layout changes.
force_xinerama = false

### mouse

# Defines action of mouse event
# Possible values are:
# * none: Don't do anything.
# * do_action: If the notification has exactly one action, or one is marked as default,
# invoke it. If there are multiple and no default, open the context menu.
# * close_current: Close current notification.
# * close_all: Close all notifications.
mouse_left_click = close_current
mouse_middle_click = do_action
mouse_right_click = close_all

# Experimental features that may or may not work correctly. Do not expect them
# to have a consistent behaviour across releases.
[experimental]
# Calculate the dpi to use on a per-monitor basis.
# If this setting is enabled the Xft.dpi value will be ignored and instead
# dunst will attempt to calculate an appropriate dpi value for each monitor
# using the resolution and physical size. This might be useful in setups
# where there are multiple screens with very different dpi values.
per_monitor_dpi = false

[shortcuts]

# Shortcuts are specified as [modifier+][modifier+]...key
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
# "mod3" and "mod4" (windows-key).
# Xev might be helpful to find names for keys.

# Close notification.
close = ctrl+space

# Close all notifications.
close_all = ctrl+shift+space

# Redisplay last message(s).
# On the US keyboard layout "grave" is normally above TAB and left
# of "1". Make sure this key actually exists on your keyboard layout,
# e.g. check output of 'xmodmap -pke'
history = ctrl+grave

# Context menu.
context = ctrl+shift+period

[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#282828"
foreground = "#928374"
timeout = 10
# Icon for notifications with low urgency, uncomment to enable
#icon = /path/to/icon

[urgency_normal]
background = "#3c3836"
foreground = "#fbf1c7"
timeout = 10
# Icon for notifications with normal urgency, uncomment to enable
#icon = /path/to/icon

[urgency_critical]
background = "#cc241d"
foreground = "#fbf1c7"
# frame_color = "#ff0000"
timeout = 0
# Icon for notifications with critical urgency, uncomment to enable
#icon = /path/to/icon

# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
#
# Messages can be matched by
# appname (discouraged, see desktop_entry)
# body
# category
# desktop_entry
# icon
# match_transient
# msg_urgency
# stack_tag
# summary
#
# and you can override the
# background
# foreground
# format
# frame_color
# fullscreen
# new_icon
# set_stack_tag
# set_transient
# timeout
# urgency
#
# Shell-like globbing will get expanded.
#
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
# GLib based applications export their desktop-entry name. In comparison to the appname,
# the desktop-entry won't get localized.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: if you don't want a notification to be displayed, set the format
# to "".
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.

# Disable the transient hint so that idle_threshold cannot be bypassed from the
# client
#[transient_disable]
# match_transient = yes
# set_transient = no
#
# Make the handling of transient notifications more strict by making them not
# be placed in history.
#[transient_history_ignore]
# match_transient = yes
# history_ignore = yes

# fullscreen values
# show: show the notifications, regardless if there is a fullscreen window opened
# delay: displays the new notification, if there is no fullscreen window active
# If the notification is already drawn, it won't get undrawn.
# pushback: same as delay, but when switching into fullscreen, the notification will get
# withdrawn from screen again and will get delayed like a new notification
#[fullscreen_delay_everything]
# fullscreen = delay
#[fullscreen_show_critical]
# msg_urgency = critical
# fullscreen = show

#[espeak]
# summary = "*"
# script = dunst_espeak.sh

#[script-test]
# summary = "*script*"
# script = dunst_test.sh

#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# format = ""

#[history-ignore]
# # This notification will not be saved in history
# summary = "foobar"
# history_ignore = yes

#[skip-display]
# # This notification will not be displayed, but will be included in the history
# summary = "foobar"
# skip_display = yes

#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
# urgency = low
#
#[signed_off]
# appname = Pidgin
# summary = *signed off*
# urgency = low
#
#[says]
# appname = Pidgin
# summary = *says*
# urgency = critical
#
#[twitter]
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#
#[stack-volumes]
# appname = "some_volume_notifiers"
# set_stack_tag = "volume"
#
# vim: ft=cfg


+ 1
- 0
config/dunst/reload View File

@@ -0,0 +1 @@
killall dunst; notify-send foo

+ 1
- 1
config/htop/htoprc View File

@@ -12,7 +12,7 @@ show_program_path=1
highlight_base_name=0
highlight_megabytes=1
highlight_threads=1
tree_view=0
tree_view=1
header_margin=1
detailed_cpu_time=0
cpu_count_from_zero=0


+ 2
- 2
config/i3/config View File

@@ -176,9 +176,9 @@ gaps outer 5
for_window [class="^.*"] border pixel 0

# startup scripts
exec_always feh --bg-scale $HOME/Pictures/lightdmbg.png
exec_always feh --bg-scale $HOME/Pictures/Garf.jpg
exec_always --no-startup-id $HOME/.config/polybar/launch.sh #polybar
exec_always --no-startup-id redshift #redshit
exec_always --no-startup-id ~/.config/i3/redshift.sh #redshit

# binds
bindsym $mod+shift+x exec ~/.config/i3/script #i3lock


+ 10
- 0
config/i3/launch.sh View File

@@ -0,0 +1,10 @@
#!/usr/bin/env sh

# Terminate already running bar instances
killall -q compton

# Wait until the processes have been shut down
while pgrep -x compton >/dev/null; do sleep 1; done

# Launch polybar
compton -b --config /home/julian/.config/compton.conf

+ 10
- 0
config/i3/redshift.sh View File

@@ -0,0 +1,10 @@
#!/usr/bin/env sh

# Terminate already running bar instances
killall -q redshift

# Wait until the processes have been shut down
while pgrep -x redshift >/dev/null; do sleep 1; done

# Launch polybar
redshift

+ 1
- 1
config/neofetch/config.conf View File

@@ -624,7 +624,7 @@ disk_display="off"
# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',
# 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
# Flag: --backend
image_backend="w3m"
image_backend="ascii"

# Image Source
#


+ 54
- 0
config/redshift.conf View File

@@ -0,0 +1,54 @@
; Global settings for redshift
[redshift]
; Set the day and night screen temperatures
temp-day=5700
temp-night=3500

; Enable/Disable a smooth transition between day and night
; 0 will cause a direct change from day to night screen temperature.
; 1 will gradually increase or decrease the screen temperature.
transition=1

; Set the screen brightness. Default is 1.0.
;brightness=0.9
; It is also possible to use different settings for day and night
; since version 1.8.
;brightness-day=0.7
;brightness-night=0.4
; Set the screen gamma (for all colors, or each color channel
; individually)
gamma=0.8
;gamma=0.8:0.7:0.8
; This can also be set individually for day and night since
; version 1.10.
;gamma-day=0.8:0.7:0.8
;gamma-night=0.6

; Set the location-provider: 'geoclue', 'geoclue2', 'manual'
; type 'redshift -l list' to see possible values.
; The location provider settings are in a different section.
location-provider=geoclue

; Set the adjustment-method: 'randr', 'vidmode'
; type 'redshift -m list' to see all possible values.
; 'randr' is the preferred method, 'vidmode' is an older API.
; but works in some cases when 'randr' does not.
; The adjustment method settings are in a different section.
adjustment-method=randr

; Configuration of the location-provider:
; type 'redshift -l PROVIDER:help' to see the settings.
; ex: 'redshift -l manual:help'
; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
; are negative numbers.
[manual]
lat=48.1
lon=11.6

; Configuration of the adjustment-method
; type 'redshift -m METHOD:help' to see the settings.
; ex: 'redshift -m randr:help'
; In this example, randr is configured to adjust screen 1.
; Note that the numbering starts from 0, so this is actually the
; second screen. If this option is not specified, Redshift will try
; to adjust _all_ screens.

+ 134
- 0
elixire/elixiremanager.sh View File

@@ -0,0 +1,134 @@
#!/bin/bash

readonly prog_name="elixiremanager"
readonly prog_ver="7.0"

#defaults
readonly apiurl="https://elixi.re/api"
readonly apikey="No Key For You, Fucker"
mode=area
wayland=false
is_admin=""
readonly filename_format="/tmp/elixire-$(date +%Y-%m-%dT%H:%M:%S).png"
readonly upload_connect_timeout="5"
readonly upload_timeout="120"
readonly upload_retries="1"

function usage() {
echo "usage: ${1} [options] [filename]"
echo "options:"
echo " -h, --help print this help and exit"
echo " -v, --version print version number and exit"
echo " --check check dependencies and exit"
echo " -a, --area select an area to upload"
echo " -f, --full upload the full screen"
echo " -k, --keep keep the file after uploading"
echo " -w, --wayland run in Wayland mode"
echo " -x, --xorg run in Xorg mode"
echo " --admin upload as an admin"
echo " --noadmin upload as a user"
}

function version() {
echo "$prog_name $prog_ver"
}

function check_deps() {
for i in date jq notify-send curl; do
(which $i &>/dev/null) && echo "OK: found $i" || echo "ERROR: $i not found"
done

if [[ $wayland == "true" ]]; then
for i in grim slurp; do
(which $i &>/dev/null) && echo "OK: found $i" || echo "ERROR: $i not found"
done
(which wl-copy &>/dev/null) && echo "OK: found wl-clipboard" || echo "ERROR: wl-clipboard not found"
else
(which escrotum &>/dev/null) && echo "OK: escrotum found (sidenote: you need it through python2, and you need to install pygtk)" || echo "ERROR: escrotum not found"
(which xclip &>/dev/null) && echo "OK: found xclip" || echo "ERROR: xclip not found"
fi
}

function take_screenshot() {
if [[ $1 == "area" ]]; then
if [[ $wayland == "true" ]]; then
grim -g "$(slurp)" "${2}"
else
escrotum -s "${2}"
fi
else
if [[ $wayland == "true" ]]; then
grim "${2}"
else
escrotum "${2}"
fi
fi
}

function upload_file_and_notify() {
response=$(curl --compressed --connect-timeout ${upload_connect_timeout} -m ${upload_timeout} --retry ${upload_retries} -H "Authorization: ${apikey}" -F [email protected]"${1}" ${apiurl}/upload${is_admin} | jq .url -r | tr -d '\n')

if [[ ! -z "${response}" ]]; then
if [[ $wayland == "true" ]]; then
echo -en "elixire upload complete. you are now registered to use club penguin" | wl-copy
else
echo -en "${response}" | xclip -selection clipboard
fi
notify-send -t 5000 "you are now registered to use club penguin" "${response}" -i "${1}" --hint=int:transient:1
else
notify-send -t 5000 "Error!" --hint=int:transient:1
fi
}

while [[ $# != 0 ]]; do
case "${1}" in
--help | -h)
usage ${0}
exit 0 ;;
--version | -v)
version ${0}
exit 0 ;;
--check)
check_deps
exit 0 ;;
--area | -a)
mode=area
shift ;;
--full | -f)
mode=full
shift ;;
--keep | -k)
keep=true
shift ;;
--wayland | -w)
wayland=true
shift ;;
--xorg | -x)
wayland=false
shift ;;
--admin)
is_admin="?admin=true"
shift ;;
--noadmin)
is_admin=""
shift ;;
*)
file_provided=true
file="${1}"
shift ;;
esac
done

if [[ -z $file ]]; then
file="${filename_format}"
fi

if [[ -z $file_provided ]]; then
take_screenshot $mode "${file}"
fi

upload_file_and_notify "${file}"

if [[ -z $file_provided && -z $keep ]]; then
rm -f "${file}"
fi

+ 37
- 0
elixire/screenie View File

@@ -0,0 +1,37 @@
#!/bin/bash

# screenie - capture a screenshot and use elixiremanager to send to
# elixi.re. uses flameshot as a drop-in replacement for kshare "editing
# before sending" mechanic

# based off lynnesbian's sshotr.sh,
# https://gist.github.com/Lynnesbian/203e2a90a312cd02880f8e5762c01797

# this:
# - uses ~/Screenshots as a folder to store them all
# - requires notify-send, elixiremanager.sh requires it as well, so.
# - uses flameshot, more @ https://github.com/lupoDharkael/flameshot

# change this if wanted
screenshot_folder="$HOME/Screenshots"

# set this to the path for elixiremanager.sh
elixiremanager="$HOME/elixire/elixiremanager.sh"

mkdir -p $screenshot_folder
date_str=$(date +'%Y-%m-%d-%H_%M_%S')
target="$screenshot_folder/screenie-$date_str.png"

flameshot gui -d 250 -r > "$target"

# flameshot just writes that as raw text on the target so its
# very easy
grep 'screenshot aborted' $target

# if it succeeds then we just stop etc
if [ $? -eq 0 ]; then
notify-send "rip"
else
notify-send "logging into club penguin"
$elixiremanager "$target"
fi

BIN
pictures/Garf.jpg View File

Before After
Width: 720  |  Height: 478  |  Size: 45 KiB

BIN
pictures/lightdmbg.png View File

Before After
Width: 1920  |  Height: 1080  |  Size: 986 KiB

Loading…
Cancel
Save