diff '--color=auto' -pruN ratpoison-1.4.9.orig/doc/ratpoison.man.1 ratpoison-1.4.9.onlynoborder/doc/ratpoison.man.1
--- ratpoison-1.4.9.orig/doc/ratpoison.man.1	2023-09-22 03:22:59.838831636 +0300
+++ ratpoison-1.4.9.onlynoborder/doc/ratpoison.man.1	2023-09-22 05:58:09.289799486 +0300
@@ -1155,6 +1155,17 @@ Selects how thick the frame around windo
 Default is
 \fR1\fR.
 .TP 8n
+\fBonlynoborder\fR \fR0\fR | \fR1\fR
+Determine whether to remove
+\fBborder\fR
+from the frames maximized to the size of the whole screen
+(\fR1\fR)
+or not
+(\fR0\fR).
+.sp
+Default is
+\fR0\fR.
+.TP 8n
 \fBbarborder\fR \fIpixels\fR
 Selects how thick the frame around
 \fBratpoison\fR's
diff '--color=auto' -pruN ratpoison-1.4.9.orig/doc/ratpoison.mdoc.1 ratpoison-1.4.9.onlynoborder/doc/ratpoison.mdoc.1
--- ratpoison-1.4.9.orig/doc/ratpoison.mdoc.1	2023-09-22 03:22:59.838831636 +0300
+++ ratpoison-1.4.9.onlynoborder/doc/ratpoison.mdoc.1	2023-09-22 05:52:37.685800631 +0300
@@ -992,6 +992,16 @@ Selects how thick the frame around windo
 .Pp
 Default is
 .Li 1 .
+.It Cm onlynoborder Li 0 | 1
+Determine whether to remove
+.Ic border
+from the frames maximized to the size of the whole screen
+.Pq Li 1
+or not
+.Pq Li 0 .
+.Pp
+Default is
+.Li 0 .
 .It Cm barborder Ar pixels
 Selects how thick the frame around
 .Nm Ap
diff '--color=auto' -pruN ratpoison-1.4.9.orig/doc/ratpoison.texi ratpoison-1.4.9.onlynoborder/doc/ratpoison.texi
--- ratpoison-1.4.9.orig/doc/ratpoison.texi	2023-09-22 03:22:59.837831636 +0300
+++ ratpoison-1.4.9.onlynoborder/doc/ratpoison.texi	2023-09-22 06:10:20.493796961 +0300
@@ -437,6 +437,15 @@ When called with no arguments, the curre
 returned.
 @end deffn
 
+@deffn Command {set onlynoborder} @var{n}
+Remove the @command{border} from the frames maximized to the size of
+the whole screen. Sometimes you may want to remove the border when
+there is just one window visible.
+
+When called with no arguments, the current setting is
+returned.
+@end deffn
+
 @node Window Classes
 @section Window Classes
 
diff '--color=auto' -pruN ratpoison-1.4.9.orig/src/actions.c ratpoison-1.4.9.onlynoborder/src/actions.c
--- ratpoison-1.4.9.orig/src/actions.c	2023-09-22 03:22:59.835831636 +0300
+++ ratpoison-1.4.9.onlynoborder/src/actions.c	2023-09-22 05:25:47.978806190 +0300
@@ -181,6 +181,7 @@ static cmdret * set_framemsgwait(struct
 static cmdret * set_startupmessage(struct cmdarg **args);
 static cmdret * set_warp(struct cmdarg **args);
 static cmdret * set_rudeness(struct cmdarg **args);
+static cmdret * set_onlynoborder(struct cmdarg **args);
 
 /* command function prototypes. */
 static cmdret *cmd_abort (int interactive, struct cmdarg **args);
@@ -360,6 +361,7 @@ init_set_vars (void)
   add_set_var ("maxsizegravity", set_maxsizegravity, 1, "", arg_GRAVITY);
   add_set_var ("maxundos", set_maxundos, 1, "", arg_NUMBER);
   add_set_var ("msgwait", set_msgwait, 1, "", arg_NUMBER);
+  add_set_var ("onlynoborder", set_onlynoborder, 1, "", arg_NUMBER);
   add_set_var ("padding", set_padding, 4, "", arg_NUMBER, "", arg_NUMBER, "",
                arg_NUMBER, "", arg_NUMBER);
   add_set_var ("resizeunit", set_resizeunit, 1, "", arg_NUMBER);
@@ -4145,6 +4147,29 @@ set_padding (struct cmdarg **args)
 
   return cmdret_new (RET_SUCCESS, NULL);
 }
