Simple swaybar example

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'd like to have a simple, calm status bar for Sway which I use with Arch Linux.



The configurations I found use a separate program like i3status but I'd like to keep it simple and use status_command mentioned in man sway-bar directly.










share|improve this question

























    up vote
    0
    down vote

    favorite












    I'd like to have a simple, calm status bar for Sway which I use with Arch Linux.



    The configurations I found use a separate program like i3status but I'd like to keep it simple and use status_command mentioned in man sway-bar directly.










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'd like to have a simple, calm status bar for Sway which I use with Arch Linux.



      The configurations I found use a separate program like i3status but I'd like to keep it simple and use status_command mentioned in man sway-bar directly.










      share|improve this question













      I'd like to have a simple, calm status bar for Sway which I use with Arch Linux.



      The configurations I found use a separate program like i3status but I'd like to keep it simple and use status_command mentioned in man sway-bar directly.







      sway






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked yesterday









      Matthias Braun

      1,70711120




      1,70711120




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          I have this script at ~/.config/sway/status.sh:



          # The Sway configuration file in ~/.config/sway/config calls this script.
          # You should see changes to the status bar after saving this script.
          # If not, do "killall swaybar" and $mod+Shift+c to reload the configuration.

          # Produces "21 days", for example
          uptime_formatted=$(uptime | cut -d ',' -f1 | cut -d ' ' -f4,5)

          # The abbreviated weekday (e.g., "Sat"), followed by the ISO-formatted date
          # like 2018-10-06 and the time (e.g., 14:01)
          date_formatted=$(date "+%a %F %H:%M")

          # Get the Linux version but remove the "-1-ARCH" part
          linux_version=$(uname -r | cut -d '-' -f1)

          # Returns the battery status: "Full", "Discharging", or "Charging".
          battery_status=$(cat /sys/class/power_supply/BAT0/status)

          # Emojis and characters for the status bar
          # 💎 💻 💡 🔌 ⚡ 📁 |
          echo $uptime_formatted ↑ $linux_version 🐧 $battery_status 🔋 $date_formatted


          The part in ~/.config/sway/config that defines the status bar is this:



          bar 
          position top
          # Keep in mind that the current directory of this config file is $HOME
          status_command while ~/.config/sway/status.sh; do sleep 1; done

          colors
          # Text color of status bar
          statusline #ffffff
          # Background of status bar
          background #323232

          font pango:DejaVu Sans Mono 10

          height 20



          The result of that configuration:



          swaybar






          share|improve this answer






















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f473788%2fsimple-swaybar-example%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            I have this script at ~/.config/sway/status.sh:



            # The Sway configuration file in ~/.config/sway/config calls this script.
            # You should see changes to the status bar after saving this script.
            # If not, do "killall swaybar" and $mod+Shift+c to reload the configuration.

            # Produces "21 days", for example
            uptime_formatted=$(uptime | cut -d ',' -f1 | cut -d ' ' -f4,5)

            # The abbreviated weekday (e.g., "Sat"), followed by the ISO-formatted date
            # like 2018-10-06 and the time (e.g., 14:01)
            date_formatted=$(date "+%a %F %H:%M")

            # Get the Linux version but remove the "-1-ARCH" part
            linux_version=$(uname -r | cut -d '-' -f1)

            # Returns the battery status: "Full", "Discharging", or "Charging".
            battery_status=$(cat /sys/class/power_supply/BAT0/status)

            # Emojis and characters for the status bar
            # 💎 💻 💡 🔌 ⚡ 📁 |
            echo $uptime_formatted ↑ $linux_version 🐧 $battery_status 🔋 $date_formatted


            The part in ~/.config/sway/config that defines the status bar is this:



            bar 
            position top
            # Keep in mind that the current directory of this config file is $HOME
            status_command while ~/.config/sway/status.sh; do sleep 1; done

            colors
            # Text color of status bar
            statusline #ffffff
            # Background of status bar
            background #323232

            font pango:DejaVu Sans Mono 10

            height 20



            The result of that configuration:



            swaybar






            share|improve this answer


























              up vote
              0
              down vote













              I have this script at ~/.config/sway/status.sh:



              # The Sway configuration file in ~/.config/sway/config calls this script.
              # You should see changes to the status bar after saving this script.
              # If not, do "killall swaybar" and $mod+Shift+c to reload the configuration.

              # Produces "21 days", for example
              uptime_formatted=$(uptime | cut -d ',' -f1 | cut -d ' ' -f4,5)

              # The abbreviated weekday (e.g., "Sat"), followed by the ISO-formatted date
              # like 2018-10-06 and the time (e.g., 14:01)
              date_formatted=$(date "+%a %F %H:%M")

              # Get the Linux version but remove the "-1-ARCH" part
              linux_version=$(uname -r | cut -d '-' -f1)

              # Returns the battery status: "Full", "Discharging", or "Charging".
              battery_status=$(cat /sys/class/power_supply/BAT0/status)

              # Emojis and characters for the status bar
              # 💎 💻 💡 🔌 ⚡ 📁 |
              echo $uptime_formatted ↑ $linux_version 🐧 $battery_status 🔋 $date_formatted


              The part in ~/.config/sway/config that defines the status bar is this:



              bar 
              position top
              # Keep in mind that the current directory of this config file is $HOME
              status_command while ~/.config/sway/status.sh; do sleep 1; done

              colors
              # Text color of status bar
              statusline #ffffff
              # Background of status bar
              background #323232

              font pango:DejaVu Sans Mono 10

              height 20



              The result of that configuration:



              swaybar






              share|improve this answer
























                up vote
                0
                down vote










                up vote
                0
                down vote









                I have this script at ~/.config/sway/status.sh:



                # The Sway configuration file in ~/.config/sway/config calls this script.
                # You should see changes to the status bar after saving this script.
                # If not, do "killall swaybar" and $mod+Shift+c to reload the configuration.

                # Produces "21 days", for example
                uptime_formatted=$(uptime | cut -d ',' -f1 | cut -d ' ' -f4,5)

                # The abbreviated weekday (e.g., "Sat"), followed by the ISO-formatted date
                # like 2018-10-06 and the time (e.g., 14:01)
                date_formatted=$(date "+%a %F %H:%M")

                # Get the Linux version but remove the "-1-ARCH" part
                linux_version=$(uname -r | cut -d '-' -f1)

                # Returns the battery status: "Full", "Discharging", or "Charging".
                battery_status=$(cat /sys/class/power_supply/BAT0/status)

                # Emojis and characters for the status bar
                # 💎 💻 💡 🔌 ⚡ 📁 |
                echo $uptime_formatted ↑ $linux_version 🐧 $battery_status 🔋 $date_formatted


                The part in ~/.config/sway/config that defines the status bar is this:



                bar 
                position top
                # Keep in mind that the current directory of this config file is $HOME
                status_command while ~/.config/sway/status.sh; do sleep 1; done

                colors
                # Text color of status bar
                statusline #ffffff
                # Background of status bar
                background #323232

                font pango:DejaVu Sans Mono 10

                height 20



                The result of that configuration:



                swaybar






                share|improve this answer














                I have this script at ~/.config/sway/status.sh:



                # The Sway configuration file in ~/.config/sway/config calls this script.
                # You should see changes to the status bar after saving this script.
                # If not, do "killall swaybar" and $mod+Shift+c to reload the configuration.

                # Produces "21 days", for example
                uptime_formatted=$(uptime | cut -d ',' -f1 | cut -d ' ' -f4,5)

                # The abbreviated weekday (e.g., "Sat"), followed by the ISO-formatted date
                # like 2018-10-06 and the time (e.g., 14:01)
                date_formatted=$(date "+%a %F %H:%M")

                # Get the Linux version but remove the "-1-ARCH" part
                linux_version=$(uname -r | cut -d '-' -f1)

                # Returns the battery status: "Full", "Discharging", or "Charging".
                battery_status=$(cat /sys/class/power_supply/BAT0/status)

                # Emojis and characters for the status bar
                # 💎 💻 💡 🔌 ⚡ 📁 |
                echo $uptime_formatted ↑ $linux_version 🐧 $battery_status 🔋 $date_formatted


                The part in ~/.config/sway/config that defines the status bar is this:



                bar 
                position top
                # Keep in mind that the current directory of this config file is $HOME
                status_command while ~/.config/sway/status.sh; do sleep 1; done

                colors
                # Text color of status bar
                statusline #ffffff
                # Background of status bar
                background #323232

                font pango:DejaVu Sans Mono 10

                height 20



                The result of that configuration:



                swaybar







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited yesterday

























                answered yesterday









                Matthias Braun

                1,70711120




                1,70711120



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f473788%2fsimple-swaybar-example%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    T eNrP 5Vh7FX 0LU5TUe42U,zab,w3JpzB,wHHq eACtK
                    o78Q70yc1PSY4 h6W yPbRA,89YCftJZoFVVtHsi1E8qy5bZwl4VZ960 V2vSlXskZG 5PzImO QUsGzNq,nCU,rolnXD

                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    How many registers does an x86_64 CPU actually have?

                    Displaying single band from multi-band raster using QGIS