emoji-picker notification time, modify sb-scripts, xresources stuff
This commit is contained in:
parent
97ff165b02
commit
fd20921d1e
|
@ -56,9 +56,6 @@
|
||||||
width=$(${xorg.xwininfo}/bin/xwininfo -root | grep Width | sed "s/^.*:\s//")
|
width=$(${xorg.xwininfo}/bin/xwininfo -root | grep Width | sed "s/^.*:\s//")
|
||||||
height=$(${xorg.xwininfo}/bin/xwininfo -root | grep Height | sed "s/^.*:\s//")
|
height=$(${xorg.xwininfo}/bin/xwininfo -root | grep Height | sed "s/^.*:\s//")
|
||||||
|
|
||||||
offset_horiz=$(( $width/8 ))
|
|
||||||
offset_vert=$(( $height/8 ))
|
|
||||||
|
|
||||||
scale_width=$(( $width/4 + $width/2 ))
|
scale_width=$(( $width/4 + $width/2 ))
|
||||||
scale_height=$(( $height/4 + $height/2 ))
|
scale_height=$(( $height/4 + $height/2 ))
|
||||||
|
|
||||||
|
@ -67,7 +64,7 @@
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
filesdir="$(find $1 -type f -printf '%T@ %p\n' | sort -rn | cut -d ' ' -f 2-)"
|
filesdir="$(find $1 -type f -printf '%T@ %p\n' | sort -rn | cut -d ' ' -f 2-)"
|
||||||
output="$(echo "$filesdir" | ${nsxiv}/bin/nsxiv -tioq -g "$scale_width"x"$scale_height"-$offset_horiz-$offset_vert -N nsxiv-float )"
|
output="$(echo "$filesdir" | ${nsxiv}/bin/nsxiv -tioq -g "$scale_width"x"$scale_height" -N nsxiv-float )"
|
||||||
num_lines=$( echo "$output" | wc -l)
|
num_lines=$( echo "$output" | wc -l)
|
||||||
|
|
||||||
if [ "$num_lines" -gt 1 ]; then
|
if [ "$num_lines" -gt 1 ]; then
|
||||||
|
|
|
@ -11,15 +11,16 @@
|
||||||
|
|
||||||
# Check if emoji files are installed, if not pull from remote
|
# Check if emoji files are installed, if not pull from remote
|
||||||
if [ ! -f "$emoji_file" ] || [ ! -f "$nerdfont_file" ]; then
|
if [ ! -f "$emoji_file" ] || [ ! -f "$nerdfont_file" ]; then
|
||||||
notify-send "Emoji Picker" "Symbol files not found. Fetching from: '$remote'..."
|
notify-send -t 5000 "Emoji Picker" "Symbol files not found. Fetching from: '$remote'..."
|
||||||
mkdir -p "$symbols_dir"
|
mkdir -p "$symbols_dir"
|
||||||
git clone "$remote" "$symbols_dir"
|
git clone "$remote" "$symbols_dir"
|
||||||
[ "$?" != 0 ] && notify-send "Emoji Picker" "Error fetching from: $remote" && exit 1
|
[ "$?" != 0 ] && notify-send -t 2000 "Emoji Picker" "Error fetching from: $remote" && exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Concat all emoji files and pipe into dmenu. Remove empty rows with sed. Exit if invalid selection.
|
# Concat all emoji files and pipe into dmenu. Remove empty rows with sed. Exit if invalid selection.
|
||||||
emoji_row=$(cat "$recent" "$emoji_file" "$nerdfont_file" | sed '/^$/d' | dmenu -l 20)
|
emoji_row=$(cat "$recent" "$emoji_file" "$nerdfont_file" | sed '/^$/d' | dmenu -l 20)
|
||||||
[ "$emoji_row" == "**** Recent ****" ] || [ "$emoji_row" == "****************" ] && notify-send "Emoji Picker" "Invalid selection." && exit 1
|
[ "$emoji_row" == "" ] && notify-send -t 1000 "Emoji Picker" "Cancelled" && exit 0
|
||||||
|
[ "$emoji_row" == "**** Recent ****" ] || [ "$emoji_row" == "****************" ] && notify-send -t 1000 "Emoji Picker" "Invalid selection." && exit 1
|
||||||
|
|
||||||
# Add selected emoji to recent.
|
# Add selected emoji to recent.
|
||||||
sed -i "/$emoji_row/d" "$recent" && sed -i "2s/^/$emoji_row\n/" "$recent"
|
sed -i "/$emoji_row/d" "$recent" && sed -i "2s/^/$emoji_row\n/" "$recent"
|
||||||
|
@ -27,7 +28,7 @@
|
||||||
# Copy to clipboard
|
# Copy to clipboard
|
||||||
emoji=$(echo "$emoji_row" | sed 's/\s.*//g')
|
emoji=$(echo "$emoji_row" | sed 's/\s.*//g')
|
||||||
echo "$emoji" | xclip -i -r -selection CLIPBOARD
|
echo "$emoji" | xclip -i -r -selection CLIPBOARD
|
||||||
notify-send "Emoji Picker" "$emoji_row copied to clipboard"
|
notify-send -t 5000 "Emoji Picker" "$emoji_row copied to clipboard"
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
(writeShellScriptBin "sb-cpu-pct" ''
|
(writeShellScriptBin "sb-cpu-pct" ''
|
||||||
echo $(top -bn 1 |grep "Cpu(s)" | awk '{print $2+$6 "%"}' | sed "s/\..//g")
|
echo "[ $(top -bn 1 |grep "Cpu(s)" | awk '{print $2+$6 "%"}' | sed "s/\..//g")] "
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
(writeShellScriptBin "sb-mem-pct" ''
|
(writeShellScriptBin "sb-mem-pct" ''
|
||||||
# Gets current ram percent utilisation
|
# Gets current ram percent utilisation
|
||||||
echo $(free | awk '/^Mem/ {print "100*" $3 " / " $2 }' | ${bc}/bin/bc | awk '{print $1"%"}')
|
echo "[ $(free | awk '/^Mem/ {print "100*" $3 " / " $2 }' | ${bc}/bin/bc | awk '{print $1"%"}')] "
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
then
|
then
|
||||||
printf "$network_symbol"
|
printf "$network_symbol"
|
||||||
else
|
else
|
||||||
printf "$network_symbol|$IP_ADDRESS"
|
printf "[$network_symbol|$IP_ADDRESS] "
|
||||||
fi
|
fi
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
inputs=$(cd /etc/nixos &&
|
inputs=$(cd /etc/nixos &&
|
||||||
nix flake update --output-lock-file <(cat flake.nix) 2> /tmp/update &&
|
nix flake update --output-lock-file <(cat flake.nix) 2> /tmp/update &&
|
||||||
cat /tmp/update | grep -c Update)
|
cat /tmp/update | grep -c Update)
|
||||||
printf " $inputs"
|
printf "[ $inputs] "
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_string="$mic_status $icon $vol%"
|
print_string="$mic_status $icon $vol%"
|
||||||
printf '%s' "''${print_string}"
|
printf '%s' "[''${print_string}] "
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
home.file.".Xresources" = {
|
home.file.".Xresources" = {
|
||||||
recursive = true;
|
recursive = true;
|
||||||
text = ''
|
text = ''
|
||||||
|
! scale
|
||||||
|
Xft.dpi: 144
|
||||||
|
|
||||||
! st
|
! st
|
||||||
st.alpha: 0.8
|
st.alpha: 0.8
|
||||||
St.font: monospace:pixelsize=21:antialias=true:autohint=true;
|
St.font: monospace:pixelsize=21:antialias=true:autohint=true;
|
||||||
|
@ -10,7 +13,7 @@
|
||||||
|
|
||||||
! dwm
|
! dwm
|
||||||
dwm.borderpx: 3
|
dwm.borderpx: 3
|
||||||
dwm.font: monospace:size=14
|
dwm.font: monospace:size=12
|
||||||
dwm.col_base00: #${config.colorScheme.colors.base00}
|
dwm.col_base00: #${config.colorScheme.colors.base00}
|
||||||
dwm.col_base03: #${config.colorScheme.colors.base03}
|
dwm.col_base03: #${config.colorScheme.colors.base03}
|
||||||
dwm.col_base04: #${config.colorScheme.colors.base04}
|
dwm.col_base04: #${config.colorScheme.colors.base04}
|
||||||
|
@ -19,7 +22,9 @@
|
||||||
dwm.col_base0B: #${config.colorScheme.colors.base0B}
|
dwm.col_base0B: #${config.colorScheme.colors.base0B}
|
||||||
|
|
||||||
! dmenu
|
! dmenu
|
||||||
dmenu.font: monospace:size=14
|
dmenu.font: monospace:size=12
|
||||||
|
dmenu.font2: NotoColorEmoji:pixelsize=22:antialias=true:autohint=true
|
||||||
|
dmenu.topbar: 1
|
||||||
dmenu.normfgcolor: #${config.colorScheme.colors.base05}
|
dmenu.normfgcolor: #${config.colorScheme.colors.base05}
|
||||||
dmenu.normbgcolor: #${config.colorScheme.colors.base03}
|
dmenu.normbgcolor: #${config.colorScheme.colors.base03}
|
||||||
dmenu.selfgcolor: #${config.colorScheme.colors.base00}
|
dmenu.selfgcolor: #${config.colorScheme.colors.base00}
|
||||||
|
|
|
@ -38,16 +38,18 @@
|
||||||
videos = "/home/sam/vids";
|
videos = "/home/sam/vids";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Prevent error when enabling gtk https://github.com/nix-community/home-manager/issues/3113
|
||||||
|
# error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files
|
||||||
|
home.packages = [ pkgs.dconf ];
|
||||||
gtk.enable = true;
|
gtk.enable = true;
|
||||||
|
|
||||||
gtk.cursorTheme.package = pkgs.bibata-cursors;
|
# Get details about theme package
|
||||||
gtk.cursorTheme.name = "Bibata-Modern-Ice";
|
#cd $(nix build nixpkgs#kanagawa-gtk-theme --print-out-paths --no-link) && nix run nixpkgs#eza -- --tree --level 4
|
||||||
|
gtk.theme.package = pkgs.kanagawa-gtk-theme;
|
||||||
|
gtk.theme.name = "Kanagawa-B";
|
||||||
|
|
||||||
gtk.theme.package = pkgs.gruvbox-gtk-theme;
|
gtk.iconTheme.package = pkgs.kanagawa-icon-theme;
|
||||||
gtk.theme.name = "Gruvbox-Dark-B";
|
gtk.iconTheme.name = "Kanagawa";
|
||||||
|
|
||||||
gtk.iconTheme.package = pkgs.gruvbox-plus-icons;
|
|
||||||
gtk.iconTheme.name = "GruvboxPlus";
|
|
||||||
|
|
||||||
qt.enable = true;
|
qt.enable = true;
|
||||||
qt.platformTheme.name = "gtk";
|
qt.platformTheme.name = "gtk";
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
domain = "git.bitlab21.com";
|
domain = "git.bitlab21.com";
|
||||||
owner = "sam";
|
owner = "sam";
|
||||||
repo = "dwm";
|
repo = "dwm";
|
||||||
rev = "a49099cfcc5839f88137c44cb4bef416d67591af";
|
rev = "e34d0ecdd98e52164c135b560a5583aa11be89b7";
|
||||||
sha256 = "sha256-NmBr3e6ltt9TowWZ9MfV1jyEhRcr5NJNu7T19J79BVs=";
|
sha256 = "sha256-er1zi2xYK7AB6oR7JmfkfehesKTw9P4bcgjafj2lIIU=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,8 +13,8 @@ pkgs.stdenv.mkDerivation {
|
||||||
domain = "git.bitlab21.com";
|
domain = "git.bitlab21.com";
|
||||||
owner = "sam";
|
owner = "sam";
|
||||||
repo = "dmenu";
|
repo = "dmenu";
|
||||||
rev = "aaa18d5eb6c7a935766af489a3e3f3136278d3cc";
|
rev = "b07a6b2368198b9102ee1814ea01c93c9dfa478f";
|
||||||
sha256 = "sha256-khcBW6oVbvagLa2dfbteCJfzepbv4Y6GoUauYXHNhQo=";
|
sha256 = "sha256-FWuup2N+cyJErAA0n6wuv1Ru28/yiJETjEjqKe44yDE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -12,8 +12,8 @@ pkgs.stdenv.mkDerivation {
|
||||||
domain = "git.bitlab21.com";
|
domain = "git.bitlab21.com";
|
||||||
owner = "sam";
|
owner = "sam";
|
||||||
repo = "dwmblocks";
|
repo = "dwmblocks";
|
||||||
rev = "c4e7a9b1eb98123e239ba76bc551934721fd18ca";
|
rev = "1a65ae7eb0ae68f979ac86f0862ffa52d88da366";
|
||||||
sha256 = "sha256-F1x8jOT+c2pPCF9qKq5boIWzegMBTCxwzKMVtmtMWGM=";
|
sha256 = "sha256-PiUCHwm4MpoKGT2b/MgSpffejSqzOXdPlxXKGh0QEU4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
Loading…
Reference in New Issue