+
+static cmdret *
+set_onlynoborder (struct cmdarg **args)
+{
+  rp_window *win;
+
+  if (args[0] == NULL)
+    return cmdret_new (RET_SUCCESS, "%d", defaults.onlynoborder);
+
+  if (ARG(0,number) < 0)
+    return cmdret_new (RET_FAILURE, "onlynoborder: %s", invalid_negative_arg);
+
+  defaults.onlynoborder = ARG(0,number);
+
+  /* Update all the visible windows. */
+  list_for_each_entry (win,&rp_mapped_window,node)
+    {
+      if (win_get_frame (win))
+        maximize (win);
+    }
+
+  return cmdret_new (RET_SUCCESS, NULL);
+}
 
 static cmdret *
 set_border (struct cmdarg **args)
diff '--color=auto' -pruN ratpoison-1.4.9.orig/src/data.h ratpoison-1.4.9.onlynoborder/src/data.h
--- ratpoison-1.4.9.orig/src/data.h	2023-09-22 03:22:59.836831636 +0300
+++ ratpoison-1.4.9.onlynoborder/src/data.h	2023-09-22 06:11:33.994796707 +0300
@@ -301,6 +301,9 @@ struct rp_defaults
 
   /* Frame indicator format */
   char *frame_fmt;
+
+  /* Disable border for fullscreen frames */
+  int onlynoborder;
 };
 
 /* Information about a child process. */
diff '--color=auto' -pruN ratpoison-1.4.9.orig/src/main.c ratpoison-1.4.9.onlynoborder/src/main.c
--- ratpoison-1.4.9.orig/src/main.c	2023-09-22 03:22:59.837831636 +0300
+++ ratpoison-1.4.9.onlynoborder/src/main.c	2023-09-22 04:13:08.777821244 +0300
@@ -581,6 +581,7 @@ init_defaults (void)
   defaults.history_expansion = False;
   defaults.frame_selectors = xstrdup ("");
   defaults.maxundos = 20;
+  defaults.onlynoborder = 0;
 }
 
 int
diff '--color=auto' -pruN ratpoison-1.4.9.orig/src/manage.c ratpoison-1.4.9.onlynoborder/src/manage.c
--- ratpoison-1.4.9.orig/src/manage.c	2023-09-22 03:22:59.837831636 +0300
+++ ratpoison-1.4.9.onlynoborder/src/manage.c	2023-09-22 05:25:40.110806217 +0300
@@ -364,6 +364,18 @@ window_is_transient (rp_window *win)
     ;
 }
 
+/* This function is used to determine if the frame should be treated
+   as a fullscreen. */
+int
+frame_is_fullscreen (rp_frame *frame, rp_screen *s)
+{
+  /* check if current frame occupy the entire screen */
+  return frame->x == defaults.padding_left &&
+         frame->y == defaults.padding_top  &&
+         frame->width  == screen_width (s) &&
+         frame->height == screen_height (s);
+}
+
 static Atom
 get_net_wm_window_type (rp_window *win)
 {
@@ -612,6 +624,7 @@ static void
 maximize_transient (rp_window *win)
 {
   rp_frame *frame;
+  rp_screen *s;
   int maxx, maxy;
 
   frame = win_get_frame (win);
@@ -620,8 +633,13 @@ maximize_transient (rp_window *win)
   if (frame == NULL)
     return;
 
+  s = frames_screen (frame);
+
   /* Set the window's border */
-  win->border = defaults.window_border_width;
+  if (defaults.onlynoborder && frame_is_fullscreen (frame, s))
+    win->border = 0;
+  else
+    win->border = defaults.window_border_width;
 
   /* Always use the window's current width and height for
      transients. */
@@ -671,12 +689,14 @@ maximize_transient (rp_window *win)
   win->height = maxy;
 }
 
+
 /* set a good standard window's x,y,width,height fields to maximize
    the window. */
 static void
 maximize_normal (rp_window *win)
 {
   rp_frame *frame;
+  rp_screen *s;
   int maxx, maxy;
 
   frame = win_get_frame (win);
@@ -685,8 +705,13 @@ maximize_normal (rp_window *win)
   if (frame == NULL)
     return;
 
-  /* Set the window's border */
-  win->border = defaults.window_border_width;
+  s = frames_screen (frame);
+
+  /* Set the window's border. */
+  if (defaults.onlynoborder && frame_is_fullscreen (frame, s))
+    win->border = 0;
+  else
+    win->border = defaults.window_border_width;
 
   /* Honour the window's maximum size */
   if (win->hints->flags & PMaxSize)
diff '--color=auto' -pruN ratpoison-1.4.9.orig/src/manage.h ratpoison-1.4.9.onlynoborder/src/manage.h
--- ratpoison-1.4.9.orig/src/manage.h	2023-09-22 03:22:59.837831636 +0300
+++ ratpoison-1.4.9.onlynoborder/src/manage.h	2023-09-22 05:20:04.173807377 +0300
@@ -38,6 +38,8 @@ void set_state (rp_window *win, int stat
 long get_state (rp_window *win);
 
 int window_is_transient (rp_window *win);
+int frame_is_fullscreen (rp_frame *frame, rp_screen *s);
+
 void update_window_information (rp_window *win);
 void map_window (rp_window *win);
 
