Code Monkey home page Code Monkey logo

Comments (6)

xenodium avatar xenodium commented on June 1, 2024

Nice idea! Have you looked at setting chatgpt-shell-display-function? By default, it uses pop-to-buffer-same-window but could be something else?

from chatgpt-shell.

tuhdo avatar tuhdo commented on June 1, 2024

Nice idea! Have you looked at setting chatgpt-shell-display-function? By default, it uses pop-to-buffer-same-window but could be something else?

I did code up a function to switch the shell in another frame, by default in the right half of your monitor:

(defun find-or-make-frame (fname)
    (condition-case
        nil
        (select-frame-by-name fname)
      (error (make-frame `((name . ,fname))))))
(defun display-chatgpt-shell-frame (bname)
    (let ((cur-f (selected-frame))
          (f (find-or-make-frame "chatgpt")))
      (select-frame-by-name "chatgpt")
      (pop-to-buffer-same-window bname)
      (set-frame-position f (/ (display-pixel-width) 2) 0)
      (set-frame-height f (frame-height cur-f))
      (set-frame-width f  (frame-width cur-f) 1)
      ))
   (setq shell-maker-display-function 'display-chatgpt-shell-frame)

from chatgpt-shell.

xenodium avatar xenodium commented on June 1, 2024

Ah sorry! I totally missed you using shell-maker-display-function. I blame reading from mobile ;-)

I'm thinking we can add the proposed function to the documentation as an example. I originally added the variable as someone had a different preference. The configuration option should be enough to cater for everyone's choice.

from chatgpt-shell.

tuhdo avatar tuhdo commented on June 1, 2024

But it would be nice if users can simply set a variable, not pasting a whole function and bloat their config files.

from chatgpt-shell.

xenodium avatar xenodium commented on June 1, 2024

Hear ya. The sweet spot isn't always clear. The challenge is that we are a diverse bunch of emacsers, so if we add all proposed functions to the package, the bloat will take place in the package itself. The compromise here is to add customization points and emacsers can choose to customize based on their preference. Hope that makes sense.

from chatgpt-shell.

xenodium avatar xenodium commented on June 1, 2024

Added sample to README.

ps. Hey, you wrote that amazing helm guide! I'm on ivy these days, but was on helm for quite some time thanks to that guide.

from chatgpt-shell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.