...
 
Commits (9)
......@@ -11,14 +11,14 @@ let
gnome-font-viewer
])++ (with pkgs; [
polybarFull dunst rofi
bspwm sxhkd
bspwm sxhkd lightlocker
]);
utility = (with pkgs; [
pavucontrol networkmanagerapplet
lxappearance-gtk3 arandr
light hsetroot wmctrl xdotool graphicsmagick xtitle
glib-networking udisks2 glib
udisks2 glib
]) ++ (with pkgs.xorg; [
xsetroot xwininfo xdpyinfo xrdb
]);
......
......@@ -19,7 +19,7 @@
defaultFonts = {
sansSerif = [ "Noto Sans JP" "Noto Color Emoji" ];
serif = [ "Noto Serif JP" "Noto Color Emoji" ];
monospace = [ "Myrica M" "Symbols Nerd Fonts" "Noto Color Emoji" ];
monospace = [ "MyricaM M" "Symbols Nerd Font" "Noto Color Emoji" ];
};
};
};
......
......@@ -12,6 +12,7 @@
device = "nodev";
font = "${pkgs.terminus_font}/share/fonts/terminus/ter-x32n.pcf.gz";
fontSize = 32;
useOSProber = true;
};
# EFI
......
......@@ -51,7 +51,8 @@ offset-y = 0
width = 3840
height = 48
font-0 = "Monospace:size=24;3"
font-0 = "MyricaM M:size=24;3"
font-1 = "Symbols Nerd Font:size=24;3"
background = #81191919
foreground = #F0F9F9
......@@ -61,9 +62,8 @@ border-size = 0
module-margin-left = 1
modules-left = userhost title
modules-center = bspwm
modules-right = datetime cpu memory volume network battery spacer
modules-right = datetime cpu memory volume network battery
tray-detached = true
tray-position = right
tray-maxsize = 32
tray-scale = 1.0
......@@ -71,10 +71,6 @@ tray-scale = 1.0
line-size = 3
line-color = ${colors.gray-brighter}
[module/spacer]
type = custom/text
content = " "
[module/bspwm]
type = internal/bspwm
enable-click = true
......@@ -106,11 +102,11 @@ sink = alsa_output.pci-0000_00_1f.3.analog-stereo
use-ui-max = false
interval = 1
format-volume = %{A2:polybar-pulseaudio-volume.sh 2 &:}%{A3:pavucontrol &:}<ramp-volume><label-volume>%{A}%{A}
format-volume = %{A2:polybar-pulseaudio-volume.sh 2 &:}%{A3:pavucontrol &:}<ramp-volume> <label-volume>%{A}%{A}
format-mute = %{A2:polybar-pulseaudio-volume.sh 2 &:}%{A3:pavucontrol &:}<label-mute>%{A}{A}
label-volume = %percentage%%
label-muted = %{F#FF6633}%{F-}---
label-muted = %{F#FF6633}%{F-} ---
ramp-volume-0 = %{F#00CCFF}%{F-}
ramp-volume-1 = %{F#CCFF00}%{F-}
......@@ -123,9 +119,9 @@ adapter = AC
time-format = %H:%M
format-charging = "%{F#FFCC00}%{F-}%percentage%% <ramp-capacity>"
format-discharging = "%{F#CCCCCD}%{F-}%percentage% <ramp-capacity>"
format-full = "%{F#CCFF00}%{F-}100% <ramp-capacity>"
format-charging = "%{F#FFCC00}%{F-} %percentage%% <ramp-capacity>"
format-discharging = "%{F#CCCCCD}%{F-} %percentage% <ramp-capacity>"
format-full = "%{F#CCFF00}%{F-} 100% <ramp-capacity>"
ramp-capacity-0 = %{F#FF0000}%{F-}
ramp-capacity-1 = %{F#FF6633}%{F-}
......@@ -136,8 +132,8 @@ ramp-capacity-4 = %{F#CCFF00}%{F-}
[module/network]
type = internal/network
interface = wlp2s0
format-connected = %{F#9CD9F0}%{F-}<label-connected>
format-disconnetted = %{F#5D5D5D}%{F-}<label-disconnected>
format-connected = %{F#9CD9F0}%{F-} <label-connected>
format-disconnetted = %{F#5D5D5D}%{F-} <label-disconnected>
label-connected = %essid%
label-disconnected = none
......@@ -148,7 +144,7 @@ interval = 1.0
date = %Y-%m-%d
time = %H:%M:%S (%a)
format = %{F#00CCCC}%{F-}<label>
format = %{F#00CCCC}%{F-} <label>
label = %{A1:polybar-datetime-clipboard.sh &:}%date%T%time%%{A}
......@@ -173,6 +169,6 @@ ramp-load-7 = %{F#C75646}█%{F-}
[module/memory]
type = internal/memory
format = %{F#5D5D5D}%{F-}<label>
format = %{F#5D5D5D}%{F-} <label>
label = %gb_used:0:4%GB
......@@ -12,7 +12,7 @@ super + a ; g
chromium
super + a ; l
dm-tool lock
sh /etc/nixos/scripts/rofi-application-launch.sh
super + a ; q
bspc quit
......@@ -29,6 +29,8 @@ super + a ; x
super + a ; X
bspc node focused -k
super + l
dm-tool switch-to-greeter
# Desktops
# ========
......
......@@ -18,11 +18,11 @@ set-option -g message-command-style "bg=default,fg=brightblue"
set-option -g message-style "bg=default,fg=brightwhite"
set-option -g status-style "bg=default,fg=brightwhite"
set-option -g status-left " #{?pane_in_mode,#[fg=brightmagenta]#[default],#[fg=blue]#[default]} "
set-option -g status-right "#[fg=brightyellow]#[default] %Y-%m-%d #[fg=brightcyan]#[default] %H:%M:%S #[fg=brightblue]#[default] #(echo $USER) #[fg=brightgreen]#[default] #(hostname)"
set-option -g status-left " #{?pane_in_mode,#[fg=brightmagenta]类#[default],#[fg=blue]#[default]} "
set-option -g status-right "#[fg=brightyellow]#[default] %Y-%m-%d %H:%M:%S #[fg=brightblue]#[default] #(echo $USER) #[fg=brightgreen]#[default] #(hostname)"
set-option -g status-right-length 80
set-window-option -g window-status-current-format "#[fg=brightgreen]#[bold]#[default] #W"
set-window-option -g window-status-current-format "#[fg=brightgreen]#[bold]#[default] #W"
set-window-option -g window-status-format "#[bold]#I#[default]:#W"
# pane status
......
{ stdenv, fetchurl, ninja, meson, gettext, webkitgtk, gnome3, wrapGAppsHook }:
{ stdenv
, fetchFromGitHub
, meson
, ninja
, gettext
, pkgconfig
, python3
, wrapGAppsHook
, gobject-introspection
, gjs
, gnused
, gtk3
, gsettings-desktop-schemas
, webkitgtk
, glib
, desktop-file-utils
, hicolor-icon-theme /* setup hook */
, libarchive
/*, hyphen */
, dict
}:
stdenv.mkDerivation rec {
name = "foliate";
pname = "foliate";
version = "1.5.3";
src = fetchurl {
url = "https://github.com/johnfactotum/foliate/archive/${version}.tar.gz";
sha256 = "1mz27qj9zwkn978yd4sdswha4laq5gf9s6cs5xrkqfj9242mrx4m";
# Fetch this from gnome mirror if/when available there instead!
src = fetchFromGitHub {
owner = "johnfactotum";
repo = pname;
rev = version;
sha256 = "1bjlk9n1j34yx3bvzl95mpb56m2fjc5xcd6yks96pwfyfvjnbp93";
};
buildInputs = [
gettext webkitgtk gnome3.gjs
];
nativeBuildInputs = [
ninja meson wrapGAppsHook
meson
ninja
pkgconfig
gettext
gnused
python3
desktop-file-utils
wrapGAppsHook
hicolor-icon-theme
];
buildInputs = [
glib
gtk3
gjs
webkitgtk
gsettings-desktop-schemas
gobject-introspection
libarchive
# TODO: Add once packaged, unclear how language packages best handled
# hyphen
dict # dictd for offline dictionary support
];
doCheck = true;
prePatch = ''
sed -i 's!const python = [^\n]\+!const python = "${python3}/bin/python";!' src/main.js
'';
postPatch = ''
chmod +x build-aux/meson/postinstall.py
patchShebangs build-aux/meson/postinstall.py
'';
# Kludge so gjs can find resources by using the unwrapped name
# Improvements/alternatives welcome, but this seems to work for now :/.
# See: https://github.com/NixOS/nixpkgs/issues/31168#issuecomment-341793501
postInstall = ''
sed -e $'2iimports.package._findEffectiveEntryPointName = () => \'com.github.johnfactotum.Foliate\' ' \
-i $out/bin/com.github.johnfactotum.Foliate
'';
meta = with stdenv.lib; {
description = "Simple and modern GTK eBook reader";
homepage = "https://johnfactotum.github.io/foliate/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ dtzWill ];
};
}
{ stdenv, fetchFromGitHub }:
{ stdenv, fetchFromGitHub, gtk3 }:
stdenv.mkDerivation rec {
name = "Newaita-${version}";
version = "git";
......@@ -6,12 +6,30 @@ stdenv.mkDerivation rec {
owner = "cbrnix";
repo = "Newaita";
rev = "5561b6d18625fd405bff0daaef069fb4d99f0bd3";
sha256 = "1llzmgm428vxp5ipzxyxzamm7yfqhxyc9iv52lrrc09vx1bds6ck";
sha256 = "0mfcnpbrm7cmrhq9jrfqa074zm07q373akyc6bz7wdbsngx2z4a5";
};
nativeBuildInputs = [ gtk3 ];
installPhase = ''
mkdir -p $out/share/icons
mv Newaita-dark $out/share/icons
mv Newaita $out/share/icons
'';
postFixup = ''
for base in Newaita{,-dark}; do
cd $out/share/icons/$base/emblems
for size in 16 22 24 32 48; do
ln -sf $size "''${size}@2x"
done
done
find $out/share/icons | grep ' (' | xargs -I{} rm {}
find $out/share/icons | grep ' ' | xargs -I{} sh -c 'mv "{}" "$(echo "{}" | sed "s/ //g")"'
gtk-update-icon-cache $out/share/icons/Newaita
gtk-update-icon-cache $out/share/icons/Newaita-dark
'';
}
......@@ -18,6 +18,6 @@ in stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/share/themes
cp -R * $out/share/themes
mv Plastik* $out/share/themes
'';
}
......@@ -3,75 +3,74 @@
use strict;
use warnings;
our $basedir = $ENV{'HOME'} . '/local/dev/src/github.com/nyarla/the.kalaclista.com-v2';
sub convert {
my $url = shift;
my ( $website, $path ) = ( $url =~ m{kalaclista:([^/]+?)/([^.]+).md} );
return "src/${website}/content/${path}.md";
}
our $BASE_DIR = $ENV{'HOME'} . '/local/dev/src/github.com/nyarla/the.kalaclista.com-v2';
our $URI_RE = qr{kalaclista:([^/]+?)/([^.]+)\.md};
sub main {
my $path = convert(shift);
system(qq[ echo "${path}" >${basedir}/.edit ]);
my $protocol = shift;
my ( $website, $path ) = ( $protocol =~ $URI_RE );
my $file = join q{/}, ( $BASE_DIR, "src", $website, "content", "${path}.md" );
my $out = '';
if ( ! -e $path ) {
if ( $path =~ m{^src/notes/content/([^\.]+)\.md$} ) {
my $page = $1;
my $date = `date +%Y-%m-%dT%H:%M:%S`;
chomp($date);
if ( ! -e $file ) {
my $out = q{};
$out .= <<"__EOF__";
---
type: notes
title: "${page}"
slug: '${page}'
date: '${date}+09:00'
ads: true
fixme: false
---
if ( $website eq 'notes' ) {
my $slug = $path;
my $date = `date +%Y-%m-%dT%H:%M:%S`;
chomp($date);
__EOF__
$out .= <<~"EOF";
---
type: notes
title: "${slug}"
slug: '${slug}'
date: '${date}+09:00'
ads: true
fixme: false
---
EOF
} else {
system qq{ mkdir -p \$(dirname '${basedir}/${path}') };
my ( $website, $year, $month, $day, $hour, $minute, $second ) = ( $path =~ m{^src/([^/]+)/content/(\d{4})/(\d{2})/(\d{2})/(\d{2})(\d{2})(\d{2})\.md$} );
my ( $year, $month, $day, $hms ) = ( split qr{/}, $path );
my ( $hour, $minute, $second ) = ( $hms =~ m{^(\d{2})(\d{2})(\d{2})$} );
$out .= <<"__EOF__";
---
type: ${website}
title: ""
date: '${year}-${month}-${day}T${hour}:${minute}:${second}+09:00'
slug: '${hour}${minute}${second}'
__EOF__
$out .= <<~"EOF";
---
type: ${website}
title: ""
date: '${year}-${month}-${day}T${hour}:${minute}:${second}+09:00'
slug: '${hms}'
EOF
if ( $website eq 'posts' ) {
$out .= <<'__EOF__';
tags:
-
__EOF__
$out .= <<~'EOF';
tags:
-
EOF
}
$out .= <<'__EOF__';
ads: true
fixme: false
---
__EOF__
$out .= <<~'EOF';
ads: true
fixme: false
---
EOF
}
if ( $website ne 'notes' ) {
my $dir = `dirname ${file}`;
chomp($dir);
system(qw(mkdir -p), $dir);
}
open(my $fh, '>', "${basedir}/${path}");
open(my $fh, '>', $file);
print $fh $out;
close($fh);
}
my $code = system(qw(tmux list-sessions));
if ( $code != 0 ) {
system qq[mlterm -e zsh -c 'cd ${basedir} && tmux-up'];
system(qq< mlterm -e zsh -c 'cd "${BASE_DIR}" && tmux-up' >);
} else {
system qq[tmux new-window -c ${basedir} vim -c NERDTree ${path} ];
system(qq< tmux new-window -a -c "${BASE_DIR}" vim -c NERDTree ${file} >);
}
}
......
#!/usr/bin/env sh
filter() {
rofi -dmenu \
-show run \
-matching fuzzy \
-lines 10 \
-width 3840 \
-location 1 \
-dpi 192 \
-color-window "#191919,#F9F9F9,#666666" \
-color-normal "#191919,#FFFFFF,#333333,#CCFF00,#000000" \
-color-urgent "#191919,#FF0000,#333333,#CC0000,#FFFFFF" \
-color-active "#191919,#FFFFFF,#333333,#00CCFF,#000000"
}
applications() {
cat <<EOF
mlterm
chromium
uget
deadbeef
calibre
com.github.johnfactotum.Foliate
vlc
gimp
inkscape
fonforge
peek
com.github.philip-scott.spice-up
mate-calc
keepassxc
caja
engrampa
eom
atril
pluma
gucharmap
pavucontol
lxappearance
arandr
EOF
}
main() {
local APPS="$(applications | grep -v "^#" | grep -v "^$" | sort | uniq)"
local SEL="$(echo $APPS | tr ' ' "\n" | filter)"
if test "x$(echo $APPS | tr ' ' "\n" | grep $SEL)" = "x${SEL}"; then
exec $SEL
fi
}
main