commit 8726f2c
hovercats
·
2025-11-14 16:04:45 +0000 UTC
parent e42bac5
senpai: drop
6 files changed,
+0,
-120
+0,
-27
1@@ -1,27 +0,0 @@
2-#!/bin/sh -e
3-
4-patch -p1 < 0001-set-bar-to-be-on-top-of-the-window-instead-of-bottom.patch
5-
6-go build -a -ldflags="-w -s -extldflags '-static'" \
7- -trimpath \
8- -modcacherw \
9- ./cmd/senpai
10-
11-if command -v scdoc; then
12- scdoc < doc/senpai.1.scd > senpai.1
13- scdoc < doc/senpai.5.scd > senpai.5
14-
15- mkdir -p \
16- "$1/usr/share/man/man1" \
17- "$1/usr/share/man/man5"
18-
19- cp senpai.1 "$1/usr/share/man/man1/"
20- cp senpai.5 "$1/usr/share/man/man5/"
21-
22- # Compress manpages
23- find "$1/usr/share/man" -type f -exec gzip -n -9 {} +
24-fi
25-
26-mkdir -p "$1/usr/bin"
27-
28-cp senpai "$1/usr/bin/"
+0,
-2
1@@ -1,2 +0,0 @@
2-c9903285a66fd58e4a4d2784b3a632f74d7fac1857eab4025b8ef3e4a0c8f157ef
3-c7c0a2362a0e8d92ea4a6144c4f7ebe7a051ae14e6a1e2508d8568629ed0e5d3f6
+0,
-1
1@@ -1 +0,0 @@
2-go make
1@@ -1,87 +0,0 @@
2-From 4850038c38a5755ef83003448d76f42ae914ee4e Mon Sep 17 00:00:00 2001
3-From: hovercats <hovercatswithlasereyes@protonmail.com>
4-Date: Fri, 3 May 2024 18:24:55 +0200
5-Subject: [PATCH] set bar to be on top of the window instead of bottom
6-
7----
8- app.go | 4 ++--
9- ui/ui.go | 14 ++++++++------
10- 2 files changed, 10 insertions(+), 8 deletions(-)
11-
12-diff --git a/app.go b/app.go
13-index 9741bec..f067641 100644
14---- a/app.go
15-+++ b/app.go
16-@@ -507,7 +507,7 @@ func (app *App) handleMouseEvent(ev *tcell.EventMouse) {
17- if ev.Buttons()&tcell.ButtonPrimary != 0 {
18- if x < app.win.ChannelWidth() {
19- app.win.ClickBuffer(y + app.win.ChannelOffset())
20-- } else if app.win.ChannelWidth() == 0 && y == h-1 {
21-+ } else if app.win.ChannelWidth() == 0 && y == 0 {
22- app.win.ClickBuffer(app.win.HorizontalBufferOffset(x))
23- } else if x > w-app.win.MemberWidth() && y >= 2 {
24- app.win.ClickMember(y - 2 + app.win.MemberOffset())
25-@@ -535,7 +535,7 @@ func (app *App) handleMouseEvent(ev *tcell.EventMouse) {
26- if i := y + app.win.ChannelOffset(); i == app.win.ClickedBuffer() {
27- app.win.GoToBufferNo(i)
28- }
29-- } else if app.win.ChannelWidth() == 0 && y == h-1 {
30-+ } else if app.win.ChannelWidth() == 0 && y == 0 {
31- if i := app.win.HorizontalBufferOffset(x); i >= 0 && i == app.win.ClickedBuffer() {
32- app.win.GoToBufferNo(i)
33- }
34-diff --git a/ui/ui.go b/ui/ui.go
35-index cbcef6b..ae3b491 100644
36---- a/ui/ui.go
37-+++ b/ui/ui.go
38-@@ -475,31 +475,33 @@ func (ui *UI) Draw(members []irc.Member) {
39- w, h := ui.screen.Size()
40-
41- if ui.channelWidth == 0 {
42-- ui.e.Draw(ui.screen, 9+ui.config.NickColWidth, h-2)
43-+ ui.e.Draw(ui.screen, 9+ui.config.NickColWidth, h-1)
44- } else {
45- ui.e.Draw(ui.screen, 9+ui.channelWidth+ui.config.NickColWidth, h-1)
46- }
47-
48-- ui.bs.DrawTimeline(ui.screen, ui.channelWidth, 0, ui.config.NickColWidth)
49- if ui.channelWidth == 0 {
50-- ui.bs.DrawHorizontalBufferList(ui.screen, 0, h-1, w-ui.memberWidth, &ui.channelOffset)
51-+ ui.bs.DrawHorizontalBufferList(ui.screen, 0, 0, w-ui.memberWidth, &ui.channelOffset)
52-+ ui.bs.DrawTimeline(ui.screen, ui.channelWidth, 1, ui.config.NickColWidth)
53- } else {
54-+ ui.bs.DrawTimeline(ui.screen, ui.channelWidth, 0, ui.config.NickColWidth)
55- ui.bs.DrawVerticalBufferList(ui.screen, 0, 0, ui.channelWidth, h, &ui.channelOffset)
56- }
57- if ui.memberWidth != 0 {
58- ui.drawVerticalMemberList(ui.screen, w-ui.memberWidth, 0, ui.memberWidth, h, members, &ui.memberOffset)
59- }
60- if ui.channelWidth == 0 {
61-- ui.drawStatusBar(ui.channelWidth, h-3, w-ui.memberWidth)
62-+ ui.drawStatusBar(ui.channelWidth, h-2, w-ui.memberWidth)
63- } else {
64- ui.drawStatusBar(ui.channelWidth, h-2, w-ui.channelWidth-ui.memberWidth)
65- }
66-
67- if ui.channelWidth == 0 {
68- for x := 0; x < 9+ui.config.NickColWidth; x++ {
69-+ ui.screen.SetContent(x, h-1, ' ', nil, tcell.StyleDefault)
70- ui.screen.SetContent(x, h-2, ' ', nil, tcell.StyleDefault)
71- }
72-- printIdent(ui.screen, 7, h-2, ui.config.NickColWidth, ui.prompt)
73-+ printIdent(ui.screen, 7, h-1, ui.config.NickColWidth, ui.prompt)
74- } else {
75- for x := ui.channelWidth; x < 9+ui.channelWidth+ui.config.NickColWidth; x++ {
76- ui.screen.SetContent(x, h-1, ' ', nil, tcell.StyleDefault)
77-@@ -519,7 +521,7 @@ func (ui *UI) ScrollToBuffer() {
78- w, h := ui.screen.Size()
79- var first int
80- if ui.channelWidth > 0 {
81-- first = ui.bs.current - h + 1
82-+ first = ui.bs.current - h
83- } else {
84- first = ui.bs.GetLeftMost(w - ui.memberWidth)
85- }
86---
87-2.44.0
88-
+0,
-2
1@@ -1,2 +0,0 @@
2-https://git.sr.ht/~taiite/senpai/archive/v0.3.0.tar.gz
3-patches/0001-set-bar-to-be-on-top-of-the-window-instead-of-bottom.patch
+0,
-1
1@@ -1 +0,0 @@
2-0.3.0 2