Commit 3b28dd0d authored by Benedikt Vollmerhaus's avatar Benedikt Vollmerhaus

Add fish config, Fix minor code style issues in Polybar module

parent 4bbc99b9
This local fish plugin contains my custom functions and config files to keep
them separate from other plugins installed through the Fisher plugin manager
(which installs plugins in the standard conf.d/ and functions/ directories).
# Abbreviations for working with Git.
#
# Author: Benedikt Vollmerhaus
# License: MIT
if status --is-interactive
abbr -a gcl 'git clone'
abbr -a gf 'git fetch'
abbr -a gm 'git merge'
abbr -a gcp 'git cherry-pick'
# Stage
abbr -a ga 'git add'
abbr -a gall 'git add -A'
abbr -a grm 'git rm'
# Commit
abbr -a gc 'git commit'
abbr -a gca 'git commit -a'
abbr -a gcm 'git commit -m'
abbr -a gcam 'git commit -am'
abbr -a gcma 'git commit -am'
abbr -a gci 'git commit -i'
# Push/Pull
abbr -a gp 'git push'
abbr -a gl 'git pull'
abbr -a gpl 'git pull'
abbr -a gpp 'git pull && git push'
# Checkout
abbr -a gco 'git checkout'
abbr -a gcob 'git checkout -b'
abbr -a gcom 'git checkout master'
# Tag
abbr -a gt 'git tag'
abbr -a gta 'git tag -a'
abbr -a gtd 'git tag -d'
abbr -a gtl 'git tag -l'
# Other
abbr -a gd 'git diff'
abbr -a gs 'git status'
abbr -a gss 'git status -s'
# Submodules
abbr -a gsm 'git submodule'
abbr -a gsmu 'git submodule update --remote --merge'
end
function count_everything -d "Recursively count files and directories in the given directory"
set -l count (find $argv | wc -l)
printf "Recursively found %d files and directories in %s" $count $argv
end
function count_files -d "Recursively count files in the given directory"
set -l count (find $argv -type f | wc -l)
printf "Recursively found %d files in %s" $count $argv
end
function docker_bash -d "Open a Bash in the given Docker container (by ID)"
docker exec -t -i $argv /bin/bash
end
# Author: Benedikt Vollmerhaus
# License: MIT
# Add local pip package directory to path
set -gx PATH ~/.local/bin $PATH
# Add local Ruby gems directory to path
set -gx PATH ~/.gem/ruby/2.6.0/bin $PATH
if not functions -q fisher
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
fish -c fisher
end
~/dotfiles/config/fish-custom
laughedelic/pisces
......@@ -25,7 +25,7 @@ gi.require_version('Playerctl', '1.0')
from gi.repository import Playerctl, GLib
class NowPlaying(object):
class NowPlaying:
"""
Retrieve and print the metadata of the currently playing track.
"""
......@@ -47,7 +47,6 @@ class NowPlaying(object):
:return: None
"""
self.wait_for_player()
main = GLib.MainLoop()
main.run()
......@@ -58,7 +57,6 @@ class NowPlaying(object):
:return: None
"""
while True:
try:
self.player = Playerctl.Player()
......@@ -95,7 +93,6 @@ class NowPlaying(object):
:param data: The currently playing track's metadata
:return: None
"""
if self.ARTIST in data.keys() and self.TITLE in data.keys():
self.artist = data[self.ARTIST][0]
self.title = data[self.TITLE]
......@@ -114,7 +111,6 @@ class NowPlaying(object):
:return: None
"""
# Flushing the buffer forces Python to write to stdout. This is
# required due to the script being continuously tail'ed through
# Polybar, which would otherwise lead to not getting any output.
......
......@@ -11,9 +11,13 @@
- link:
~/.config/i3/config: config/i3/config
~/.config/i3/:
# Symlink WM scripts in i3 directory
glob: true
path: scripts/window-manager/*
~/.config/fish/config.fish: config/fish/config.fish
~/.config/fish/fishfile: config/fish/fishfile
~/.config/ranger/commands.py: config/ranger/commands.py
~/.config/ranger/rc.conf: config/ranger/rc.conf
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment