mirror of
https://github.com/davegallant/nix-config
synced 2025-08-07 13:22:28 +00:00
Add rfd python package nix overlay (#11)
* Add python3.8 * Add rfd python package overlay
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
#! /bin/sh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
p='sxhkd stalonetray lemonbar'
|
||||||
|
for i in $p; do pkill "$i"; done
|
||||||
|
|
||||||
sxhkd &
|
sxhkd &
|
||||||
|
|
||||||
@@ -47,5 +50,5 @@ fi
|
|||||||
|
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
xdo above -t "$(xdo id -n root)" "$(xdo id -n stalonetray)"
|
|
||||||
xdo above -t "$(xdo id -n root)" "$(xdo id -n lemonbar)"
|
xdo above -t "$(xdo id -n root)" "$(xdo id -n lemonbar)"
|
||||||
|
xdo above -t "$(xdo id -n lemonbar)" "$(xdo id -n stalonetray)"
|
||||||
|
@@ -41,21 +41,18 @@ ActiveWindow() {
|
|||||||
echo -n " %{F$grey}[ $title ]%{F-}%{B-}"
|
echo -n " %{F$grey}[ $title ]%{F-}%{B-}"
|
||||||
}
|
}
|
||||||
|
|
||||||
Weather() {
|
|
||||||
echo '(' "$(curl -Ss 'https://wttr.in/yxu?0&T&Q' 2>/dev/null | cut -c 16- | head -2 | xargs echo)" ')'
|
|
||||||
}
|
|
||||||
|
|
||||||
Ip() {
|
Ip() {
|
||||||
dig +short myip.opendns.com @resolver1.opendns.com
|
dig +short myip.opendns.com @resolver1.opendns.com
|
||||||
}
|
}
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
|
|
||||||
if ! (($(date '+%s') % 60)); then
|
if ! (($(date '+%s') % 60)); then
|
||||||
ip=$(Ip)
|
ip=$(Ip)
|
||||||
weather=$(Weather)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
desktop_name=$(bspc query -D -d focused --names)
|
desktop_name=$(bspc query -D -d focused --names)
|
||||||
panel_info=$(echo -e "%{c}[$desktop_name] $(ActiveWindow)" "%{r}$weather $ip $(Calendar)$(Clock)$(Battery)")
|
panel_info=$(echo -e "%{c}[$desktop_name] $(ActiveWindow)" "%{r}$ip $(Calendar)$(Clock)$(Battery)")
|
||||||
# List of all the monitors/screens
|
# List of all the monitors/screens
|
||||||
monitors=$(xrandr | grep -o "^.* connected" | sed "s/ connected//")
|
monitors=$(xrandr | grep -o "^.* connected" | sed "s/ connected//")
|
||||||
tmp=0
|
tmp=0
|
||||||
|
@@ -37,11 +37,12 @@
|
|||||||
nmap
|
nmap
|
||||||
openvpn
|
openvpn
|
||||||
postman
|
postman
|
||||||
python3
|
python38
|
||||||
|
rfd
|
||||||
ripgrep
|
ripgrep
|
||||||
ruby
|
|
||||||
rustup
|
rustup
|
||||||
shellcheck
|
shellcheck
|
||||||
|
shfmt
|
||||||
signal-desktop
|
signal-desktop
|
||||||
slack
|
slack
|
||||||
spotify
|
spotify
|
||||||
@@ -56,7 +57,7 @@
|
|||||||
zathura
|
zathura
|
||||||
zip
|
zip
|
||||||
zsh-autosuggestions
|
zsh-autosuggestions
|
||||||
zsh-syntax-highlighting
|
zsh-fast-syntax-highlighting
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
@@ -71,14 +72,14 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
eval "$(direnv hook zsh)"
|
|
||||||
eval "$(_RFD_COMPLETE=source_zsh rfd)"
|
|
||||||
eval "$(starship init zsh)"
|
|
||||||
|
|
||||||
export EDITOR='neovim'
|
export EDITOR='neovim'
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
export GOPATH=$HOME/go
|
export GOPATH=$HOME/go
|
||||||
source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
export PATH=$PATH:~/.local/bin
|
||||||
|
|
||||||
|
eval "$(direnv hook zsh)"
|
||||||
|
eval "$(_RFD_COMPLETE=source_zsh rfd)"
|
||||||
|
eval "$(starship init zsh)"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
@@ -99,8 +100,8 @@
|
|||||||
|
|
||||||
plugins = [
|
plugins = [
|
||||||
{
|
{
|
||||||
name = "syntax-highlighting";
|
name = "fast-syntax-highlighting";
|
||||||
src = "${pkgs.zsh-syntax-highlighting}/share/zsh/site-functions";
|
src = "${pkgs.zsh-fast-syntax-highlighting}/share/zsh/site-functions";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
39
.config/nixpkgs/overlays/rfd.nix
Normal file
39
.config/nixpkgs/overlays/rfd.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
self: super:
|
||||||
|
rec {
|
||||||
|
|
||||||
|
python3 = with super; super.python3.override {};
|
||||||
|
|
||||||
|
pythonPackages = python3.pkgs;
|
||||||
|
|
||||||
|
rfd = with self; pythonPackages.buildPythonApplication rec {
|
||||||
|
pname = "rfd";
|
||||||
|
version = "v0.3.4";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "davegallant";
|
||||||
|
repo = "rfd";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "08f9xsw5h35p5sbljrv7vrzvdz17icgr85n7507p27fcg0yphd0s";
|
||||||
|
};
|
||||||
|
|
||||||
|
# No tests included
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
propagatedBuildInputs = with pythonPackages; [
|
||||||
|
beautifulsoup4
|
||||||
|
click
|
||||||
|
colorama
|
||||||
|
requests
|
||||||
|
];
|
||||||
|
|
||||||
|
passthru.python3 = python3;
|
||||||
|
|
||||||
|
meta = with super.lib; {
|
||||||
|
homepage = "https://www.redflagdeals.com/";
|
||||||
|
description = "View RedFlagDeals from the command line";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = [ ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
Reference in New Issue
Block a user