updates including fixing app-launcher

This commit is contained in:
Tyler Starr 2023-11-05 09:44:45 -08:00
parent 2735743285
commit 3b2c21aea9
5 changed files with 30 additions and 42 deletions

View File

@ -1,26 +1,19 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀ # https://gist.github.com/nicedreams/f8d0a6373949f6d9b9583e7e1634a1c3
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀
#⠀⠀⠀⠀⠀⠀⠀⠀⣼⡏⠸⣧⠀⠀⠀⠀⠀⠀⠀⠀
#⠠⢤⣤⣤⣤⣤⣤⣴⡿⠀⠀⢻⣦⣤⣤⣤⣤⣤⡤⠄ Tyler Starr (starr-dusT)
#⠀⠀⠙⠻⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⣠⣴⠟⠋⠀⠀ https://github.com/starr-dusT/dotfiles
#⠀⠀⠀⠀⠀⠙⣿⡆⠀⠀⠀⠀⠰⣿⠋⠀⠀⠀⠀⠀ https://tstarr.us
#⠀⠀⠀⠀⠀⢰⡟⠀⣀⣴⣦⣀⠀⢻⡆⠀⠀⠀⠀⠀
#⠀⠀⠀⠀⢀⣾⣧⡾⠛⠁⠈⠙⠷⣼⣿⡀⠀⠀⠀⠀
#⠀⠀⠀⠀⡸⠟⠁⠀⠀⠀⠀⠀⠀⠈⠛⢧⠀⠀⠀⠀
#
# Launch applications with fzf.
desktop_file() { bmenu() {
find /usr/share/applications -name "*.desktop" launchapp=$(IFS=':'; \
find /usr/local/share/applications -name "*.desktop" for p in ${PATH}; \
find "$HOME/.local/share/applications" -name "*.desktop" do find -L "${p}" -type f -executable -print 2> /dev/null; done \
find /var/lib/flatpak/exports/share/applications -name "*.desktop" | fzf --header="Select application to launch from PATH:" \
find "$HOME/.local/share/flatpak/exports/share/applications" -name "*.desktop" --multi=0 \
find /run/current-system/sw/share/applications -name "*.desktop" --exact \
--height="50%" \
--preview-window="down:wrap:3")
if [[ "${launchapp}" ]]; then
setsid -f "${launchapp}" >/dev/null &
sleep .1
fi
} }
selected="$(desktop_file | sed 's/.desktop//g' | sort | fzf -e -i -m --reverse --delimiter / --with-nth -1)" bmenu "$@"
[ -z "$selected" ] && exit
cd || return
echo "$selected" | while read -r line ; do setsid gio launch "$line".desktop ; done

View File

@ -7,8 +7,8 @@
set $HOME /home/{{ .user }} set $HOME /home/{{ .user }}
set $DISP_PRI DP-2 set $DISP_SEC DP-2
set $DISP_SEC HDMI-A-1 set $DISP_PRI HDMI-A-1
set $BOR_WIDTH 3 set $BOR_WIDTH 3
set $GAP_INNER 3 set $GAP_INNER 3
@ -190,7 +190,7 @@ bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym $mod+Return exec alacritty bindsym $mod+Return exec alacritty
bindsym $mod+a mode launcher bindsym $mod+a mode launcher
mode launcher { mode launcher {
bindsym r exec alacritty --title launcher -e /home/{{ .user }}/bin/linux-app-launcher, $e bindsym r exec alacritty --title launcher -e ~/bin/linux-app-launcher, $e
bindsym Escape mode default bindsym Escape mode default
} }
bindsym $mod+o mode open bindsym $mod+o mode open
@ -234,7 +234,7 @@ mode scratch {
output $DISP_PRI { output $DISP_PRI {
resolution 2560x1440@143.973Hz resolution 2560x1440@143.973Hz
position 2560,0 position 1080,0
} }
output $DISP_SEC { output $DISP_SEC {

View File

@ -40,11 +40,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1698288402, "lastModified": 1698942558,
"narHash": "sha256-jIIjApPdm+4yt8PglX8pUOexAdEiAax/DXW3S/Mb21E=", "narHash": "sha256-/UmnB+mEd6Eg3mJBrAgqRcyZX//RSjHphcCO7Ig9Bpk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "60b9db998f71ea49e1a9c41824d09aa274be1344", "rev": "621f51253edffa1d6f08d5fce4f08614c852d17e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -56,11 +56,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1698318101, "lastModified": 1698924604,
"narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=", "narHash": "sha256-GCFbkl2tj8fEZBZCw3Tc0AkGo0v+YrQlohhEGJ/X4s0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "63678e9f3d3afecfeafa0acead6239cdb447574c", "rev": "fa804edfb7869c9fb230e174182a8a1a7e512c40",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -12,7 +12,8 @@ in {
super-slicer super-slicer
blender blender
] ++ [ ] ++ [
pkgs-unstable.freecad # Freecad is broken right now (https://github.com/NixOS/nixpkgs/issues/263452)
#pkgs-unstable.freecad
]; ];
}; };
} }

View File

@ -1,25 +1,19 @@
{ config, lib, pkgs, user, ... }: { config, lib, pkgs, pkgs-unstable, user, ... }:
let let
cfg = config.modules.devel.notes; cfg = config.modules.devel.notes;
in { in {
options.modules.devel.notes.enable = lib.mkEnableOption "notes"; options.modules.devel.notes.enable = lib.mkEnableOption "notes";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# Needed for obsidian
nixpkgs.config.permittedInsecurePackages = [
"electron-24.8.6"
];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
pandoc pandoc
gollum gollum
obsidian
zk zk
# for zk # for zk
bat bat
fzf fzf
] ++ [
pkgs-unstable.obsidian
]; ];
}; };
} }