Clean up unused utilities

main
Ensar Sarajčić 2022-05-05 15:07:33 +02:00
parent e2ed5f4381
commit 3d6ebd5e10
38 changed files with 4 additions and 661 deletions

View File

@ -184,7 +184,6 @@ link_termux: check_os link_apps_config
.PHONY: link_xconfig
link_xconfig: check_os
@echo "Linking X config files..."
$(call link,xinitrc,.xinitrc)
$(call link,zprofile,.zprofile)
.PHONY: link_i3config

View File

@ -4,11 +4,6 @@
cd ~
# Switch to ZSH shell
if test -t 1; then
exec zsh
fi
# If not running interactively, don't do anything
case $- in
*i*) ;;
@ -123,7 +118,5 @@ if ! shopt -oq posix; then
fi
fi
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
source "$HOME/.cargo/env"
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash

View File

@ -1,4 +0,0 @@
#!/bin/bash
id=`$HOME/bin/i3-id-list`
sway-msg [id="$id"] focus > /dev/null

View File

@ -1,64 +0,0 @@
#!/bin/python2
import json
import subprocess
"""
Execute the given command and return the
output as a list of lines
"""
def command_output(cmd):
output = []
if (cmd):
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, \
stderr=subprocess.STDOUT)
for line in p.stdout.readlines():
output.append(line.rstrip())
return output
def output_to_dict(output_list):
output_string = ""
for line in output_list:
output_string += line
return json.loads(output_string)
def find_windows(tree_dict, window_list):
if (tree_dict.has_key("nodes") and len(tree_dict["nodes"]) > 0):
for node in tree_dict["nodes"]:
find_windows(node, window_list)
else:
if (tree_dict["layout"] != "dockarea" and not tree_dict["name"].startswith("i3bar for output") and not tree_dict["window"] == None):
window_list.append(tree_dict)
return window_list
def main():
output = command_output("i3-msg -t get_tree")
tree = output_to_dict(output)
window_list = find_windows(tree, [])
next_index = -1
for i in range(len(window_list)):
if (window_list[i]["focused"] == True):
next_index = i+1
break
# next_index = len(window_list)
# for i in range(len(window_list)-1, -1, -1):
# if (window_list[i]["focused"] == True):
# next_index = i-1
# break
next_id = 0;
if next_index == -1 or next_index == len(window_list):
next_id = window_list[0]["window"]
else:
next_id = window_list[next_index]["window"]
print next_id
main()

View File

@ -1,9 +0,0 @@
#!/usr/bin/env bash
SERVER=$1
VERSION=$2
echo "lspinstall is deprecated!"
echo "calling 'lsp install $SERVER $VERSION' instead"
echo ""
lsp install $SERVER $VERSION

View File

@ -1,64 +0,0 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
# newsboat-yt-feed.rb
# Author: William Woodruff
# ------------------------
# Adds a YouTube channel to newsboat.
# Works with both old (/user/) and new (/channel/)-style YouTube channels.
# ------------------------
# This code is licensed by William Woodruff under the MIT License.
# http://opensource.org/licenses/MIT
require "uri"
DEPS = [
"newsboat",
].freeze
NEWSBOAT_URL_FILES = [
# is this is right precedence?
File.expand_path("~/.config/newsboat/urls"),
].freeze
YOUTUBE_FEED_URLS = {
chan: "https://www.youtube.com/feeds/videos.xml?channel_id=%<id>s",
user: "https://www.youtube.com/feeds/videos.xml?user=%<id>s",
}.freeze
def which?(cmd)
ENV["PATH"].split(File::PATH_SEPARATOR).any? do |path|
File.executable?(File.join(path, cmd))
end
end
def add_feed!(feed_url)
url_file = NEWSBOAT_URL_FILES.find { |f| File.exist? f }
File.open(url_file, "a") { |io| io.puts "#{feed_url} \"YouTube\"" }
end
abort "Usage: #{$PROGRAM_NAME} <channel url>" if ARGV.empty?
DEPS.each { |d| abort "Fatal: Missing '#{d}'." unless which? d }
chan_url = URI(ARGV.shift)
if chan_url.host.nil? || /youtube/i !~ chan_url.host || chan_url.path.empty?
abort "Fatal: Not a valid channel URL."
end
type, id = chan_url.path.split("/")[1..2]
case type
when "channel"
feed_url = YOUTUBE_FEED_URLS[:chan] % { id: id }
when "user"
feed_url = YOUTUBE_FEED_URLS[:user] % { id: id }
else
abort "Fatal: Ambiguous channel URL (or not a channel URL)."
end
add_feed!(feed_url)
puts "Added #{feed_url} to newsboat."

View File

@ -1,10 +0,0 @@
#!/bin/sh
$MY_THEMES_DIR/select-theme "$(<$MY_THEMES_DIR/current-theme)"
# Assemble configurations
$MY_CONFIG_DIR/termite/assemble-termite-config
$MY_CONFIG_DIR/dunst/assemble-dunst-config
# Application specific reloadings
killall -USR1 termite
xrdb ~/.config/X11/Xresources

View File

@ -1,18 +0,0 @@
#!/bin/bash
function get_themes()
{
ls -l --time-style="long-iso" $MY_THEMES_DIR | egrep '^d' | awk '{print $8}'
}
THEME=$( (echo empty; get_themes) | rofi -dmenu -only-match -p "Select theme:")
if [ x"empty" = x"${THEME}" ]
then
echo "No operation."
elif [ -n "${THEME}" ]
then
echo $THEME > $MY_THEMES_DIR/current-theme
~/bin/settings/reload-configurations
i3-msg restart
fi

View File

@ -1,3 +1,3 @@
#!/bin/sh
termite --name "download" -e "update-all-packages"
alacritty --name "download" -e "update-all-packages"

View File

@ -1,43 +0,0 @@
#!/bin/sh
source $HOME/.zshrc
userresources=$HOME/.config/X11/Xresources
usermodmap=$HOME/.config/X11/Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*. ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
# Start up profile files
[ -f /etc/xprofile ] && . /etc/xprofile
[ -f ~/.config/X11/xprofile ] && . ~/.config/X11/xprofile
exec i3

View File

@ -46,7 +46,7 @@ ZSH_THEME="agnoster"
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git mix)
plugins=(git mix asdf)
# User configuration

1
themes/.gitignore vendored
View File

@ -1 +0,0 @@
current-theme

View File

@ -1,3 +0,0 @@
## Themes
This directory contains themes that can only be used in **Arch** configuration. These scripts may work only for specific applications and specific window mangers.

View File

@ -1,24 +0,0 @@
colors:
primary:
background: '#282828'
foreground: '#ebdbb2'
normal:
black: '#282828'
red: '#cc241d'
green: '#98971a'
yellow: '#d79921'
blue: '#458588'
magenta: '#b16286'
cyan: '#689d6a'
white: '#a89984'
bright:
black: '#928374'
red: '#fb4934'
green: '#b8bb26'
yellow: '#fabd2f'
blue: '#83a598'
magenta: '#d3869b'
cyan: '#8ec07c'
white: '#ebdbb2'

View File

@ -1,23 +0,0 @@
#define c00 #282828
#define c01 #cc241d
#define c02 #98971a
#define c03 #d79921
#define c04 #458588
#define c05 #b16286
#define c06 #689d6a
#define c07 #a89984
#define c08 #928374
#define c09 #fb4934
#define c10 #b8bb26
#define c11 #fabd2f
#define c12 #83a598
#define c13 #d3869b
#define c14 #8ec07c
#define c15 #ebdbb2
#define cbg c00
#define cfg c15
#define cfg c11
#define cfc c08
#define ccc c14
#define cpcbg c10
#define cpcfg c14

View File

@ -1,21 +0,0 @@
# Gruvbox dark color theme
[frame]
width = 2
color = "#ebdbb2"
[urgency_low]
foreground = "#ebdbb2"
background = "#1d2021"
timeout = 10
[urgency_normal]
foreground = "#ebdbb2"
background = "#1d2021"
timeout = 10
[urgency_critical]
foreground = "#ebdbb2"
background = "#1d2021"
timeout = 10

View File

@ -1,2 +0,0 @@
#!/bin/sh
feh --randomize --bg-fill ~/.config/wallpapers/gruvbox-dark/*

View File

@ -1,18 +0,0 @@
# Newsboat colour scheme to work with the Gruvbox palette
# Custom made based on https://github.com/morhetz/gruvbox
color background color235 default
color listnormal color223 default
color listnormal_unread color106 default
color listfocus color109 color243
color listfocus_unread color214 color243
color info color66 color236
color article color72 default
# highlights
highlight article "^(Feed|Link):.*$" color106 default bold
highlight article "^(Title|Date|Author):.*$" color106 default bold
highlight article "https?://[^ ]+" color66 default underline
highlight article "\\[[0-9]+\\]" color132 default bold
highlight article "\\[image\\ [0-9]+\\]" color66 default bold
highlight feedlist "^─.*$" color106 color243 bold

View File

@ -1,5 +0,0 @@
# Set up colors of windows
client.focused #98971a #98971a #ebdbb2 #98971a
client.focused_inactive #282828 #282828 #a89984 #d3869b
client.unfocused #282828 #282828 #8ec07c #586e75
client.urgent #d33682 #d33682 #ebdbb2 #dc322f

View File

@ -1,41 +0,0 @@
# Gruvbox dark color scheme
[colors]
# hard contrast: background = #1d2021
background = #282828
# soft contrast: background = #32302f
foreground = #ebdbb2
foreground_bold = #ebdbb2
# dark0 + gray
color0 = #282828
color8 = #928374
# neutral_red + bright_red
color1 = #cc241d
color9 = #fb4934
# neutral_green + bright_green
color2 = #98971a
color10 = #b8bb26
# neutral_yellow + bright_yellow
color3 = #d79921
color11 = #fabd2f
# neutral_blue + bright_blue
color4 = #458588
color12 = #83a598
# neutral_purple + bright_purple
color5 = #b16286
color13 = #d3869b
# neutral_aqua + faded_aqua
color6 = #689d6a
color14 = #8ec07c
# light4 + light1
color7 = #a89984
color15 = #ebdbb2

View File

@ -1,2 +0,0 @@
colorscheme gruvbox
set background=dark

View File

@ -1,24 +0,0 @@
colors:
primary:
background: '#fbf1c7'
foreground: '#3c3836'
normal:
black: '#fbf1c7'
red: '#cc241d'
green: '#98971a'
yellow: '#d79921'
blue: '#458588'
magenta: '#b16286'
cyan: '#689d6a'
white: '#7c6f64'
bright:
black: '#928374'
red: '#9d0006'
green: '#79740e'
yellow: '#b57614'
blue: '#076678'
magenta: '#8f3f71'
cyan: '#427b58'
white: '#3c3836'

View File

@ -1,23 +0,0 @@
#define c00 #fdf4c1
#define c01 #cc241d
#define c02 #98971a
#define c03 #d79921
#define c04 #458588
#define c05 #b16286
#define c06 #689d6a
#define c07 #7c6f64
#define c08 #928374
#define c09 #9d0006
#define c10 #79740e
#define c11 #b57614
#define c12 #076678
#define c13 #b16286
#define c14 #427b58
#define c15 #3c3836
#define cbg #fbf1c7
#define cfg #3c3836
#define cfg c11
#define cfc c08
#define ccc c14
#define cpcbg c10
#define cpcfg c14

View File

@ -1,20 +0,0 @@
# Gruvbox light color theme
[frame]
width = 1
color = "#83a598"
[urgency_low]
background = "#282828"
foreground = "#ebdbb2"
timeout = 5
[urgency_normal]
background = "#282828"
foreground = "#ebdbb2"
timeout = 20
[urgency_critical]
background = "#282828"
foreground = "#ebdbb2"
timeout = 0

View File

@ -1,2 +0,0 @@
#!/bin/sh
feh --randomize --bg-fill ~/.config/wallpapers/gruvbox-light/*

View File

@ -1,40 +0,0 @@
# Gruvbox light theme
#
[colors]
# hard contrast: background = #f9f5d7
background = #fbf1c7
# soft contrast: background = #f2e5bc
foreground = #3c3836
foreground_bold = #3c3836
# light0 + gray
color0 = #fbf1c7
color8 = #928374
# neutral_red + faded_red
color1 = #cc241d
color9 = #9d0006
# neutral_green + faded_green
color2 = #98971a
color10 = #79740e
# neutral_yellow + faded_yellow
color3 = #d79921
color11 = #b57614
# neutral_blue + faded_blue
color4 = #458588
color12 = #076678
# neutral_purple + faded_purple
color5 = #b16286
color13 = #8f3f71
# neutral_aqua + faded_aqua
color6 = #689d6a
color14 = #427b58
# dark4 + dark1
color7 = #7c6f64
color15 = #3c3836

View File

@ -1 +0,0 @@
colorscheme gruvbox

View File

@ -1,36 +0,0 @@
#!/bin/bash
if [ -z $1 ]
then
echo "Missing theme argument"
exit
fi
theme=$1
themedir=$MY_THEMES_DIR/$theme
configdir=$MY_CONFIG_DIR
echo "Setting up $theme theme"
# move theme files
cp $themedir/colorlist $configdir/Xconfigfiles/colorlist
cp $themedir/termitetheme $configdir/termite/termitetheme
cp $themedir/dunstcolors $configdir/dunst/dunstcolors
cp $themedir/theme.vim $MY_VIM_HOME/theme.vim
cp $themedir/fehbg $configdir/other-scripts/fehbg
rm $configdir/alacritty/colors.yml.bak
mv $configdir/alacritty/colors.yml $configdir/alacritty/colors.yml.bak
rm $configdir/newsboat/colors.bak
mv $configdir/newsboat/colors $configdir/newsboat/colors.bak
ln -sT $themedir/alacritty_colors.yml $configdir/alacritty/colors.yml
ln -sT $themedir/sway_colors $configdir/sway/conf.d/99_colors_override
ln -sT $themedir/newsboatcolors $configdir/newsboat/colors
FG=black
if [[ $theme == *"light"* ]]; then
FG=white
fi
echo "PRIMARY_FG=$FG" > ~/.dotfiles/symlinks/zshrc.theme
echo "$theme detected as a $FG theme"
notify-send "$theme detected as $FG theme" --icon=dialog-information

View File

@ -1,23 +0,0 @@
! Colors !
#define c00 #073642
#define c01 #dc322f
#define c02 #859900
#define c03 #b58900
#define c04 #268bd2
#define c05 #d33682
#define c06 #2aa198
#define c07 #eee8d5
#define c08 #002b36
#define c09 #cb4b16
#define c10 #586e75
#define c11 #657b83
#define c12 #839496
#define c13 #6c71c4
#define c14 #93a1a1
#define c15 #fdf6e3
#define cbg c08
#define cfg c11
#define cfc c08
#define ccc c14
#define cpcbg c10
#define cpcfg c14

View File

@ -1,20 +0,0 @@
# Solarized color theme
[frame]
width = 1
color = "#93a1a1"
[urgency_low]
background = "#586e75"
foreground = "#eee8d5"
timeout = 10
[urgency_normal]
background = "#073642"
foreground = "#eee8d5"
timeout = 5
[urgency_critical]
background = "#dc322f"
foreground = "#eee8d5"
timeout = 0

View File

@ -1,2 +0,0 @@
#!/bin/sh
feh --randomize --bg-fill ~/.config/wallpapers/solarized-dark/*

View File

@ -1,29 +0,0 @@
# Solarized dark color scheme
[colors]
foreground = #839496
foreground_bold = #eee8d5
#foreground_dim = #888888
background = #002b36
cursor = #93a1a1
# if unset, will reverse foreground and background
#highlight = #839496
# colors from color0 to color254 can be set
color0 = #073642
color1 = #dc322f
color2 = #859900
color3 = #b58900
color4 = #268bd2
color5 = #d33682
color6 = #2aa198
color7 = #eee8d5
color8 = #002b36
color9 = #cb4b16
color10 = #586e75
color11 = #657b83
color12 = #839496
color13 = #6c71c4
color14 = #93a1a1
color15 = #fdf6e3

View File

@ -1,3 +0,0 @@
colorscheme solarized
set background=dark
let g:airline_solarized_bg='dark'

View File

@ -1,23 +0,0 @@
#define c08 #002b36
#define c00 #073642
#define c10 #586e75
#define c11 #657b83
#define c12 #839496
#define c14 #93a1a1
#define c07 #eee8d5
#define c15 #fdf6e3
#define c03 #b58900
#define c09 #cb4b16
#define c01 #dc322f
#define c05 #d33682
#define c13 #6c71c4
#define c04 #268bd2
#define c06 #2aa198
#define c02 #859900
#define cbg c15
#define cfg c11
#define cfc c15
#define ccc c10
#define cpcbg c14
#define cpcfg c10

View File

@ -1,18 +0,0 @@
# Solarized color theme
[urgency_low]
msg_urgency = low
background = "#eee8d5"
foreground = "#839496"
timeout = 10
[urgency_normal]
msg_urgency = normal
background = "#93a1a1"
foreground = "#586e75"
timeout = 5
[urgency_critical]
msg_urgency = critical
background = "#dc322f"
foreground = "#073642"
timeout = 0

View File

@ -1,2 +0,0 @@
#!/bin/sh
feh --randomize --bg-fill ~/.config/wallpapers/solarized-light/*

View File

@ -1,29 +0,0 @@
# Solarized light color scheme
[colors]
foreground = #657b83
foreground_bold = #073642
#foreground_dim = #888888
background = #fdf6e3
cursor = #586e75
# if unset, will reverse foreground and background
#highlight = #839496
# colors from color0 to color254 can be set
color0 = #073642
color1 = #dc322f
color2 = #859900
color3 = #b58900
color4 = #268bd2
color5 = #d33682
color6 = #2aa198
color7 = #eee8d5
color8 = #002b36
color9 = #cb4b16
color10 = #586e75
color11 = #657b83
color12 = #839496
color13 = #6c71c4
color14 = #93a1a1
color15 = #fdf6e3

View File

@ -1,2 +0,0 @@
colorscheme solarized
let g:airline_solarized_bg='light'